Tony Wang5 min readHow to Scrape Booking.com in 2026 (API & Python)
Scrape Booking.com in 2026 — hotel search, detail, reviews, flights, and attractions — DIY, no-code, or a structured API, with the legal basics.
The fastest way to scrape Booking.com in 2026 is to call a structured API that returns normalized JSON — hotel search, detail, guest reviews, flight offers, and attractions — instead of replaying Booking.com's own persisted-query GraphQL and internal REST endpoints yourself. Booking.com is the largest OTA by traffic, but its official API is partner-gated and its pages run behind real anti-bot defenses. This guide covers all three approaches across all three surfaces (hotels, flights, attractions), where DIY breaks, and the legal basics.
Why scrape Booking.com?
Booking.com's hotel, flight, and attraction data powers:
- Hotel price and availability monitoring — track how a property's rate moves by date, room type, and season.
- Competitive rate research — compare a hotel's Booking.com pricing against other channels.
- Review and reputation analysis — aggregate guest review scores and text by hotel, date, or traveler type.
- Flight fare research — track route/date fare movement alongside hotel pricing for a destination.
- Destination and things-to-do discovery — surface attractions and activities for a trip-planning or itinerary product.
Is it legal to scrape Booking.com?
Option 1: DIY in Python (and why it breaks)
Booking.com's hotel pages render from persisted-query GraphQL calls rather than plain HTML, so a DIY scraper replicates those queries:
import requests
# Booking.com's search UI calls a persisted-query GraphQL endpoint
resp = requests.post(
"https://www.booking.com/dml/graphql",
json={"operationName": "SearchResults", "variables": {"destination": "Tokyo"}, "extensions": {"persistedQuery": {"sha256Hash": "..."}}},
headers={"User-Agent": "Mozilla/5.0 (compatible; research-bot/1.0)"},
)
It demos and then breaks:
- Real anti-bot, not a soft block. Booking.com fronts its search and hotel-detail pages with a JavaScript-challenge shell — a plain HTTP client gets a challenge page instead of content, so you need an actual browser (or a browser-shaped transport), not just realistic headers.
- No self-serve official API. Access to the real Demand API requires becoming an approved Affiliate Partner — an application, approval process, and a commission-per-booking business relationship — not a signup form for a research or monitoring use case.
- Persisted-query drift. Like JustWatch, the GraphQL queries are hashed and versioned; replicated queries break when Booking.com ships a new hash.
- Three different surfaces, three different shapes. Hotels, flights, and attractions are separate products with separate endpoints and separate response shapes — covering all three means three integrations, not one.
Option 2: No-code tools
Marketplace scraper actors exist for Booking.com hotel search specifically and suit one-off pulls, but they inherit the same anti-bot and persisted-query fragility as DIY, and don't cover flights or attractions in the same tool.
Option 3: A structured Booking.com API
For a repeatable workflow across all three surfaces, a Booking.com scraping API returns normalized JSON with no browser fleet or persisted-query maintenance. Search hotels by destination and dates:
curl "https://api.crawlora.net/api/v1/booking/search?query=Tokyo&checkin=2026-09-10&checkout=2026-09-14&adults=2" \
-H "x-api-key: $CRAWLORA_API_KEY"
Pull detail and reviews for a hotel, plus a flight and attraction search, in Python:
import requests
h = {"x-api-key": "YOUR_API_KEY"}
base = "https://api.crawlora.net/api/v1"
hotels = requests.get(f"{base}/booking/search", headers=h, params={
"query": "Tokyo", "checkin": "2026-09-10", "checkout": "2026-09-14", "adults": 2,
}).json()["data"]["properties"]
hotel_id = hotels[0]["id"]
detail = requests.get(f"{base}/booking/hotel-detail", headers=h, params={"hotel_id": hotel_id}).json()["data"]
reviews = requests.get(f"{base}/booking/reviews", headers=h, params={"hotel_id": hotel_id, "hotel_country_code": "jp", "limit": 20}).json()["data"]
flights = requests.get(f"{base}/booking-flights/search", headers=h, params={
"from": "NRT", "to": "LAX", "depart": "2026-09-10",
}).json()["data"]
attractions = requests.get(f"{base}/booking-attractions/search", headers=h, params={
"query": "Tokyo", "start_date": "2026-09-10",
}).json()["data"]
A hotel search result is normalized JSON (real fields — check the docs):
{
"code": 200,
"msg": "OK",
"data": {
"destination": "Tokyo",
"results_count": 1842,
"properties": [
{
"id": 201234,
"slug": "example-hotel-tokyo",
"name": "Example Hotel Tokyo",
"location": "Shinjuku, Tokyo",
"star_rating": 4,
"review_score": 8.6,
"review_count": 3120,
"price": 148,
"currency": "USD",
"url": "https://www.booking.com/hotel/jp/example-hotel-tokyo.html"
}
]
}
}
Hotel detail adds rooms, facilities, highlights, house_rules, and rating_scores (a breakdown by category — cleanliness, location, value); reviews return per-review positive_text/negative_text, score, stay_status, room_type, and reviewer_country. Store one row per hotel per date pulled, and re-run on a schedule to track price and availability.
What you can collect
Public hotel data: search results (id, name, location, star rating, review score, price); hotel detail (rooms, facilities, highlights, house rules, rating breakdown, photos); guest reviews (score, positive/negative text, stay dates, traveler type, country). Flight data: fare offers by route and date, autocomplete for origins/destinations. Attractions data: things-to-do search by destination and dates, product detail, and reviews. Public listing and review data only.
Limitations and common challenges
- Requires real anti-bot handling. Booking.com's JS-challenge shell means a naive HTTP client won't reach content — budget for browser-shaped transport, not just headers.
- No self-serve official API. The Demand API is Affiliate-Partner-only with a commission relationship — not a fit for a research or monitoring product.
- Rates change by date, room type, and occupancy. A single snapshot only covers the dates and party size you searched — re-pull per date range you care about.
- Three separate surfaces. Hotels, flights, and attractions don't share ids or a schema — treat them as three integrations even within one platform.
- Public data only. This collects what's publicly listed — never a way to complete or manipulate an actual booking.
Where this gets used
- Hotel price and availability monitoring — track a property's rate and occupancy over time.
- Review and reputation analysis — aggregate guest sentiment by hotel or destination.
- Trip-planning and itinerary tools — combine hotel, flight, and attraction data for one destination.
Sources
Start collecting
Try it first, free: run any public URL through the Free Web Scraper, or check whether a site blocks bots with the Anti-Bot Checker — no signup.
Test the search and hotel-detail endpoints in the Playground, check the schema in the API docs, and review pricing. Booking.com covers where to stay; how to scrape Airbnb covers the short-term-rental side of the same trip, and how to scrape TripAdvisor covers hotels, attractions, and traveler reviews from a review-first angle. For the rest of the OTA rate-comparison set, see how to scrape Trip.com, how to scrape Agoda, and how to scrape Expedia — or the broader travel & hospitality research use case for how these fit together. See also how to choose a web scraping API and is web scraping legal.
Part of our how-to-scrape guide series — every platform we cover, in one index.
Frequently asked questions
Does Booking.com have an official API?
Yes, the Demand API — but it's gated to approved Affiliate Partners under a commission-per-booking business relationship, not a self-serve signup for research or price-monitoring use cases. A structured scraping API is the practical route for those.
Is scraping Booking.com legal?
Public listing facts (hotel name, price, star rating, review score) aren't copyrightable, but Booking.com's terms prohibit automated data extraction. Stick to public listing and review facts, respect rate limits, never bypass a login, and don't attempt to make or manipulate a booking through scraped data. Not legal advice.
Can I scrape Booking.com without getting blocked?
Booking.com fronts its pages with a JavaScript-challenge shell, so a plain HTTP client won't reach content — you need browser-shaped transport, not just realistic headers. A structured API handles this behind one key.
How do I get a hotel's rooms and reviews?
Search to get a hotel id, then call /booking/hotel-detail for rooms, facilities, and a rating breakdown, and /booking/reviews for individual guest reviews (score, positive/negative text, stay dates, traveler type, country).
Can I search flights and attractions too, not just hotels?
Yes. /booking-flights/search returns fare offers by route and date (with /booking-flights/autocomplete to resolve airports), and /booking-attractions/search returns things-to-do by destination and date range, with /booking-attractions/detail and /booking-attractions/reviews for individual products.
How often do hotel prices change?
Rates vary by date, room type, and occupancy, so a single search only reflects the party size and dates you requested. Re-pull per date range you care about, and re-run on a schedule to track availability and price movement.
What Booking.com data can I collect?
Public hotel data (search, detail, rooms, facilities, rating breakdown), guest reviews, flight fare offers, and attraction listings with reviews — public data only, never a completed or manipulated booking.