Get Suggestions API
Returns a ranked list of matching locations and hotels as the user types. Call this API after the user inputs 3 or more characters — calling on every keystroke is unnecessary and increases load.
Key fields to extract from the response
You need four fields from every suggestion result to drive the rest of the booking flow.
type
Determines which search mode to use in Search Init. See the Autosuggest decision table for the full mapping.
id
Pass to Get Location Details API when type is city or similar to retrieve the polygon boundary.
latitude / longitude
The centre point of the location. Used directly in circular search for hotels, airports, and points of interest.
referenceId
Present when type is hotel. Use this as the hotelId for a direct hotel ID search — no location call needed.
Location types returned
The API returns a mix of types in one response. Your implementation needs to handle each correctly.
id to get the polygon before triggering a search.
referenceId directly as a hotel ID search. No Get Location Details call needed.
Relevance scoring
Results are sorted by a relevance score calculated from the user's keystrokes. The closer the match, the higher the score. You do not need to sort results yourself — the API returns them ranked highest to lowest.
Updated about 1 month ago