Booking.com Scraper or API: What You Get
A Booking.com scraper is code that builds search URLs for a place and a set of dates, loads the results and hotel pages, and pulls names, prices, scores and rooms out of the HTML. You maintain the URL building, the parsing and the scheduling yourself. The alternative is 11 Booking.com endpoints that return the same data as JSON for 1 credit a call. This post compares the two on recorded Paris calls, works out the cost per hotel tracked, and gives a verdict per use case.
What would a Booking.com scraper have to do?
A Booking.com scraper has four jobs: build the right search URL for each place, date pair and party, parse the results page into hotels and prices, parse each hotel page into rooms and scores, and notice when any of those parsers starts returning less than it did yesterday. Each is code you write once and repair whenever the page it depends on changes, which on a large consumer site happens as features ship.
The URL builder is easy to underrate. Results depend on the destination, checkin, checkout, the number of adults, children and rooms, the language and the currency, so the scraper has to set all of them deliberately or it records prices for a stay nobody asked about. The parsers then have to find each hotel's name, link, displayed price, score and address in markup that was written for people, not programs.
The operational layer is the rest: pacing requests, retrying slow pages, alerting when a run returns zero hotels for a city that had dozens, and storing results so you can compare days. Expect any high-traffic site to slow, challenge or block automated traffic at volume; if that happens, stop rather than work around it. Read Booking.com's terms before you build a collector. Airbnb Scraper or API covers the same trade-off for short-term rentals.
Why do dates and guests multiply the work?
Hotel prices are not a property of a hotel; they are a property of a stay. The same room has a different price for a Friday arrival than a Tuesday one, for two adults than for a family, and for three nights than for one. Any job that watches prices is really watching a grid of hotels × check-in dates × party sizes, and every cell is a separate request for a scraper and a separate call for an API.
That grid is what decides cost on either route. A revenue manager watching 30 competitors over the next 60 arrival dates for two adults needs 1,800 hotel-date prices a day. A scraper has to fetch and parse enough pages to fill that grid without being slowed or blocked. On the endpoints, the question becomes how many cells one call fills: a city-level prices call returns many hotels for one date pair, while a rooms call returns one hotel for one date pair. The next sections use the recordings to put numbers on both.
What do the Booking.com endpoints return?
The Booking.com API has 11 endpoints, all 1 credit per successful call, covering the same ground a scraper would: finding hotels, pricing them for dates, describing one property and reading its reviews. All except bulk-prices are GET requests; that one is a POST that takes a list of searches. Every response is JSON with named fields, so there is no HTML for you to parse.
| Job | Endpoint | Parameters you'll set first |
|---|---|---|
| Find a place | GET /v1/booking/destinations |
q |
| List hotels | GET /v1/booking/search, GET /v1/booking/search-by-url |
ss and dates; or a results url |
| Price a city for dates | GET /v1/booking/prices |
ss, checkin, checkout (required), dest_id, dest_type, group_adults |
| Price many searches | POST /v1/booking/bulk-prices |
searches (list) |
| Rooms for one hotel | GET /v1/booking/rooms |
url, or country and slug, plus dates and guests |
| Describe one hotel | GET /v1/booking/hotel, facilities, photos |
url, or country and slug |
| Judge quality | GET /v1/booking/reviews, review-scores |
url, or country and slug; reviews also take page, limit, sort |
dest_type accepts city, region, district, hotel, landmark or airport, and sort on reviews accepts recent_desc, recent_asc, score_desc or score_asc. The prices endpoint page and the bulk prices endpoint page show each parameter with a playground.
A recorded prices call: Paris, three nights, two adults
This request prices Paris for 20 to 23 November 2026 for two adults, with the destination pinned by dest_id and dest_type:
curl "https://api.perceptlayer.com/v1/booking/prices?ss=Paris&checkin=2026-11-20&checkout=2026-11-23&group_adults=2&dest_id=-1456928&dest_type=city" \
-H "X-API-Key: $API_KEY"
The recorded response, trimmed to two hotels:
{
"success": true,
"data": {
"title": "Booking.com: hotels in Paris",
…
"prices": [
{
"name": "Royal Saint Michel",
"url": "https://www.booking.com/hotel/fr/royal-saint-michel.html",
"price": "$351.05",
"review_score": "8.8",
"location": "3 Boulevard Saint Michel, Paris",
"image": "https://cf.bstatic.com/xdata/images/hotel/square240/560523800.jpg?…"
},
{
"name": "Ibis Styles Paris Batignolles",
"url": "https://www.booking.com/hotel/fr/mirific.html",
"price": "$146.46",
"review_score": "8.3",
"location": "119 Avenue De Clichy, Paris",
…
}
],
"total_prices": 25,
"parsed": true
},
"meta": {
…
"scraped_at": "2026-10-23T19:48:12+00:00",
"cached": false,
…
}
}
Two things to note before you build on it. price and review_score are strings, so convert them yourself and keep the raw value too. And meta.scraped_at records when the data was collected, which is the timestamp to store with each price.
From a price result to its rooms
The recorded rooms call used country=fr and slug=royal-saint-michel, the two parts of the first hotel's url above (/hotel/fr/royal-saint-michel.html), with the same dates:
curl "https://api.perceptlayer.com/v1/booking/rooms?country=fr&slug=royal-saint-michel&checkin=2026-11-20&checkout=2026-11-23&group_adults=2" \
-H "X-API-Key: $API_KEY"
{
"success": true,
"data": {
…
"canonical_url": "https://www.booking.com/hotel/fr/royal-saint-michel.html",
"rooms": [
{
"name": "Attic Single Room",
"price": "€ 978 € 588 Original price € 978 Current price € 588 € 326.12 × 3 nights € 978.35 Limited-time Deal - € 390.73 …",
"occupancy": "1 adult",
"beds": "1 twin bed",
"available": true
}
],
"total_rooms": 1,
"parsed": true
},
…
}
This is the candid part. The room's price is the page's price text as found, with an original price, a current price, a per-night breakdown and deal wording in one string. The endpoint saves you fetching and locating it, but you still decide which figure you want. If your job is a single comparable number per hotel and date, the city-level prices field is simpler to work with.
How do a scraper and the endpoints compare?
A scraper costs engineering time and carries terms and blocking risk; the endpoints cost credits per call and take away the fetching and the HTML parsing, though not all normalisation. The table compares them for a recurring job, such as tracking prices for a city's hotels across upcoming dates.
| DIY Booking.com scraper | Booking.com endpoints | |
|---|---|---|
| Setup | URL builder, results and hotel-page parsers, scheduler, storage, alerts | API key in the X-API-Key header |
| Inputs | Whatever query string you assemble | Named parameters: ss, checkin, checkout, group_adults, group_children, no_rooms, dest_id, dest_type, lang, currency |
| Hotels per request | One page of results | total_prices: 25 in the recorded Paris prices call |
| Price format | Whatever text the page shows | String as found: "$351.05" from prices, a text block from rooms |
| When the page changes | Your parser breaks and you fix it | You read named JSON fields |
| Blocks and slow pages | Yours to handle | A failed call returns an error code and costs 0 |
| Speed | As fast as you can fetch without being blocked | 1 request a second free, at least 5 a second paid |
| Cost | Hosting and your time | 1 credit per successful call |
What does each hotel cost to track?
On the endpoints, cost follows calls, so the question is how many hotel prices one call fills. A city-level prices call returned 25 hotels in the recording. Watching one city for the next 30 check-in dates, same stay length and party, is 30 calls × 1 credit = 30 credits a day, or 30 ÷ (30 × 25) = 0.04 credits per hotel price. Over 30 days that's 900 credits.
Watching named competitors is per hotel. Thirty hotels × 60 arrival dates through rooms is 1,800 calls × 1 credit = 1,800 credits a day, or 54,000 over 30 days: more than the Build pack's 50,000 and inside the Growth pack's 200,000. The 100 free credits on signup cover a few days of the city watch or a test of the rooms flow on a handful of hotels. See pricing for what credits cost and the credits docs for how they're debited.
A daily price log in Python
This script runs the recorded Paris call and appends one row per hotel to a CSV, reading only fields that appear in the recording. It keeps the raw price string next to a parsed number, because the string carries the currency.
import csv
import datetime
import os
import re
import requests
URL = "https://api.perceptlayer.com/v1/booking/prices"
params = {
"ss": "Paris",
"checkin": "2026-11-20",
"checkout": "2026-11-23",
"group_adults": 2,
"dest_id": -1456928,
"dest_type": "city",
}
resp = requests.get(URL, params=params, headers={"X-API-Key": os.environ["API_KEY"]}, timeout=90)
resp.raise_for_status()
body = resp.json()
data = body["data"]
scraped_at = body.get("meta", {}).get("scraped_at", datetime.datetime.now(datetime.timezone.utc).isoformat())
with open("paris-prices.csv", "a", newline="") as f:
writer = csv.writer(f)
for hotel in data.get("prices", []):
raw = hotel.get("price") or ""
amount = re.sub(r"[^0-9.]", "", raw)
writer.writerow([scraped_at, params["checkin"], params["checkout"],
hotel.get("name"), hotel.get("url"), raw, amount,
hotel.get("review_score")])
print(data.get("total_prices"), "hotels;", resp.headers.get("X-Credits-Used"), "credit(s) used")
Loop it over check-in dates for a date grid. On a 429, wait for the seconds in Retry-After before the next call; the errors docs list every code.
Which route should you choose?
Choose by the shape of your grid and what you do with the numbers, because that decides whether upkeep or per-call cost dominates. For a one-off look at a few hotels, use the website and skip both. For anything on a schedule, the verdicts below apply.
- City-level rate monitoring (how prices in a destination move by arrival date): use
priceswithdest_idanddest_type, one call per date pair. At 25 hotels a call it's 0.04 credits per hotel price. - Watching a fixed competitor set: use
roomsper hotel and date withcountryandslugfrom the hotel'surl, and budget for parsing the room price text into the figure you compare. - Quality signals next to prices: add
review-scoresper hotel, orreviewswithsort=recent_descandpage, and leave guest names out of anything you store. If scores move slowly for your hotels, a weekly run may be enough. - Comparing sites, not just hotels: Hotel API: Expedia, Booking.com and Google Hotels puts the sources side by side, and Expedia Scraper or API runs the same trade-off for Expedia.
- An agent planning trips: give it the Booking.com endpoints through the MCP server, as the AI agents docs describe, so it calls
pricesinstead of browsing pages.
To check the fields against your own destination and dates, run prices in the playground on the Booking.com API page, then get a free API key when they fit. The travel APIs page lists the other travel sources.
APIs in this post
Frequently asked questions
Is scraping Booking.com allowed?
That depends on Booking.com's terms of use and the law where you operate, so read the terms and get legal advice for commercial use. Don't get around blocks, challenges or other protections. Hotel facts such as names, prices and scores carry less risk than personal data; leave guests' and reviewers' names out of anything you keep.
How many hotels does one Booking.com prices call return?
The recorded Paris call for three nights and two adults returned total_prices: 25, each with name, url, price, review_score, location and image. It cost 1 credit. The count for your destination and dates may differ, so run the call in the playground before you size a budget.
Why is the price a string and not a number?
The endpoints return data as found at the time of the call, and the recorded prices include a currency symbol. The recorded prices call returned "$351.05", and the recorded rooms call returned the page's full price text. Keep the raw string, parse the figure you need, and store the currency next to it.
Does a failed Booking.com call cost credits?
No. Only a successful response debits credits. A failed call returns an HTTP status and a JSON error with a code, a message and a request_id, plus X-Credits-Used: 0. A rate-limited call returns 429 with a Retry-After header giving the seconds to wait.
How fast can I run a daily date sweep?
Limits are per account, shared by all its keys, and counted per minute. A free account gets 1 request a second (60 a minute), so a 30-call city sweep finishes in about half a minute. Paying accounts run at least 5 requests a second (300 a minute). The rate limits docs list the rate each pack includes.