# Booking Hotel Scraper (`scrapeai/booking-hotel-scraper`) Actor

It extracts hotel name, location, price per night, star rating, guest rating, review count, amenities, room types, images, and property description by navigating search results and visiting individual hotel detail pages. Suitable for price monitoring, hotel dataset creation, and market analysis.

- **URL**: https://apify.com/scrapeai/booking-hotel-scraper.md
- **Developed by:** [ScrapeAI](https://apify.com/scrapeai) (community)
- **Categories:** Travel, Automation, Developer tools
- **Stats:** 15 total users, 2 monthly users, 100.0% runs succeeded, 1 bookmarks
- **User rating**: 5.00 out of 5 stars

## Pricing

$5.00/month + usage

To use this Actor, you pay a monthly rental fee to the developer. The rent is subtracted from your prepaid usage every month after the free trial period. You also pay for the Apify platform usage, which gets cheaper the higher Apify subscription plan you have.

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

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## 🏨 Booking.com Hotel Scraper

A powerful Apify Actor that scrapes hotel listings from [Booking.com](https://www.booking.com) search results.
It performs **HTML content tag-based data extraction** in two stages:

1. **Search Page** — extracts property cards and queues detail URLs
2. **Detail Page** — extracts full description, amenities, and review data

***

### ✅ Use Cases

- 🔍 Scrape hotels in any city for a given date range and guest count
- 📊 Compare hotel prices, star ratings, and review scores
- 🏖️ Extract full amenity lists and property descriptions
- 📋 Build travel comparison datasets

***

### 📥 Input Configuration

```json
{
  "startUrls": [
    {
      "url": "https://www.booking.com/searchresults.html?ss=Chennai&checkin=2026-02-18&checkout=2026-02-24&group_adults=2&no_rooms=1&group_children=0"
    }
  ],
  "ss": "Chennai",
  "checkin": "2026-02-18",
  "checkout": "2026-02-24",
  "group_adults": 2,
  "no_rooms": 1,
  "group_children": 0,
  "maxItems": 50,
  "scrollTimeout": 40,
  "proxy": {
    "useApifyProxy": true,
    "apifyProxyGroups": ["RESIDENTIAL"]
  },
  "debugMode": false
}
```

#### 🧾 Fields Explained

| Field | Type | Description |
|-------|------|-------------|
| `startUrls` | array | Booking.com search result URLs. If provided, individual parameters below are ignored. |
| `ss` | string | Destination city (e.g. `"Chennai"`). Used when no `startUrls` are provided. |
| `checkin` | string | Check-in date in `YYYY-MM-DD` format |
| `checkout` | string | Check-out date in `YYYY-MM-DD` format |
| `group_adults` | integer | Number of adult guests |
| `no_rooms` | integer | Number of rooms required |
| `group_children` | integer | Number of child guests |
| `maxItems` | integer | Maximum number of hotel detail pages to scrape |
| `scrollTimeout` | integer | Seconds to scroll the search page to load more results |
| `proxy` | object | Proxy configuration |
| `debugMode` | boolean | Save debug screenshots and verbose logs |

***

### 🔗 URL Structure

The scraper supports direct Booking.com search URLs:

```
https://www.booking.com/searchresults.html?ss=Chennai&checkin=2026-02-18&checkout=2026-02-24&group_adults=2&no_rooms=1&group_children=0
```

| Parameter | Description |
|-----------|-------------|
| `ss` | Destination / city name |
| `checkin` | Check-in date |
| `checkout` | Check-out date |
| `group_adults` | Number of adults |
| `no_rooms` | Number of rooms |
| `group_children` | Number of children |

***

### 📤 Output

Each record saved to the dataset contains:

```json
{
  "dataType": "hotel",
  "hotel_name": "The Leela Palace Chennai",
  "location": "MRC Nagar, Chennai",
  "price_per_night": "₹ 110,860",
  "rating": 5,
  "review_score": 9.1,
  "review_label": "Rated superb",
  "review_count": "2,265 reviews",
  "description": "Nestled along the Coromandel Coast...",
  "amenities": [
    "Free Wi-Fi",
    "Swimming Pool",
    "Spa",
    "Fitness Center",
    "Restaurant"
  ],
  "thumbnail": "https://cf.bstatic.com/...",
  "hotel_url": "https://www.booking.com/hotel/in/leela-palace-chennai.html",
  "scrapedAt": "2026-02-19T10:00:00.000Z"
}
```

#### 📋 Output Schema

| Field | Type | Description |
|-------|------|-------------|
| `dataType` | string | Always `"hotel"` |
| `hotel_name` | string | Hotel / property name |
| `location` | string | Address or area |
| `price_per_night` | string | Displayed nightly price with currency |
| `rating` | integer | Star rating (1–5), counted from SVG icons |
| `review_score` | number | Guest review score (e.g. `9.1`) |
| `review_label` | string | Textual rating (e.g. `"Rated superb"`) |
| `review_count` | string | Number of reviews (e.g. `"2,265 reviews"`) |
| `description` | string | Full property description |
| `amenities` | array | List of facilities |
| `thumbnail` | string | Thumbnail image URL |
| `hotel_url` | string | Booking.com hotel detail page URL |
| `scrapedAt` | string | ISO 8601 scrape timestamp |

***

### 🔒 Proxy Configuration

```json
{
  "useApifyProxy": true,
  "apifyProxyGroups": ["RESIDENTIAL"]
}
```

Residential proxies are recommended to avoid Booking.com's anti-bot measures.

***

### 🛠️ Tech Stack

- 🧩 **Apify SDK** — actor and dataset handling
- 🕷️ **Crawlee** — crawling and request queue management
- 🌐 **Puppeteer** — headless browser automation
- ⚙️ **Node.js** — fast, scalable backend

# Actor input Schema

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

Provide one or more Booking.com search result URLs. If set, individual search parameters below are ignored.

## `ss` (type: `string`):

City or destination name (e.g. 'Chennai'). Used when no startUrls are provided.

## `checkin` (type: `string`):

Check-in date in YYYY-MM-DD format (e.g. 2026-02-18)

## `checkout` (type: `string`):

Check-out date in YYYY-MM-DD format (e.g. 2026-02-24)

## `group_adults` (type: `integer`):

Number of adult guests

## `no_rooms` (type: `integer`):

Number of rooms required

## `group_children` (type: `integer`):

Number of child guests

## `maxItems` (type: `integer`):

Maximum number of hotel detail pages to scrape from the search results

## `scrollTimeout` (type: `integer`):

Number of seconds to scroll the search results page to load more hotels

## `proxy` (type: `object`):

Use Apify Proxy or provide your own proxy servers

## `debugMode` (type: `boolean`):

Enable to save debug screenshots and detailed logs

## Actor input object example

```json
{
  "ss": "Chennai",
  "group_adults": 2,
  "no_rooms": 1,
  "group_children": 0,
  "maxItems": 5,
  "scrollTimeout": 40,
  "proxy": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  },
  "debugMode": false
}
```

# 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 = {};

// Run the Actor and wait for it to finish
const run = await client.actor("scrapeai/booking-hotel-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 = {}

# Run the Actor and wait for it to finish
run = client.actor("scrapeai/booking-hotel-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 '{}' |
apify call scrapeai/booking-hotel-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,scrapeai/booking-hotel-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/XH2y3YQ3VwVPvUaM9/builds/AVMLu8AaM3h89KCRS/openapi.json
