Destination Autocomplete
Find normalized places, cities, and hotels for a hotel-search destination picker.
place, city, and hotel results, so your application
does not need separate destination data from each enabled supplier.
types, city_id, limit, and language.Build the Picker
Collect the query
Render the results
display_name as the main label and subtext as supporting
context. Keep the selected result object until the search request is made.Use the matching identifier
city_id, hotel_id, or place_id according to the result’s type.
Do not send id; it is a UI key rather than a hotel-search destination ID.Request Examples
city_id to find hotels only within that
city:
Use the Selection in Hotel Search
Response Example
Behavior and Caching
- Without
city_id, city matches can start at two characters. Place and hotel matches start at three characters. - With
city_id, results are hotel-only and scoped to that city, even whentypesis also supplied. - Render the returned order. The API balances place, city, and hotel results.
- Normalize the query by trimming whitespace and lowercasing it before building a cache key.
- Cache successful responses only. Autocomplete helps a customer choose a destination; it does not guarantee price, room availability, or bookability.
Authorizations
Environment-specific API key created in the Unifystays portal
Headers
Query Parameters
Search query string. Minimum 2 characters.
2"mum"
Comma-separated list of result types to include. Omit to return all types (place + city + hotel).
city, hotel, place "place,city,hotel"
Maximum number of results to return. Default 10, max 20.
1 <= x <= 2010
Scope hotel suggestions to one city (id from a previous city autocomplete pick). When set, only hotels in that city are returned (city results are omitted) and the hotel search works from 2 characters instead of 3.
136711