Skip to content

Cities

Request

This endpoint returns a list of city IDs and their names in the selected languages.

You can filter the results by location ID. For example, to retrieve the list of cities in the Netherlands, pass: {"country":"nl"}. To retrieve the bulk list, call the endpoint with an empty request body. The city IDs returned by this endpoint are used as input and output values in other Demand API endpoints. If a city ID returned by another Demand API endpoint is not included in the bulk list, retrieve it by passing the ID in the city field, for example: {"city":900043160}. A city returned by an ID-specific request may not be included in the bulk list.

Security
BearerAuth
Headers
X-Affiliate-Idintegerrequired

Include here your Affiliate identifier number

Bodyapplication/json
airportstring(airportId)^[A-Z]{3}$

A three-letter code that uniquely identifies an airport as defined by the International Air Transport Association (IATA). The full list can be obtained by calling common/locations/airports.

Example:"AMS"
cityinteger(cityId)

A signed integer number that uniquely identifies a city. The full list can be obtained by calling common/locations/cities.

countrystring(countryId)^[a-z]{2}$

A two-letter code that uniquely identifies a country. This code is defined by the ISO 3166-1 alpha-2 standard (ISO2) as described here: https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2. The full list can be obtained by calling common/locations/countries.

Example:"nl"
districtinteger, >= 1(districtId)

A signed integer number that uniquely identifies a district. Typically, districts define known areas within a city. The full list can be obtained by calling common/locations/districts.

landmarkinteger, >= 1(landmarkId)

A signed integer number that uniquely identifies a relevant geographical landmark, like a monument or a natural attraction. The full list can be obtained by calling common/locations/landmarks.

languagesArray of strings
Default:["en-gb"]
pagestring(page)

Pagination token used to retrieve the next page of results. Obtained from next_page.

regioninteger, >= 1(regionId)

A signed integer number that uniquely identifies a geographical region. Regions usually define official administrative areas within a country, but may also include multiple countries and in some cases un-official but popular designations for geographical areas. An example of a region that crosses multiple countries is the Alps in Europe. The full list can be obtained by calling common/locations/regions.

rowsinteger, multiple of 10, [ 10 .. 1000 ](maximumResults)

The maximum number of results to return.

Default:100
curl -i -X POST \
  https://demandapi.booking.com/3.2/common/locations/cities \
  -H 'Authorization: Bearer <YOUR_string_HERE>' \
  -H 'Content-Type: application/json' \
  -H 'X-Affiliate-Id: 0' \
  -d '{
    "country": "nl",
    "languages": [
      "en-gb",
      "zh-cn"
    ]
  }'

Responses

Successful response.

Bodyapplication/json
request_idstring(requestId)

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

dataArray of objects(CityOutput)
metadataobject(MetadataOutput)
Response
{ "request_id": "01fr9ez700exycb98w90w5r9sh", "data": [ {}, "..." ], "metadata": { "next_page": "..." } }