apify-booking-client
Booking.com properties, live prices, and full room-rate tables — by destination search or by hotel ID.
Python client for the rl1987/booking-api-scraper Apify Actor. No local scraping, no proxy management, no anti-bot maintenance — the Actor runs on Apify's infrastructure and this package just starts it, waits, and hands you back the dataset as plain Python dicts.
Install · Quickstart · Getting an API token · Input reference · Output fields · Error handling · Pricing · Async / long-running runs · Links
Install
pip install apify-booking-client
Requires Python 3.9+. Only dependency is requests.
Quickstart
from apify_booking_client import BookingClient
client = BookingClient(api_token="apify_api_...") # see "Getting an API token" below
items = client.run({"search": "Amsterdam", "rooms": 1, "adults": 2, "maxItems": 20})
for item in items:
print(item)
Real output from the example above (trimmed to a few fields):
{"id": 6331862, "currency": "USD", "checkin": "2026-09-23", "checkout": "2026-09-24", "url": "https://www.booking.com/hotel/nl/holiday-inn-express-amsterdam-motorkade.html?..."}
run() blocks until the Actor finishes (usually a few seconds to ~30s depending on maxItems) and returns a plain list[dict] — the Actor's dataset, one dict per result row.
Getting an API token
-
Sign up for a free account at console.apify.com.
-
Go to Settings → Integrations and copy your Personal API token.
-
Pass it to the client:
BookingClient(api_token="..."), or read it from an environment variable:import os client = BookingClient(api_token=os.environ["APIFY_TOKEN"])
Never hardcode the token in source control — use an environment variable or secrets manager.
Input reference
run() takes a single dict matching the Actor's input schema. Full/authoritative schema: the Input tab on the Actor's Apify page.
| Field | Type | Default | Description |
|---|---|---|---|
search |
str | — | Destination name, e.g. "Amsterdam". Provide search or hotel_ids, or both. |
hotel_ids |
list[int] | — | Specific Booking.com hotel IDs to scrape directly, bypassing search. |
checkin / checkout |
str (YYYY-MM-DD) |
+30 days / +1 night | Stay dates. |
rooms |
int | 1 |
Number of rooms. |
adults |
int | 2 |
Number of adult guests. |
currency |
str | "USD" |
3-letter currency code. |
sortBy |
str | "none" |
"none", "price", or "review_score". |
includeRooms |
bool | False |
Add room-type and rate-product data per property. |
includeDetails |
bool | False |
Add static details (name, star rating, facilities, address, photos). |
includeReviews |
bool | False |
Add guest reviews. |
maxItems |
int | 100 |
Maximum accommodations to return. |
Output fields
Each dict in the returned list is one row from the Actor's dataset. Common fields:
id, price, currency, checkin, checkout, url, deep_link_url, plus details/products/rooms/reviews objects when the matching include* flag is set.
Exact field availability can vary by input flags (see table above) — treat unfamiliar/missing keys as optional and use .get() rather than [...] indexing.
Error handling
from apify_booking_client import BookingClient, ApifyActorError
import requests
client = BookingClient(api_token="...")
try:
items = client.run({"search": "Amsterdam", "rooms": 1, "adults": 2, "maxItems": 20})
except ApifyActorError as e:
# The Actor run itself failed, timed out, or was aborted on the Apify side.
print(f"Actor run did not succeed: {e}")
except requests.HTTPError as e:
# Bad token, malformed input, rate limiting, etc. — an HTTP-level error
# calling the Apify API (not the Actor run).
print(f"Apify API request failed: {e}")
ApifyActorError is raised when the run reaches a terminal non-success status (FAILED, TIMED-OUT, ABORTED) or doesn't finish within timeout_secs (default 300s — raise it for run() calls with a large maxItems, e.g. BookingClient(api_token="...", timeout_secs=900)).
Pricing
Pay-per-event: $0.001/search result, $0.001/hotel-details row, $0.0001/room option, $0.0001/review. No subscription — see the Actor's pricing tab for current rates. Apify also includes a free monthly usage tier that covers light use.
Advanced: longer timeouts & polling
client = BookingClient(api_token="...", timeout_secs=900) # allow up to 15 min
items = client.run(actor_input, poll_interval_secs=3.0) # poll less aggressively
Links
- Booking.com API Scraper on Apify — Actor page, input schema, pricing
- PyPI package
- Apify API reference — what this client wraps under the hood
License
MIT
Metadata
Release files for apify-booking-client 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| apify_booking_client-0.1.1.tar.gz | 7.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| apify_booking_client-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 14.6 kB
Release files / apify_booking_client-0.1.1.tar.gz
| Download URL | apify_booking_client-0.1.1.tar.gz |
|---|---|
| Size | 7.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
79f8d7f66c1592a2f6a19bb14995d51e075a0b1acc9325cd73c02212d21a33ba
|
|
BLAKE2b-256 checksum How to use checksums |
1c7df374984eef075284142880e8c7ae10feff95382b6e8d8115d5a42f32c0f6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.0
|
Release files / apify_booking_client-0.1.1-py3-none-any.whl
| Download URL | apify_booking_client-0.1.1-py3-none-any.whl |
|---|---|
| Size | 7.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7d7ea2f1f0a60c0f8e4c818a54a5fd158f40d4c9e74b5b0f68f7041314778e65
|
|
BLAKE2b-256 checksum How to use checksums |
36df5c2e853a8086e4d0f292a879c7be27d6b26f9d2816601d1a7e03285512bc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.0
|