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
ApiKeyAuthx-api-key<token>Your API key. Include it in the x-api-key header for every request.
query*stringRequired. Place name or a Booking URL. A city URL is read as the place name.
Parishttps://www.booking.com/city/fr/paris.fr.htmllanguage?stringOptional. Default en-gb.
country?stringOptional. 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.
arfrAccepted 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?stringComma-separated list of response fields to return, with dot notation for nested fields (e.g. name,location.city).
is_async?booleanRun the request as a background job: the API answers 202 with a job_id to poll on GET /v1/jobs/{id}.
falsesoft_fail?booleanReturn HTTP 200 even when the request fails; the error is in the error field of the body.
falseSuccessful response
application/json- response
results?array<>curl -X GET 'https://api.piloterr.com/v2/booking/location/search?query=string'{ "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 } ]}