# Simple Booking Scraper (`w3crawler/simple-booking-scraper`) Actor

Extract public Booking.com accommodation listings, ratings, room offers, prices, addresses, and images from supplied pages.

- **URL**: https://apify.com/w3crawler/simple-booking-scraper.md
- **Developed by:** [w3crawler](https://apify.com/w3crawler) (community)
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.99 / 1,000 accommodations

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

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

Extract normalized accommodation details from public Booking.com hotel and search pages. The Actor reads public HTML and embedded structured data only; it does not sign in, submit bookings, call private APIs, solve CAPTCHAs, or bypass access controls.

### What it returns

Each dataset row represents one accommodation and can include:

- Name, description, canonical Booking.com URL, guest score, star class, and review count
- Public check-in and check-out information
- Visible room types, beds, occupancy, availability, prices, currencies, and features
- Public address, coordinates, and Booking.com or bstatic image URLs
- `requestedUrl`, final `sourceUrl`, `proxyConfigured`, and `scrapedAt` provenance

Missing source values are omitted. The Actor never invents prices or availability. Booking.com content varies by locale, dates, and source-page experiments, so results are research data rather than a reservation quote.

### Input

Provide one to 20 public HTTPS Booking.com hotel or search-result URLs. Runs are bounded to 10 pages and 100 unique accommodations. Apify Proxy is enabled by default in Cloud runs and can be configured with the standard proxy editor.

```json
{
  "startUrls": [
    {
      "url": "https://www.booking.com/hotel/vn/vacances-house.en-gb.html"
    }
  ],
  "maxPages": 1,
  "maxResults": 25,
  "includeRooms": true,
  "requestDelayMs": 500,
  "requestTimeoutSecs": 30,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

Only `/hotel/...` and `/searchresults.html` paths on `booking.com` are accepted. Unknown fields and off-scope URLs fail before any request is made.

### Access challenges and empty results

Booking.com may return a WAF, CAPTCHA, or other access challenge. Such events are not emitted as dataset rows. Instead, the `OUTPUT` key contains a bounded `diagnostics` array and counts, while the dataset remains reserved for successful accommodation records. A blocked-only run is explicitly labeled `BLOCKED`, and a source-error-only run is labeled `FAILED`; neither is a successful empty scrape.

### Responsible use

Use conservative limits and delays, follow Booking.com terms and robots guidance, and process public data only for lawful purposes. Do not use this Actor to automate bookings or access account-only information.

### Local validation

Run `npm test`, validate the schemas with `apify validate-schema`, then execute a bounded sample with `apify run --purge --input-file qa-inputs/simple-booking-scraper/local-validation.json`. Inspect both the default dataset and the `OUTPUT` key.

# Actor input Schema

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

Public Booking.com search or accommodation URLs.

## `maxPages` (type: `integer`):

Maximum pagination pages per supplied URL.

## `maxResults` (type: `integer`):

Maximum unique accommodation records to emit.

## `requestDelayMs` (type: `integer`):

Delay between bounded public page requests.

## `includeRooms` (type: `boolean`):

Keep publicly visible room and price details when present.

## `requestTimeoutSecs` (type: `integer`):

Per-request timeout for a public Booking.com page.

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

Apify Proxy configuration. The default uses Apify Proxy transparently in Cloud runs.

## Actor input object example

```json
{
  "startUrls": [
    {
      "url": "https://www.booking.com/hotel/vn/vacances-house.en-gb.html"
    }
  ],
  "maxPages": 1,
  "maxResults": 25,
  "requestDelayMs": 500,
  "includeRooms": true,
  "requestTimeoutSecs": 30,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

## `dataset` (type: `string`):

Public hotel and room records with visible prices, ratings, and locations.

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

Success and diagnostic counts written to the OUTPUT key.

# 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("w3crawler/simple-booking-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("w3crawler/simple-booking-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 w3crawler/simple-booking-scraper --silent --output-dataset

```

## MCP server setup

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