Skip to main content
Autocomplete uses two endpoints. Search returns lightweight suggestions as the user types; Places resolves the one they pick into full detail with coordinates.
1

Query the Search API

string
required
The search keyword.
number
Latitude to bias results towards. Must be sent with lon.
number
Longitude to bias results towards. Must be sent with lat.
integer
default:"20"
Maximum number of suggestions to return.
2

Debounce the input

Firing a request per keystroke burns through your quota and produces flickering results as responses arrive out of order. 300 ms is a good default.
The cancelled flag matters as much as the timer — without it, a slow early request can resolve after a fast later one and overwrite fresh results with stale ones.
3

Render the suggestions

4

Resolve the selected place

Search results carry no coordinates — that keeps autocomplete responses small. Fetch them only for the result the user actually picks.
/places accepts either placeId (from a Baato search result) or osmId (an OpenStreetMap object ID). Both return a one-element array — read data[0].

Next

Reverse geocoding

Go the other way — coordinates to an address.

Search API reference

Every parameter, with a live playground.