Skip to main content

Booking Scraper API (Python)

A Python client for pulling hotel rate data off Booking.com search pages, built on the ScrapingBee web scraping API. Give it a destination and a pair of dates, and it returns a list of properties with name, nightly price, review score, and location as JSON. Rendering, residential proxies, and field extraction are handled on ScrapingBee's side.

Booking.com is one of the more defended travel sites, with heavy JavaScript and anti-bot challenges, so a direct request rarely returns usable data. This Booking scraper renders each search in a real browser and routes it through residential proxies, with a one-flag escalation to Stealth mode for pages that sit behind a challenge.

Install

pip install booking-scraper-api

Quickstart

from booking_scraper_api import BookingScraper

scraper = BookingScraper(api_key="YOUR_SCRAPINGBEE_API_KEY")

result = scraper.search(
    destination="Rome, Lazio, Italy",
    checkin="2026-10-25",
    checkout="2026-10-26",
    adults=2,
    rooms=1,
)
for hotel in result["hotels"]:
    print(hotel["name"], hotel["price"], hotel["score"])

New accounts get 1,000 free credits at ScrapingBee, no card needed.

Returned data

search() returns a dictionary with a hotels list, one entry per property card:

{
  "hotels": [
    {
      "name": "Hotel Example Roma",
      "price": "€180",
      "score": "8.9",
      "location": "Trevi, Rome"
    }
  ]
}

The fields map to the CSS selectors from ScrapingBee's data extraction rules; pass your own extract_rules to pull amenities, room types, or photos as well.

Methods and options

  • search(destination, checkin, checkout, adults=2, rooms=1, offset=0, **options) returns structured hotels for one results page. Booking.com pages in steps of 25, so offset=25 is page two.
  • scrape(url, extract_rules=None, **options) fetches any Booking.com URL, returning HTML or JSON.

Options that override the defaults:

Option Default Purpose
render_js True Render the page in a headless browser
premium_proxy True Route through residential proxies
stealth_proxy False Escalate to Stealth mode for anti-bot pages
country_code "us" Proxy country
wait 5000 Milliseconds to wait after load

When Booking blocks a plain request

If a search returns empty or a challenge page, set stealth_proxy=True. Stealth mode is built for aggressive anti-bot defenses and forces JavaScript rendering:

result = scraper.search("Paris", "2026-11-10", "2026-11-12", stealth_proxy=True)

Credit cost

With residential proxies and JavaScript rendering, each request costs 25 ScrapingBee credits. A Stealth request costs 75. See ScrapingBee pricing for the full table before you scale.

Requirements and scope

Python 3.8 or newer and a ScrapingBee API key. This is an independent wrapper on the public ScrapingBee API, not affiliated with Booking.com, and it targets public search pages only.

Links

License

MIT

Metadata

Release files for booking-scraper-api 0.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for booking-scraper-api 0.0.1
File Size Uploaded
booking_scraper_api-0.0.1.tar.gz 5.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for booking-scraper-api 0.0.1
File Interpreter ABI Platform
booking_scraper_api-0.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 10.8 kB

Release files / booking_scraper_api-0.0.1.tar.gz

Download URL booking_scraper_api-0.0.1.tar.gz
Size 5.2 kB
Tags Source
SHA-256 checksum
How to use checksums
f09c827eef46b89bf8429a13678f03d9964424c670986af4235d7a62efc47643
BLAKE2b-256 checksum
How to use checksums
e34c50e49d63005bc3c9c64cbdf4c42c872a3911f2dd35c13f9af2fdab230e7e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.3

Release files / booking_scraper_api-0.0.1-py3-none-any.whl

Download URL booking_scraper_api-0.0.1-py3-none-any.whl
Size 5.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e4514ba5a8a4ff46f56abe3db39cf8a3e02b7cfd31de0c44dfa37d0f7eebf201
BLAKE2b-256 checksum
How to use checksums
c9be1d066e917448d7e6ea84f6ec6e093b820cc1867a17463d5302709dbba8fc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.3

Release history Release notifications | RSS feed

This release

0.0.1 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page