Skip to content

Retrieve autocomplete suggestions

Request

Returns ranked suggestions based on the free-text query, destination popularity, and the provided context. This endpoint is designed for real-time "as-you-type" autocomplete experiences.\n\nSupports prefix matching with basic typo tolerance and is optimised for low-latency search.\n\nYou can optionally restrict results by destination type using filters.types.\n\nEach suggestion includes a destination identifier, localised name, and geographic context.

Security
BearerAuth
Headers
X-Affiliate-Idintegerrequired

Include here your Affiliate identifier number

Bodyapplication/jsonrequired
querystring, [ 3 .. 200 ] charactersrequired

Free-text search query used to generate suggestions. Leading and trailing whitespace is ignored. Must contain between 3 and 200 characters.

languagestring(languageId)^[a-z]{2}(-[a-z]{2})?$

Language code used to localise names in the response. Only one language can be specified per request.

Default:"en-gb"
Example:"en-us"
countrystring(countryId)^[a-z]{2}$required

ISO 3166-1 alpha-2 country code used as the primary search context for autocomplete ranking. This field is required.

Example:"nl"
filtersobject(AutoCompleteFilters)

Restricts results to the specified destination types. If omitted, all types are included. It should not be an empty object.

curl -i -X POST \
  https://demandapi.booking.com/3.2/common/autocomplete \
  -H 'Authorization: Bearer <YOUR_string_HERE>' \
  -H 'Content-Type: application/json' \
  -H 'X-Affiliate-Id: 0' \
  -d '{
    "query": "ams",
    "language": "en-us",
    "country": "nl",
    "filters": {
      "types": [
        "airport"
      ]
    }
  }'

Responses

Successful response with ranked suggestions.

Bodyapplication/json
request_idstring(requestId)

Uniquely identifies the request. Please provide this identifier when contacting support.

dataArray of objects(AutoCompleteResultOutput)
Response
// No response example