Returns ranked destination suggestions for a free-text query. Use this endpoint to provide suggestions as a user types.
Results are ranked using destination popularity and the supplied country context. The endpoint supports prefix matching and basic typo tolerance. Use filters.types to restrict results to specific destination types.
Each result includes a destination type, identifier, localised name and geographic context. Geographic details vary by destination type and may be unavailable.
Free-text query used to generate suggestions. Leading and trailing whitespace is ignored when matching. Provide between 3 and 200 characters.
Language code used to localise names in the response. Only one language can be specified per request.
Lowercase ISO 3166-1 alpha-2 country code used as the primary country context for ranking suggestions.
- https://demandapi.booking.com/3.3https://demandapi.booking.com/3.3/common/autocomplete
- https://demandapi-sandbox.booking.com/3.3https://demandapi-sandbox.booking.com/3.3/common/autocomplete
curl -i -X POST \
https://demandapi.booking.com/3.3/common/autocomplete \
-H 'Authorization: Bearer <YOUR_string_HERE>' \
-H 'Content-Type: application/json' \
-H 'X-Affiliate-Id: 0' \
-d '{
"query": "amster",
"language": "en-gb",
"country": "nl",
"filters": {
"types": [
"city"
]
}
}'Successful response containing ranked suggestions. The data array may be empty when no suggestions match the query.
{ "request_id": "01khs9q981dta9fptx2edvq9r3", "data": [ { … } ] }