# Booking.com Reviews Scraper (`valiant_quarter/booking-reviews-scraper`) Actor

Booking.com hotel reviews in every language: liked and disliked text, title, 1-10 score, guest name, country and traveler type, room, stay dates and nights, photos, the property's reply, and the hotel's category scores. Newest first, with a date floor for cheap incremental runs.

- **URL**: https://apify.com/valiant_quarter/booking-reviews-scraper.md
- **Developed by:** [valiant quarter](https://apify.com/valiant_quarter) (community)
- **Categories:** Travel
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$2.00 / 1,000 results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Booking.com Reviews Scraper

Scrape guest reviews of any hotel on [Booking.com](https://www.booking.com) in every language: what guests liked and disliked, the review title, the 1-10 score, guest name, country and traveler type, room, check-in and check-out dates, nights, photos, helpful votes, the property's reply, plus the hotel's own category scores (staff, cleanliness, location...). Newest first, with a date floor for cheap incremental runs.

Fast and light: it uses the same API the "Read all reviews" dialog on Booking.com uses, over plain HTTPS, with no browser. A full scan of a hotel with ~1,800 reviews takes about 85 requests; an incremental run with `dateFrom` takes one or two.

Typical uses: reputation monitoring and reply tracking, sentiment analysis on liked/disliked text, competitor benchmarking.

### Input

```json
{
  "startUrls": [{ "url": "https://www.booking.com/hotel/tr/pirate-s-beach-club.html" }],
  "maxReviewsPerHotel": 0,
  "dateFrom": "8 days",
  "proxyConfiguration": { "useApifyProxy": true, "apifyProxyGroups": ["RESIDENTIAL"], "apifyProxyCountry": "DE" }
}
```

| Field | Default | Notes |
|---|---|---|
| `startUrls` | — | Hotel pages `https://www.booking.com/hotel/<cc>/<name>.html`; query strings and language suffixes (`.en-gb`) are ignored |
| `maxReviewsPerHotel` | `0` | Newest reviews first; `0` = all (Booking lists the last 36 months) |
| `dateFrom` / `dateTo` | — | `YYYY-MM-DD`, full ISO date, or relative (`8 days`, `3 months`). Paging stops at `dateFrom`. `cutoffDate` is accepted as an alias of `dateFrom` |
| `proxyConfiguration` | Apify RESIDENTIAL, DE | See below |
| `transport` | `auto` | `auto` / `http` / `browser`, see "Browser fallback" |
| `maxRotations` | `10` | How often a hotel scan may switch to a fresh IP after a block before it gives up |
| `escalateAfter`, `browserEntry`, `httpUserAgent` | `3`, `light`, — | Advanced / diagnostics for the browser fallback |

### Output

One row per review:

| Field | Description |
|---|---|
| `id` | Booking's review id (16 hex characters) |
| `reviewTitle`, `likedText`, `dislikedText`, `reviewLanguage` | review content in the original language; an untitled review carries the score word Booking shows instead (`Exceptional`, `Very good`...) |
| `rating` | 1-10 |
| `reviewDate` | exact timestamp, ISO 8601 (UTC) |
| `userName`, `userLocation`, `userAvatar`, `travelerType` | guest details as shown |
| `roomInfo`, `stayRoomId`, `checkInDate`, `checkOutDate`, `numberOfNights` | stay details |
| `images`, `helpfulVotes` | review photos (1280 px), votes |
| `propertyResponse` | the property's reply, or `null` |
| `hotelId`, `hotelRating`, `hotelReviews`, `hotelRatingScores`, `totalCategoryReviews` | the hotel: id, overall score, review count, category scores `[{ name, codeName, score }]` |
| `reviewPage`, `startUrl`, `reviewsScoreFilter` | page of the list, the input URL, `ALL` |

A run summary is saved to the key-value store as `SUMMARY`: per hotel the review count of the list, reviews fetched and stored, whether the scan was complete, requests and rotations.

### Proxy

Residential proxies are recommended. Each hotel keeps one sticky session; a flagged session is replaced by a new IP (with an Apify Proxy country set, later sessions cycle through NL, GB, AT and FR). Booking's review API answered from TR, US, RU, IN and DE exits alike. Without a proxy (switch Apify Proxy off) the actor works from a normal home or office connection.

### Browser fallback

Booking's review API needs no browser today. In case it ever starts asking for a bot-protection token, the actor ships a browser build: `Dockerfile.browser` (Apify's Playwright image plus Camoufox, a Firefox build with a consistent fingerprint). In that build, `transport: auto` switches to the browser after `escalateAfter` flagged HTTP sessions in a row and `transport: browser` uses it from the start. The default build (`Dockerfile`, a small Node image that starts in about a second) is HTTP-only: there `auto` stays on HTTPS and `browser` is refused with a clear message. To publish the browser build, point `dockerfile` in `.actor/actor.json` at `../Dockerfile.browser`.

### Behaviour worth knowing

- **36-month window.** Booking lists reviews from the last 36 months only.
- **The list Booking serves varies.** Booking's replicas disagree by a review or two, so every page re-reads the last 3 items of the previous one (ids dedupe). Booking also includes or leaves out rating-only reviews (no text) from one request to the next; a scan is "complete" relative to the list served at that moment.
- **Fresh replies flicker.** A property reply posted a few hours ago is served by only some replicas; it shows up on a later run.
- **Silent refusals** (an empty first page for a hotel that has reviews, or an empty page far before the list's own count) are treated as a block: the actor rotates and looks again.
- When your run's maximum charge is reached the actor stops cleanly, keeps what was stored and says so in the status message.

### Tests

`npm test` runs an offline suite (mapping against real review cards, API parsing, the scan loop with blocks, rotations and the charge limit, the transport switch).

Only publicly visible reviews are collected; no login is used.

# Actor input Schema

## `startUrls` (type: `array`):

Booking.com hotel pages, e.g. https://www.booking.com/hotel/tr/pirate-s-beach-club.html . The country code and the page name in the path are what counts; query strings and language suffixes (.en-gb) are ignored.

## `maxReviewsPerHotel` (type: `integer`):

Stop after this many reviews per hotel (newest first). 0 = all reviews Booking lists (the last 36 months).

## `dateFrom` (type: `string`):

Only reviews written on or after this (YYYY-MM-DD, full ISO date, or relative such as '8 days' / '3 months'). Paging is newest first and stops once it passes this date, so an incremental run costs one or two requests. Empty = full history.

## `dateTo` (type: `string`):

Only reviews written on or before this (YYYY-MM-DD = the whole day, full ISO date, or relative). Empty = no upper bound.

## `proxyConfiguration` (type: `object`):

Residential proxies are recommended. Each hotel keeps one sticky session; a flagged session is replaced by a new IP, and with an Apify Proxy country set, later sessions cycle through NL, GB, AT and FR. Booking's review API answered from TR, US, RU, IN and DE exits alike. To run without a proxy, switch Apify Proxy off.

## `transport` (type: `string`):

auto = plain HTTPS first, then a Camoufox browser if the gateway keeps turning HTTP clients away. http = HTTPS only. browser = Camoufox only. The browser needs the browser build of this actor (Dockerfile.browser); in the default HTTP-only build, auto stays on HTTPS and browser is refused.

## `maxRotations` (type: `integer`):

How many times a hotel scan may switch to a fresh IP / browser after a block or a network error before it gives up.

## `escalateAfter` (type: `integer`):

Transport auto (browser build): this many flagged HTTP sessions in a row switch the rest of the run to the browser.

## `browserEntry` (type: `string`):

Browser transport only. light = start on robots.txt (5 KB, not behind the WAF) and fall back to a hotel page if the gateway turns the browser away. hotel = clear the AWS WAF through the hotel page up front (2-8 MB).

## `httpUserAgent` (type: `string`):

Diagnostics: replaces the generated Firefox User-Agent of the HTTP transport.

## Actor input object example

```json
{
  "startUrls": [
    {
      "url": "https://www.booking.com/hotel/tr/pirate-s-beach-club.html"
    }
  ],
  "maxReviewsPerHotel": 0,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ],
    "apifyProxyCountry": "DE"
  },
  "transport": "auto",
  "maxRotations": 10,
  "escalateAfter": 3,
  "browserEntry": "light"
}
```

# Actor output Schema

## `items` (type: `string`):

One item per review (JSON)

## `summary` (type: `string`):

Per hotel: total on Booking, fetched, emitted, completeness, requests, rotations; run level: requests, identities, wire bytes, transport

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "startUrls": [
        {
            "url": "https://www.booking.com/hotel/tr/pirate-s-beach-club.html"
        }
    ],
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ],
        "apifyProxyCountry": "DE"
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("valiant_quarter/booking-reviews-scraper").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "startUrls": [{ "url": "https://www.booking.com/hotel/tr/pirate-s-beach-club.html" }],
    "proxyConfiguration": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
        "apifyProxyCountry": "DE",
    },
}

# Run the Actor and wait for it to finish
run = client.actor("valiant_quarter/booking-reviews-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "startUrls": [
    {
      "url": "https://www.booking.com/hotel/tr/pirate-s-beach-club.html"
    }
  ],
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ],
    "apifyProxyCountry": "DE"
  }
}' |
apify call valiant_quarter/booking-reviews-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,valiant_quarter/booking-reviews-scraper"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/kF7oByU7vqKrxCgsA/builds/ke7Uzs4m996CUUrqT/openapi.json
