Piloterr

Booking Location Search

GET
/v2/booking/location/search

Autocomplete a place name, or a Booking city URL such as https://www.booking.com/city/fr/paris.fr.html. The URL is read as the place name. return_page_source is not supported and returns 400.

Credit cost: 3 credits per call

Authorization

ApiKeyAuth
headerx-api-key<token>

Your API key. Include it in the x-api-key header for every request.

Query Parameters

query*string

Required. Place name or a Booking URL. A city URL is read as the place name.

Paris
https://www.booking.com/city/fr/paris.fr.html
language?string

Optional. Default en-gb.

country?string

Optional. Two-letter market code. The value sent is the code, for example ar. It does not change the proxy. Booking sets the cookie explicit_language_preference and the Accept-Language header. If language is empty, this also sets the page language. A URL in query is not rewritten. Any other code returns 400.

ar
fr

Accepted codes: ar, at, be, br, ca, ch, cl, cn, co, cz, de, dk, es, fi, fr, gb, hu, ie, it, jp, mx, nl, no, pe, pl, pt, ro, se, tw, uk, us, uy.

fields?string

Comma-separated list of response fields to return, with dot notation for nested fields (e.g. name,location.city).

is_async?boolean

Run the request as a background job: the API answers 202 with a job_id to poll on GET /v1/jobs/{id}.

Defaultfalse
soft_fail?boolean

Return HTTP 200 even when the request fails; the error is in the error field of the body.

Defaultfalse

Response Body

Successful response

application/json
  1. response
results?array<>
Example Request
curl -X GET 'https://api.piloterr.com/v2/booking/location/search?query=string'
Example Response
{  "results": [    {      "label": "Paris, Île-de-France, France",      "title": "Paris",      "dest_id": "-1456928",      "latitude": 48.8566818237305,      "subtitle": "Île-de-France, France",      "dest_type": "city",      "longitude": 2.35147643089294,      "country_code": "fr",      "hotels_count": null    },    {      "label": "Centre de Paris, Paris, Île-de-France, France",      "title": "Centre de Paris",      "dest_id": "2281",      "latitude": 48.8580703735352,      "subtitle": "Paris, Île-de-France, France",      "dest_type": "district",      "longitude": 2.33013200759888,      "country_code": "fr",      "hotels_count": null    },    {      "label": "Aéroport de Paris - Roissy - Charles-de-Gaulle, Paris, Île-de-France, France",      "title": "Aéroport de Paris - Roissy - Charles-de-Gaulle",      "dest_id": "8",      "latitude": 49.0070991516113,      "subtitle": "Paris, Île-de-France, France",      "dest_type": "airport",      "longitude": 2.56843996047974,      "country_code": "fr",      "hotels_count": null    }  ]}