# Hotel Price Comparison (Booking, Expedia, Agoda) (`scrapercompany/hotel-price-comparison`) Actor

Compare one hotel's price across Booking.com, Hotels.com, Agoda and Expedia for the same stay in one request: per-site price, lowest site and price spread. Rate parity monitoring for revenue managers. Not charged when no site returns a price.

- **URL**: https://apify.com/scrapercompany/hotel-price-comparison.md
- **Developed by:** [ScraperCompany](https://apify.com/scrapercompany) (community)
- **Categories:** Travel, E-commerce
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $30.00 / 1,000 price comparisons

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

## Hotel Price Comparison (Booking, Expedia, Agoda)

Hotel Price Comparison checks the same stay at the same hotel on **Booking.com, Hotels.com, Agoda and Expedia** in a single request and tells you which site is cheapest and by how much. Each site is fetched in parallel and reported with its own status, so one blocked site never hides the others. It is built for **rate parity monitoring**: revenue managers, channel managers and travel analysts who need a daily view of where a hotel is undercut.

Powered by the [ScraperCompany API](https://scrapercompany.com): requests, proxies, retries and anti-bot handling run on ScraperCompany's servers, so you don't need your own proxies or API key. Start a run, get structured JSON.

### What can this scraper do?

- **Four OTAs in one request**: Booking.com, Hotels.com, Agoda and Expedia.
- **Lowest price, lowest site and spread** when prices are comparable.
- **Per-site status** (ok, sold out, blocked) so partial answers are still useful.
- Flags when currencies differ instead of computing a misleading spread.
- Batch many hotels; each hotel object can carry its own dates.
- **Not charged** when no site returns a price.

### What data can you extract?

| Field | Description |
| --- | --- |
| `comparison.lowest_price / lowest_source` | Cheapest site and its price |
| `comparison.spread` | Difference between the most and least expensive site |
| `comparison.prices / currencies` | Price and currency per site |
| `comparison.comparable / status / reason` | Whether the prices can be compared and why not |
| `sources.<site>.status / price_per_night` | Per-site result |
| `meta.ok / meta.requested` | Sites answered out of sites requested |

Every dataset item also carries `input` (the exact request that was sent), `request_id` (quote it to support), `billed` and `scraped_at`.

### How to use Hotel Price Comparison (Booking, Expedia, Agoda)

1. Open Hotel Price Comparison (Booking, Expedia, Agoda) in Apify Console and go to the **Input** tab.
2. Add one object per hotel with its id on each site (Booking.com slug, Hotels.com id, Agoda id, Expedia id). Find ids with the Booking.com, Hotels.com, Agoda and Expedia scrapers' search modes.
3. Adjust the options if needed. Dates accept an exact date (`2026-12-01`) or a relative one (`30 days` from today), so saved tasks and schedules never go stale.
4. Click **Start** and wait for the run to finish.
5. Download the results from the **Output** tab as JSON, CSV, Excel or HTML, or fetch them with the Apify API.

### Input example

This is the default input; running the Actor without changes uses it.

```json
{
  "hotels": [
    {
      "booking_pagename": "moxy-boston-downtown",
      "booking_country": "us",
      "hotels_property_id": "38766175",
      "agoda_property_id": "8795952"
    }
  ],
  "check_in": "30 days",
  "currency": "USD",
  "includeErrors": true,
  "maxConcurrency": 3,
  "maxRetries": 2
}
```

### Output example

One dataset item per request (trimmed here; real items contain every field the API returns):

```json
{
  "endpoint": "/v1/ota/compare",
  "input": {
    "booking_pagename": "moxy-boston-downtown",
    "booking_country": "us",
    "hotels_property_id": "38766175",
    "agoda_property_id": "8795952",
    "check_in": "2026-10-31",
    "currency": "USD"
  },
  "comparison": {
    "comparable": true,
    "currencies": {
      "agoda": "USD",
      "booking": "USD"
    },
    "identifiers": {
      "agoda": "8795952",
      "booking": "moxy-boston-downtown"
    },
    "lowest_price": 285,
    "lowest_source": "booking",
    "price_provenance": {},
    "prices": {
      "agoda": 332,
      "booking": 285
    },
    "reason": null,
    "spread": 47,
    "status": "comparable"
  },
  "meta": {
    "elapsed_s": 15.89,
    "ok": 2,
    "requested": 2
  },
  "search_parameters": {
    "adults": 2,
    "agoda_property_id": "8795952",
    "booking_pagename": "moxy-boston-downtown",
    "check_in_date": "2026-09-14",
    "check_out_date": "2026-09-15",
    "currency": "USD",
    "engine": "ota_compare"
  },
  "sources": {
    "agoda": {
      "currency": "USD",
      "price_per_night": 332,
      "status": "ok"
    },
    "booking": {
      "currency": "USD",
      "price_per_night": 285,
      "status": "ok"
    }
  },
  "request_id": "req_3f9c0d6e2b8a4c1f9e7d5b3a1c0e8f6d",
  "billed": true,
  "scraped_at": "2026-10-01T14:03:27.512Z"
}
```

A request that fails is saved with an `error` message instead (turn off **Include failed requests** to skip those). Failed requests are never charged.

### How much does it cost?

This Actor uses **pay-per-event** pricing: you pay for successful API requests, not for compute time.

| Event | Charged when | Price | Per 1,000 |
| --- | --- | --- | --- |
| `comparison-request` | One hotel compared across Booking.com, Hotels.com, Agoda and Expedia for one stay. Not charged when no site returns a price. | $0.03 | $30.00 |

For example, comparing 1,000 hotel-stays costs **$30.00** (each covers up to four sites).

- Failed requests (errors, invalid input, blocked upstream after retries) are **free**.
- Requests where the source returns nothing at all (no results, nothing priced) are saved but **not charged**.
- Set **Maximum cost per run** when you start a run and the Actor stops cleanly before going over it.

### FAQ

#### Do I need proxies or a ScraperCompany API key?

No. Proxy rotation, retries and anti-bot handling run on the ScraperCompany side, and the Actor is already connected to the API. You only pay the per-event prices above.

#### Why is there no spread for my hotel?

A spread is only computed when at least two sites priced the stay in the same currency. Hotels.com and Expedia price in their market's currency, so set the markets and currency to match.

#### What if one site is blocked?

The other sites are still returned, each with its own status. You are charged as long as at least one site returned a price.

#### Is it legal to scrape this data?

The Actor collects publicly available information that anyone can see without logging in. You are responsible for how you use the results: respect the source site's terms, copyright and privacy law (such as GDPR) and do not collect personal data without a lawful basis. If in doubt, ask a lawyer.

#### What happens when a request is blocked or rate-limited?

Rate limits (HTTP 429) and temporary errors (5xx) are retried automatically with exponential backoff, respecting `Retry-After`. If a request still fails it is saved with the error message and not charged, and the rest of the batch keeps going. A run only fails when every request failed.

#### Why did a request return an error?

Read the `error` field: validation problems (for example a malformed date or an unknown id) are reported exactly as the API sees them. Fix the input and run again; failed requests cost nothing.

#### How many requests can I run at once?

Any number per run. The Actor sends up to 3 requests in parallel by default (change it under **Run options**); larger batches simply take longer.

### Use it from your code

Call the Actor from any language through the [Apify API](https://docs.apify.com/api/v2). With the JavaScript client (`npm install apify-client`):

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

const client = new ApifyClient({ token: process.env.APIFY_TOKEN });
const run = await client.actor('scrapercompany/hotel-price-comparison').call({
    "hotels": [
        {
            "booking_pagename": "moxy-boston-downtown",
            "booking_country": "us",
            "hotels_property_id": "38766175",
            "agoda_property_id": "8795952"
        }
    ],
    "check_in": "30 days"
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items);
```

With Python (`pip install apify-client`):

```python
import os
from apify_client import ApifyClient

client = ApifyClient(os.environ["APIFY_TOKEN"])
run = client.actor("scrapercompany/hotel-price-comparison").call(run_input={
    "hotels": [
        {
            "booking_pagename": "moxy-boston-downtown",
            "booking_country": "us",
            "hotels_property_id": "38766175",
            "agoda_property_id": "8795952",
        },
    ],
    "check_in": "30 days",
})
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)
```

You can also schedule runs, chain them with webhooks, or connect them to Make, Zapier, n8n, Google Sheets and other integrations from the **Integrations** tab.

### Related scrapers

- [Booking.com Hotel Rates Scraper](https://apify.com/scrapercompany/booking-hotel-rates-scraper)
- [Agoda Hotel Rates Scraper](https://apify.com/scrapercompany/agoda-hotel-rates-scraper)
- [Official Hotel Website Rates Scraper](https://apify.com/scrapercompany/official-hotel-rates-scraper)

### Support

Questions, a field you need, or a site that stopped working? Open an issue on the **Issues** tab or contact us at [scrapercompany.com](https://scrapercompany.com). Include the `request_id` from the dataset item so we can trace the request.

# Changelog

This Actor's version history is a separate document: https://apify.com/scrapercompany/hotel-price-comparison/changelog.md

# Actor input Schema

## `hotels` (type: `array`):

One object per hotel with its id on each site you want compared; leave out a site to skip it. Keys: <code>booking_pagename</code> (+ <code>booking_country</code>), <code>hotels_property_id</code>, <code>agoda_property_id</code>, <code>expedia_property_id</code>. Each object can also override the stay options below (for example its own <code>check_in</code>).

## `check_in` (type: `string`):

Exact (<code>2026-12-01</code>) or relative (<code>30 days</code> from today).

## `nights` (type: `integer`):

Length of stay (1-30).

## `adults` (type: `integer`):

Adults in the room (1-8).

## `currency` (type: `string`):

Currency for Booking.com and Agoda prices. Hotels.com and Expedia price in their market's currency; the comparison only computes a spread when currencies match.

## `booking_country` (type: `string`):

Two-letter segment before the slug in Booking.com URLs, used when a hotel object does not set its own.

## `hotels_market` (type: `string`):

Hotels.com point of sale; also sets its currency.

## `expedia_market` (type: `string`):

Expedia point of sale (US or CA); also sets its currency.

## `includeErrors` (type: `boolean`):

When on, a request that fails (for example an unknown property id) is saved as a dataset item with an <code>error</code> message so you can see what went wrong. Failed requests are never charged.

## `maxConcurrency` (type: `integer`):

How many API requests run at the same time.

## `maxRetries` (type: `integer`):

Retries for rate limits (HTTP 429), temporary server errors (5xx) and network errors, with exponential backoff. Validation errors are never retried.

## Actor input object example

```json
{
  "hotels": [
    {
      "booking_pagename": "moxy-boston-downtown",
      "booking_country": "us",
      "hotels_property_id": "38766175",
      "agoda_property_id": "8795952"
    }
  ],
  "check_in": "30 days",
  "nights": 1,
  "adults": 2,
  "currency": "USD",
  "booking_country": "us",
  "hotels_market": "US",
  "expedia_market": "US",
  "includeErrors": true,
  "maxConcurrency": 3,
  "maxRetries": 2
}
```

# Actor output Schema

## `results` (type: `string`):

One dataset item per request.

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

Counts of succeeded, failed, skipped and charged requests.

# 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 = {
    "hotels": [
        {
            "booking_pagename": "moxy-boston-downtown",
            "booking_country": "us",
            "hotels_property_id": "38766175",
            "agoda_property_id": "8795952"
        }
    ],
    "check_in": "30 days"
};

// Run the Actor and wait for it to finish
const run = await client.actor("scrapercompany/hotel-price-comparison").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 = {
    "hotels": [{
            "booking_pagename": "moxy-boston-downtown",
            "booking_country": "us",
            "hotels_property_id": "38766175",
            "agoda_property_id": "8795952",
        }],
    "check_in": "30 days",
}

# Run the Actor and wait for it to finish
run = client.actor("scrapercompany/hotel-price-comparison").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 '{
  "hotels": [
    {
      "booking_pagename": "moxy-boston-downtown",
      "booking_country": "us",
      "hotels_property_id": "38766175",
      "agoda_property_id": "8795952"
    }
  ],
  "check_in": "30 days"
}' |
apify call scrapercompany/hotel-price-comparison --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,scrapercompany/hotel-price-comparison"
        }
    }
}
```

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/CZCrxr01Q8kWU0FM6/builds/cl1DexbRjAsefTHC5/openapi.json
