Piloterr

Booking Destination

GET
/v2/booking/destination/info

Booking hub for a country, region, city, district, landmark or airport URL.

Credit cost: 3 credits per call

Authentification

ApiKeyAuth
headerx-api-key<token>

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

Paramètres de requête

query*string

Required. Country, region, city, district, landmark or airport URL.

https://www.booking.com/city/fr/paris.fr.html
https://www.booking.com/region/fr/ile-de-france.fr.html
language?string

Optional. Default en-gb.

page?number

Optional. Default 1.

Default"1"
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.

return_page_source?boolean

Optional. Default false. true returns {"result": html} instead of JSON. A Chrome, Brave, or Internet Explorer proxy error is still HTTP 500, and that error page is not returned.

false
Defaultfalse
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

Corps de la réponse

Successful response

application/json
  1. response
url?string
kind?string
name?string
results?array<>
children?array<>
pagination?
country_code?string
hotels_count?integer
Example Request
curl -X GET 'https://api.piloterr.com/v2/booking/destination/info?query=string'
Example Response
{  "url": "https://www.booking.com/city/fr/paris.fr.html",  "kind": "city",  "name": "Recherchez des hôtels à Paris",  "results": [    {      "url": "https://www.booking.com/hotel/fr/elysee-montmartre.fr.html",      "name": "Hotel Elysée Montmartre",      "image": "https://cf.bstatic.com/xdata/images/hotel/270x200/727407309.jpg?k=e4975a801d56b4506ef15a36f03bfcbce355fd7fd7c1cd03295b9fddb54e1863&o=",      "price": 313,      "stars": 4,      "address": "Hôtel à Paris (18e arr.)",      "currency": "EUR",      "hotel_id": "elysee-montmartre",      "review_count": 495,      "review_label": "Hotel",      "review_score": 9.2,      "price_display": "À partir de € 313 par nuit"    },    {      "url": "https://www.booking.com/hotel/fr/sax-paris-lxr-hotels-resorts.fr.html",      "name": "Hotel SAX Paris, LXR Hotels & Resorts",      "image": "https://cf.bstatic.com/xdata/images/hotel/270x200/930596391.jpg?k=59512ef602164732872dcc507134f1e6de8710a11ebdda9f329ba01c28402f34&o=",      "price": 561,      "stars": 5,      "address": "Hôtel à Paris (7e arr.)",      "currency": "EUR",      "hotel_id": "sax-paris-lxr-hotels-resorts",      "review_count": 360,      "review_label": "Hotel",      "review_score": 9.2,      "price_display": "À partir de € 561 par nuit"    }  ],  "children": [    {      "url": "https://www.booking.com/country/fr.fr.html",      "kind": "country",      "name": "France",      "hotels_count": null    },    {      "url": "https://www.booking.com/region/fr/ile-de-france.fr.html",      "kind": "region",      "name": "Île-de-France",      "hotels_count": null    }  ],  "pagination": {    "next": "https://www.booking.com/city/fr/paris.fr.html?offset=25",    "page": 1,    "per_page": 25,    "total_pages": null,    "total_results": null  },  "country_code": "fr",  "hotels_count": 13135}