> ## Documentation Index
> Fetch the complete documentation index at: https://docs.baato.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Migrating from Google Maps

> Map each Google Maps Platform service to its Baato equivalent.

Most Google Maps Platform services have a direct Baato counterpart for Nepal. This page is
the endpoint-by-endpoint mapping; the full
[migration guide](https://migration.baato.io) walks through worked examples.

## Service mapping

| Google Maps Platform       | Baato equivalent                                                                                 |
| -------------------------- | ------------------------------------------------------------------------------------------------ |
| Places API — Autocomplete  | [Search API](/services/search)                                                                   |
| Places API — Place Details | [Places API](/services/places)                                                                   |
| Places API — Nearby Search | [Nearby Places API](/services/nearby-places)                                                     |
| Geocoding API — reverse    | [Reverse Search API](/services/reverse)                                                          |
| Directions API             | [Directions API](/services/directions)                                                           |
| Maps JavaScript API        | [Map Styles API](/services/styles) + [MapLibre GL JS](https://maplibre.org/maplibre-gl-js/docs/) |
| Maps SDK for Android       | [Map Styles API](/services/styles) + [Java client](/libraries/java)                              |
| Maps SDK for iOS           | [Map Styles API](/services/styles) + [Swift client](/libraries/swift)                            |
| Navigation SDK             | [Baato Navigation SDK](/libraries/navigation-sdk)                                                |

Baato has no equivalent for Distance Matrix, Roads, Street View, Time Zone or Elevation. If
one of those is load-bearing for you, [tell us](mailto:support@baato.io) — it helps us
prioritise.

## Differences worth knowing before you port

<AccordionGroup>
  <Accordion title="The map renderer is not part of Baato" icon="layer-group">
    Google ships an SDK that owns both tiles and rendering. Baato ships **styles** — you pick
    the renderer. [MapLibre GL](https://maplibre.org) is the usual choice and is open source
    on every platform; Mapbox GL works too.

    In practice this makes migration easier, not harder: switching a MapLibre app from
    another tile provider to Baato is a one-line style URL change.
  </Accordion>

  <Accordion title="Search returns no coordinates" icon="magnifying-glass">
    Google's Autocomplete can return geometry inline. Baato's [Search](/services/search)
    deliberately omits it to keep suggestion responses small, so you make a second call to
    [Places](/services/places) with the `placeId` once the user picks a result.

    If you were calling Autocomplete then Place Details already, the shape is identical.
  </Accordion>

  <Accordion title="Routes come back as encoded polylines" icon="route">
    Same format Google uses, so any polyline decoder you already have keeps working. The
    field is `encodedPolyline`, and distance and duration arrive as `distanceInMeters` and
    `timeInMs` — milliseconds, where Google's `duration.value` is seconds.
  </Accordion>

  <Accordion title="Authentication is a query parameter" icon="key">
    Baato takes the token as `key` on every request, like Google. Domain restrictions work
    similarly too — set allowed origins per token in your
    [dashboard](https://baato.io/account). See [Authentication](/about/authentication).
  </Accordion>

  <Accordion title="Coverage is Nepal" icon="globe">
    Baato's data covers Nepal in depth rather than the world thinly. If your application
    serves users outside Nepal, plan for a fallback provider on those requests.
  </Accordion>
</AccordionGroup>

## A worked comparison

Autocomplete, before and after:

<CodeGroup>
  ```javascript Google Maps theme={null}
  const service = new google.maps.places.AutocompleteService();

  service.getPlacePredictions(
    { input: "patan", location: center, radius: 5000 },
    (predictions) => render(predictions),
  );
  ```

  ```javascript Baato theme={null}
  const params = new URLSearchParams({
    key: BAATO_TOKEN,
    q: "patan",
    lat: 27.7172,
    lon: 85.3240,
    limit: 5,
  });

  const { data } = await (
    await fetch(`https://api.baato.io/api/v1/search?${params}`)
  ).json();

  render(data);
  ```
</CodeGroup>

## Next

<Columns cols={2}>
  <Card title="Full migration guide" icon="book" href="https://migration.baato.io">
    Longer worked examples, endpoint by endpoint.
  </Card>

  <Card title="Quickstart" icon="rocket" href="/about/quickstart">
    Get a token and make your first Baato request.
  </Card>
</Columns>
