Piloterr

Booking Hotel Search

GET
/v2/booking/hotel/search

Search Booking.com stays by city name, or by a city, region, district, landmark, airport or search URL. A hotel page URL belongs on hotel info.

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. City name such as Paris, or a Booking city or search URL. A hotel page URL belongs on hotel info.

Paris
https://www.booking.com/city/fr/paris.fr.html
https://www.booking.com/searchresults.html?ss=Paris
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
check_in?string

Optional. YYYY-MM-DD. Send it only together with check_out, otherwise the API returns 400.

check_out?string

Optional. YYYY-MM-DD. Required only when check_in is set, and it must be after check_in.

adults?number

Optional. Default 2.

Default"2"
children?number

Optional. Default 0.

Default"0"
children_ages?string

Optional. One age per child. If children is set and this is empty, each child is 8.

rooms?number

Optional. Default 1.

Default"1"
language?string

Optional. Default en-gb. Unknown code returns 400.

currency?string

Optional. Default USD. Must be 3 letters or the API returns 400.

page?number

Optional. Default 1.

Default"1"
min_score?string

Optional. 0 to 10.

stars?string

Optional. 1-5 or any.

property_type?string

Optional. hotels, apartments, hostels, villas, resorts, holiday homes.

sort_by?string

Optional. price, review_score, distance, class.

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<>
pagination?
destination?
Example Request
curl -X GET 'https://api.piloterr.com/v2/booking/hotel/search?query=string'
Example Response
{  "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": "Fabuleux",      "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": "Fabuleux",      "review_score": 9.2,      "price_display": "À partir de € 561 par nuit"    }  ],  "pagination": {    "next": "https://www.booking.com/city/fr/paris.fr.html?offset=25",    "page": 1,    "per_page": 25,    "total_pages": null,    "total_results": null  },  "destination": {    "label": "Paris, Île-de-France, France",    "dest_id": "-1456928",    "dest_type": "city"  }}