Booking.com Hotel Rooms API
Returns a Booking.com property's bookable offers for a stay, each with its room, beds and facilities, the price with taxes and discount, the meal plan and cancellation terms.
GET /v1/booking/hotel/roomsLast updated November 2026Maintained by the SocialCrawl team
When to use the Booking.com Hotel Rooms API
Use it to compare a hotel's room rates for your dates, check cancellation and breakfast terms, or track a property's prices for a stay.
From the API reference
Returns every offer a Booking.com property has for one stay, one item per offer (a room type at one rate): the room's name, size, beds, facilities and photos, the guests and rooms the offer is priced for, the price of the stay to the cent with the price a night, the discount, and each tax and fee and whether it is included, the meal plan, the cancellation and prepayment terms with the last day to cancel free, and a Booking.com link with the offer selected. matches_requested_group says whether an offer fits the whole party you sent, or is null when Booking.com does not say: offers can be priced for one room even when you ask for more. data.property and data.stay give the property and the stay as priced. Identify the property by id (as GET /v1/booking/search returns it) or url. A property link that does not open answers a refunded 503. Results are cached for 5 minutes.
95 platforms behind one API
What can you do with the Hotel Rooms API?
The Hotel Rooms endpoint gives you structured Booking.com data with computed fields in a single request. No scraping infrastructure to build or maintain.
Example Request
# GET /v1/booking/hotel/rooms: 1 credit per call. Cache hits are free and failed calls are refunded.
# Check the price first for 0 credits: add dry_run=1 to the query. Nothing is fetched or charged.
# --max-time 60: the API's own time limit for this endpoint.
# --retry 3: retries timeouts, 429 and 5xx, honoring Retry-After.
# -o response.json keeps only the final attempt's body.
# One Idempotency-Key per request, reused on every retry, so a retried call is never charged twice.
IDEMPOTENCY_KEY=$(od -An -N16 -tx1 /dev/urandom | tr -d ' \n')
curl -sS --max-time 60 --retry 3 -o response.json \
-H "x-api-key: YOUR_API_KEY" \
-H "Idempotency-Key: $IDEMPOTENCY_KEY" \
"https://www.socialcrawl.dev/v1/booking/hotel/rooms?check_in=2026-12-15&check_out=2026-12-18&id=pt%2Fmasa-5-de-outubro" && cat response.json# GET /v1/booking/hotel/rooms: 1 credit per call. Cache hits are free and failed calls are refunded.
# Check the price first for 0 credits: add dry_run=1 to the query. Nothing is fetched or charged.
import os
import random
import time
import uuid
import requests
API_KEY = os.environ.get("SOCIALCRAWL_API_KEY", "YOUR_API_KEY")
TIMEOUT_S = 60 # the API's own time limit for this endpoint.
MAX_RETRIES = 3
URL = "https://www.socialcrawl.dev/v1/booking/hotel/rooms"
def backoff(attempt):
# Exponential backoff with jitter: about 1 s, 2 s, then 4 s.
return 2 ** attempt * (0.5 + random.random() / 2)
def socialcrawl(params):
# One Idempotency-Key per request, reused on every retry, so a retried call is never charged twice.
idempotency_key = str(uuid.uuid4())
for attempt in range(MAX_RETRIES + 1):
try:
res = requests.get(
URL,
params=params,
headers={"x-api-key": API_KEY, "Idempotency-Key": idempotency_key},
timeout=TIMEOUT_S,
)
body = res.json()
except (requests.RequestException, ValueError):
# A timeout, a dropped connection or a non-JSON gateway page: retry with the same key.
if attempt == MAX_RETRIES:
raise
time.sleep(backoff(attempt))
continue
if body["success"]:
return body
error = body["error"]
# Branch on error["type"], never on the message text.
if error["type"] == "RESOURCE_NOT_FOUND":
return None # refunded: nothing to read
retry_after = res.headers.get("Retry-After")
# SERVICE_UNAVAILABLE without Retry-After is a withdrawn endpoint: permanent.
permanent = error["type"] == "SERVICE_UNAVAILABLE" and retry_after is None
if not error.get("retryable") or permanent or attempt == MAX_RETRIES:
raise RuntimeError(f"{error['type']}: {error['message']} (request_id {body['request_id']})")
# Retry-After (seconds) wins; otherwise back off.
time.sleep(float(retry_after) if retry_after else backoff(attempt))
params = {
"check_in": "2026-12-15",
"check_out": "2026-12-18",
"id": "pt/masa-5-de-outubro",
}
body = socialcrawl(params)
if body is not None:
print(body["data"])// GET /v1/booking/hotel/rooms: 1 credit per call. Cache hits are free and failed calls are refunded.
// Check the price first for 0 credits: add dry_run=1 to the query. Nothing is fetched or charged.
const API_KEY = process.env.SOCIALCRAWL_API_KEY ?? "YOUR_API_KEY";
const TIMEOUT_MS = 60_000; // the API's own time limit for this endpoint.
const MAX_RETRIES = 3;
type Page = { next_cursor: string | null; has_more: boolean };
type SocialCrawlResponse =
| { success: true; data: any; pagination?: Page; credits_used: number; request_id: string }
| { success: false; error: { type: string; message: string; retryable: boolean }; request_id: string };
const sleep = (ms: number) => new Promise((resolve) => setTimeout(resolve, ms));
// Exponential backoff with jitter: about 1 s, 2 s, then 4 s.
const backoffMs = (attempt: number) => 2 ** attempt * 1000 * (0.5 + Math.random() / 2);
async function socialcrawl(url: URL) {
// One Idempotency-Key per request, reused on every retry, so a retried call is never charged twice.
const idempotencyKey = crypto.randomUUID();
for (let attempt = 0; ; attempt++) {
let res: Response;
let body: SocialCrawlResponse;
try {
res = await fetch(url, {
headers: {
"x-api-key": API_KEY,
"Idempotency-Key": idempotencyKey,
},
signal: AbortSignal.timeout(TIMEOUT_MS),
});
body = (await res.json()) as SocialCrawlResponse;
} catch (error) {
// A timeout, a dropped connection or a non-JSON gateway page: retry with the same key.
if (attempt >= MAX_RETRIES) throw error;
await sleep(backoffMs(attempt));
continue;
}
if (body.success) return body;
// Branch on error.type, never on the message text.
if (body.error.type === "RESOURCE_NOT_FOUND") return null; // refunded: nothing to read
const retryAfter = res.headers.get("Retry-After");
// SERVICE_UNAVAILABLE without Retry-After is a withdrawn endpoint: permanent.
const permanent = body.error.type === "SERVICE_UNAVAILABLE" && retryAfter === null;
if (!body.error.retryable || permanent || attempt >= MAX_RETRIES) {
throw new Error(`${body.error.type}: ${body.error.message} (request_id ${body.request_id})`);
}
// Retry-After (seconds) wins; otherwise back off.
await sleep(retryAfter ? Number(retryAfter) * 1000 : backoffMs(attempt));
}
}
const url = new URL("https://www.socialcrawl.dev/v1/booking/hotel/rooms");
url.searchParams.set("check_in", "2026-12-15");
url.searchParams.set("check_out", "2026-12-18");
url.searchParams.set("id", "pt/masa-5-de-outubro");
const body = await socialcrawl(url);
if (body) console.log(body.data);Parameters
| Parameter | Required | Description |
|---|---|---|
| check_in | Yes | Check-in date, YYYY-MM-DD. |
| check_out | Yes | Check-out date, YYYY-MM-DD, after check_in. |
| id | No | The Booking.com property id as GET /v1/booking/search returns it in place.id, for example pt/masa-5-de-outubro. Send id or url. |
| url | No | A Booking.com property link, for example https://www.booking.com/hotel/pt/masa-5-de-outubro.html. |
| adults | No | Adults, 1 to 30 (default 2). |
| children_ages | No | Each child's age, 0 to 17, comma-separated, for example 5,8. Omit for no children. |
| rooms | No | Rooms, 1 to 30 (default 1). |
| currency | No | Currency for prices, for example USD, EUR or GBP (default USD). (AUD | BRL | CAD | CHF | CNY | CZK | DKK | EUR | GBP | HKD | HUF | INR | JPY | KRW | MXN | NOK | NZD | PLN | RON | SEK | SGD | THB | TRY | USD | ZAR) |
| language | No | Language for room names and terms, for example en-gb or de-de (default en-us). (en-us | en-gb | de-de | es-es | fr-fr | it-it | nl-nl | pt-br | ja-jp | ko-kr | pl-pl | ru-ru | tr-tr | zh-cn) |
What does the Booking.com Hotel Rooms API return?
This example shows the endpoint's response shape and fields. Values are illustrative; this is not a live capture.
Example response
{
"success": true,
"platform": "booking",
"endpoint": "hotel/rooms",
"data": {
"items": [
{
"id": "450498503_136242787_2_1_0_558523",
"room_id": "450498503",
"room_name": "Double Room",
"room": {
"size": 20,
"size_unit": "m2",
"capacity": 2,
"beds": [
{
"type": "large_double_bed",
"count": 1
}
],
"facilities": [
"Bath",
"Shower",
"Toilet",
"Towels"
],
"image_urls": [
"https://cf.bstatic.com/xdata/images/hotel/max1024x768/215319123.jpg?k=381878f63cdbddd5c62282aecfb8bd722c69dcdd435bf6a57a5fd352674dedbe&o="
]
},
"capacity": 2,
"occupancy": 2,
"room_count": 1,
"matches_requested_group": true,
"price": {
"total": 202.67,
"currency": "USD",
"per_night": 67.56,
"before_discount": 289.52,
"discount": 86.85,
"taxes_and_fees": 38.52,
"taxes_and_fees_included": false,
"taxes": [
{
"name": "6 % VAT",
"amount": 12.16,
"included": false
},
{
"name": "City tax",
"amount": 26.36,
"included": false
}
]
},
"meal_plan": "breakfast",
"free_cancellation": false,
"cancellation_type": "non_refundable",
"cancellation_deadline": null,
"cancellation_text": "Non-refundable",
"no_prepayment": null,
"prepayment_text": "Pay online",
"booking_url": "https://www.booking.com/hotel/pt/masa-5-de-outubro.html?checkin=2026-12-15&checkout=2026-12-18&group_adults=2&no_rooms=1&group_children=0&selected_currency=USD&lang=en-us&highlighted_blocks=450498503_136242787_2_1_0_558523"
},
{
"id": "450498503_343618235_2_1_0_558523",
"room_id": "450498503",
"room_name": "Double Room",
"room": {
"size": 20,
"size_unit": "m2",
"capacity": 2,
"beds": [
{
"type": "large_double_bed",
"count": 1
}
],
"facilities": [
"Bath",
"Shower",
"Toilet",
"Towels"
],
"image_urls": [
"https://cf.bstatic.com/xdata/images/hotel/max1024x768/215319123.jpg?k=381878f63cdbddd5c62282aecfb8bd722c69dcdd435bf6a57a5fd352674dedbe&o="
]
},
"capacity": 2,
"occupancy": 2,
"room_count": 1,
"matches_requested_group": true,
"price": {
"total": 225.18,
"currency": "USD",
"per_night": 75.06,
"before_discount": 321.69,
"discount": 96.51,
"taxes_and_fees": 39.87,
"taxes_and_fees_included": false,
"taxes": [
{
"name": "6 % VAT",
"amount": 13.51,
"included": false
},
{
"name": "City tax",
"amount": 26.36,
"included": false
}
]
},
"meal_plan": "breakfast",
"free_cancellation": true,
"cancellation_type": "free_cancellation",
"cancellation_deadline": "2026-12-12",
"cancellation_text": "Free cancellation before December 12, 2026",
"no_prepayment": true,
"prepayment_text": "No prepayment needed – pay at the property",
"booking_url": "https://www.booking.com/hotel/pt/masa-5-de-outubro.html?checkin=2026-12-15&checkout=2026-12-18&group_adults=2&no_rooms=1&group_children=0&selected_currency=USD&lang=en-us&highlighted_blocks=450498503_343618235_2_1_0_558523"
}
],
"total": 2,
"property": {
"id": "4504985",
"url": "https://www.booking.com/hotel/pt/masa-5-de-outubro.html"
},
"stay": {
"check_in": "2026-12-15",
"check_out": "2026-12-18",
"adults": 2,
"children_ages": [],
"rooms": 1,
"currency": "USD",
"language": "en-us"
}
},
"credits_used": 1,
"credits_remaining": 9999,
"request_id": "req-a1b2c3d4e5f6",
"cached": false
}Illustrative fixture for the documented response shape. Values are examples, not a production capture.
How does the Booking.com Hotel Rooms API work?
Send a GET request with your API key and get back clean, structured JSON in our unified schema. Supported computed fields are populated when the source provides the required inputs.
Method
GET
Response
JSON
How do you scrape social media data in seconds?
The fastest social media scraping API for developers. Scrape profiles, posts, comments, and analytics from 95 platforms covering 10B+ monthly active users.
One schema, every platform
Query 95 platforms with identical response structures. Write your integration once.
Computed fields, not just scraped
When an endpoint supports these metrics and the source provides the required inputs, the normalized record includes engagement_rate, estimated_reach, content_category, and language. Ready to use.
See your data before you code
Visual Data Explorer. Paste any URL, get rich result cards, sortable tables, CSV export.
import requests
response = requests.get(
'https://www.socialcrawl.dev/v1/tiktok/profile',
params={'handle': 'charlidamelio'},
headers={'x-api-key': 'sc_YOUR_API_KEY'}
)
data = response.json(){
"success": true,
"platform": "tiktok",
"data": {
"author": {
"username": "charlidamelio",
"followers": 152400000
},
"engagement": {
"likes": 12400000000,
"engagement_rate": 0.087
},
"metadata": {
"language": "en",
"content_category": "lifestyle"
}
}
}Have a question? We got answers
Find answers to frequently asked questions about SocialCrawl's API, pricing, and capabilities.
Contact usWhat does the Booking.com Hotel Rooms API return?
When should I use the Booking.com Hotel Rooms endpoint?
How much does the Booking.com Hotel Rooms API cost?
What parameters does the Booking.com Hotel Rooms API need?
How do I call the Booking.com Hotel Rooms API?
Ask AI about SocialCrawl
Ready to scrape Booking.com Hotel Rooms data?
Get your API key and start pulling Booking.com data in under 60 seconds.
