This repository calls a paid Apify Actor built by Flatrow Data Studio (the author). Links to apify.com carry the author's affiliate code: the author may earn a commission if you sign up to Apify through them, at no extra cost to you.
A small Booking.com scraper in Python. scrape.py searches Booking.com for one or more destinations and a stay and saves one row per property to CSV: total price of the stay, taxes and fees shown as excluded, strike-through price, review score out of 10, review count, stars, property type, neighbourhood, coordinates and link. monitor_prices.py turns the same search into a hotel price tracker that returns only the price drops, price rises and new properties since its previous run.
Both scripts run the Booking.com Hotels Scraper & Price Tracker on Apify through the official apify-client package: the Actor runs in Apify's cloud and returns clean rows, so there is no browser, HTML parsing or proxy to maintain on your side. No login, no cookies, and no personal data: nothing about guests or reviewers is collected.
- Rate shopping for hoteliers and revenue managers: what the hotels around you charge for the same stay.
- Hotel price monitoring: a daily cron job that prints the properties whose total price dropped or rose.
- Accommodation datasets: hotels, apartments and hostels of a city with stars, review scores and coordinates, ready for pandas, Excel or a map.
- Compare destinations: the same stay in Paris, Rome and Barcelona in one run.
You need Python 3.11 or later and a free Apify account (the free plan includes monthly credit).
git clone https://github.com/flatrow-data-studio/booking-scraper-python.git
cd booking-scraper-python
python3 -m venv .venv && source .venv/bin/activate
pip install -r requirements.txt
export APIFY_TOKEN="<your-apify-token>" # Apify Console > Settings > API & Integrations# Properties in Lisbon for 20-23 November 2026, 2 adults, prices in EUR
python scrape.py "Lisbon, Portugal" --check-in 2026-11-20 --check-out 2026-11-23 --max-results 60
# Hotels only, cheapest first, in three cities, 20 per city, a 3-night stay starting in 30 days
python scrape.py "Paris, France" "Rome, Italy" "Barcelona, Spain" --hotels-only --sort price --max-results 20The script writes booking_hotels.csv (change it with --output) and prints the five cheapest stays. Without --check-in / --check-out it searches a stay that starts 30 days from today for 3 nights (--check-in-days, --nights), so the command never expires. Other options: --adults, --currency (EUR by default), --min-score 8 for properties rated 8 or more out of 10, and --max-charge 0.50 to stop a run once it has cost 50 cents; python scrape.py --help lists them all.
python monitor_prices.py "Lisbon, Portugal" --hotels-only --check-in-days 30 --nights 3The first run records the total price of every property as the reference (they all come back as new). From the second run on, only the new properties and the properties whose total changed are returned, with previousPrice, priceDelta and priceDeltaPercent; they are printed and appended to booking_price_changes.csv. The reference lives in a key-value store of your Apify account (--store, booking-price-monitor by default), so the script can run from cron on any machine:
0 7 * * * cd /path/to/booking-scraper-python && .venv/bin/python monitor_prices.py "Lisbon, Portugal" --hotels-only >> tracker.log 2>&1Keep the same destination, stay, guests, filters and currency from run to run: changing them starts a new reference.
One real row from a Lisbon search (EUR, 20–23 November 2026, 2 adults), key columns only:
{
"platformListingId": "2628938",
"title": "Villa Baixa - Lisbon Luxury Apartments",
"propertyType": "Aparthotel",
"city": "Lisboa",
"checkIn": "2026-11-20",
"checkOut": "2026-11-23",
"currency": "EUR",
"priceTotal": 637.43,
"taxesAndFees": 62.25,
"rating": 9.6,
"reviewCount": 874,
"starRating": 4
}scrape.py writes these columns; lists such as badges are written as JSON text.
| Column | Meaning |
|---|---|
platformListingId |
Booking.com property id |
title |
Property name |
propertyType |
Hotel, Apartment, Aparthotel, Hostel... |
city |
City |
region |
Neighbourhood or district |
checkIn |
Check-in date of the quoted stay |
checkOut |
Check-out date of the quoted stay |
nights |
Nights of the stay |
currency |
Currency of every price |
pricePerNight |
Average price per night |
priceTotal |
Total price of the stay |
priceBeforeDiscount |
Strike-through price of a deal |
taxesAndFees |
Taxes and fees Booking.com shows as excluded |
rating |
Review score out of 10 |
reviewCount |
Number of reviews |
starRating |
Official stars |
cancellationPolicy |
free_cancellation when offered |
badges |
Deals such as Limited-time Deal |
latitude |
Latitude |
longitude |
Longitude |
searchLocation |
The destination of your search that found the property |
url |
Property link with your dates and guests |
The dataset of each run has more columns (photo, country, bedrooms and beds of apartments, search rank...): add their names to COLUMNS in scrape.py. The full list is on the Actor page.
The Actor is pay-per-event: from $2.50 per 1,000 properties on Apify's Free plan, lower on paid plans, with compute and proxies included. Apify's free monthly credit of $5 covers about 1,999 properties. You pay per property saved and nothing else; --max-results caps every destination of a run, and in price-tracking mode only the new and changed properties are saved and charged.
Do I need to write a scraper or run a browser? No. The Actor runs in Apify's cloud and is kept up to date when Booking.com changes its site; your script receives JSON rows.
Can I paste a Booking.com search URL with my filters? Yes: the Actor also takes startUrls, search URLs copied from your browser. Put them in run_input in place of locations in build_input; the Actor page documents every input field.
Is there personal data in the output? No. Rows contain property facts (business names), the average score and the number of reviews; nothing about guests or reviewers. Use the data for analysis, respect Booking.com's terms and the law of your country, and do not republish listings.
Other Python examples by Flatrow Data Studio, all with a CSV export and a price tracker:
- airbnb-scraper-python: Airbnb listings, nightly and total prices, ratings and availability.
- google-hotels-scraper-python: Google Hotels prices, with every booking site's rate.
- amazon-scraper-python: Amazon product prices, ratings and price drops.
- aliexpress-scraper-python: AliExpress product prices, units sold and shipping.
- ebay-scraper-python: eBay listing prices, condition and units sold.
MIT, see LICENSE. Booking.com is a trademark of its owner; this project is not affiliated with Booking.com.