Autosuggest

Autosuggest does two things: it improves the user experience by suggesting destinations as they type, and — more importantly — it maps the selected destination to the precise coordinates and location type that drive every downstream API call. Without it, you would need to supply your own coordinate data.

The Autosuggest suite has two APIs that work in sequence.

Step 1

Get Suggestions API

Trigger after 3+ keystrokes. Returns a ranked list of matching locations and hotels with a type, id, and coordinates. The type field determines which search mode to use.

Step 2 — city searches only

Get Location Details API

Pass the id from Get Suggestions to retrieve the full polygon boundary of a city or region. Required before calling Search Init for any city type result.

Search type decision table

The type field in the Get Suggestions response tells you exactly which search mode to use in Search Init. Follow this table — no guesswork needed.

Autosuggest type Examples Search mode to use
city, multiCity, region, neighbourhood London, Greater London, Mayfair Polygon or multi-polygon — call Get Location Details first to get the boundary
hotel Taj Mahal Palace Mumbai Hotel ID search — use the referenceId as the hotelId directly
pointOfInterest, airport, trainStation Heathrow Airport, Eiffel Tower Circular search — use the returned lat/long with a 2–5 km radius
Already using Google Places or your own location data? The Get Suggestions API is optional if you already have a location source. You can pass your own coordinates directly to Search Init — just make sure you're passing the right search type (polygon boundary vs circular lat/long) based on the destination type.


What’s Next