OTA channel
Booking.com hotel rates API
Every room and rate plan Booking.com lists for a property, tax-inclusive, with the Genius price reported apart — as a parity channel or as a source of its own.
- Public rate
- ✓
- Genius (reported apart)
- ✓
- Award points
- –
- Native calendar
- –
- Comp set batch
- –
- Credits per shop
- 1
- Comp set, per hotel
- 0.25
- Calendar, per night
- shop
- ·The hotel code is Booking.com's own hotel id: GET /hotels?chain=booking&q=<hotel name and city> returns it, and so does the
channel_idof a /parity call. - ·No points and no calendar: that is what /parity and the chain modes are for.
curl -s https://api.directrate.dev/v1/shop \
-H "x-api-key: $DIRECTRATE_API_KEY" \
-H "content-type: application/json" \
-d '{
"chain": "booking",
"hotel_code": "<hotel_code>",
"checkin": "2027-01-09",
"los": 1
}'import os
import requests
r = requests.post(
"https://api.directrate.dev/v1/shop",
headers={"x-api-key": os.environ["DIRECTRATE_API_KEY"]},
json={
"chain": "booking",
"hotel_code": "<hotel_code>",
"checkin": "2027-01-09",
"los": 1,
},
)
r.raise_for_status()
print(r.headers.get("x-credits-charged"), r.json())const res = await fetch("https://api.directrate.dev/v1/shop", {
method: "POST",
headers: {
"x-api-key": process.env.DIRECTRATE_API_KEY,
"content-type": "application/json",
},
body: JSON.stringify({
"chain": "booking",
"hotel_code": "<hotel_code>",
"checkin": "2027-01-09",
"los": 1
}),
});
if (!res.ok) throw new Error(`HTTP ${res.status}`);
console.log(res.headers.get("x-credits-charged"), await res.json());Find the hotel's Booking.com id first: GET /v1/hotels?chain=booking&q=<hotel name and city> (1 credit).
# an OTA's hotel code is its own hotel id: look the hotel up by its name
# (a /parity call on a chain's hotel returns the same id as the channel id)
curl -s "https://api.directrate.dev/v1/hotels?chain=booking&q=The%20Drake%20Chicago" \
-H "x-api-key: $DIRECTRATE_API_KEY"{
"chain": "booking",
"hotel": {
"code": "<hotel_code>",
"name": "…",
"currency": "USD"
},
"checkin": "2027-01-09",
"los": 1,
"status": "available",
"rates": [
{
"room_name": "…",
"rate_name": "…",
"rate_type": "bar",
"member_only": false,
"price_per_night": 0,
"price_per_night_after_tax": 0,
"tax_included": true,
"currency": "USD"
}
],
"lowest": {
"bar": 0,
"member": 0,
"bar_after_tax": 0,
"member_after_tax": 0
},
"shopped_at": "…",
"source": "live",
"cache_age_sec": 0
}ShopResponse — the full schema is in the API reference.
No snapshot response is shown for Booking.com on this page; the shape above is the contract every chain answers in. Run it live with a free key.
FAQ
Booking.com questions
Where do I get a Booking.com hotel id?
GET /hotels?chain=booking&q=<hotel name and city> returns it: the name is matched on Google Hotels and Booking.com's own id is read from the hotel's offer there, for one credit (nothing when the hotel is not listed on Booking.com). For a hotel of one of the chains, POST /parity returns the same id as the channel id, and GET /hotels/{chain}/{code}/ids returns the mapping on its own.
Does the Booking.com price include tax?
Every OTA rate is tax-inclusive on the comparable field price_per_night_after_tax; the row says which basis price_per_night is in.
Can I get points or a calendar from Booking.com?
No — an OTA carries no award points and no native calendar. Shop it directly, use it as a /parity channel, or /calendar it a night at a time (one shop per night).
Other sources