# Google Hotels Price Scraper — OTA Rate Parity Monitor (`vesper_studio/google-hotels-rate-parity-monitor`) Actor

Scrape daily hotel prices on Google Hotels comparing Official Site vs OTAs (Booking.com, Expedia, Agoda, Hotels.com, Vio.com), compute exact rate parity gaps, and trigger delta alerts when an OTA undercuts your direct rate. Ultra-fast proxy-free HTTP engine (256 MB RAM).

- **URL**: https://apify.com/vesper_studio/google-hotels-rate-parity-monitor.md
- **Developed by:** [Xavier Richard](https://apify.com/vesper_studio) (community)
- **Categories:** Travel, E-commerce, Business
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$5.00 / 1,000 hotel check-in date parity checkeds

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

## Google Hotels Rate Parity & OTA Price Monitor

**Daily hotel rate parity intelligence and OTA undercut alerting on Google Hotels / Google Travel.**

Built for **Hotel Revenue Managers**, **Hospitality Groups**, **Independent Hotels**, and **Travel Tech / Metasearch Platforms**, this Actor monitors live nightly and total stay prices displayed on Google Hotels across the hotel's **Official Site** and competing **OTAs** (`Booking.com`, `Expedia`, `Agoda`, `Hotels.com`, `Trip.com`, `Vio.com`, `Super.com`, etc.), computes exact rate parity gaps, and fires delta alerts whenever an OTA undercuts your direct rate.

***

### Why Rate Parity Monitoring on Google Hotels?

Google Hotels is the #1 high-intent metasearch entry point for hotel bookings. Even a 3–15% wholesale or rogue-OTA undercut on Google Hotels siphons high-margin direct bookings away from your brand.com engine and damages parity agreements.

With **Google Hotels Rate Parity Monitor**, you can:

- **Audit Official Site vs. OTA Rates** across any check-in date, length of stay (`nights`), and occupancy (`adults`).
- **Run Rolling Calendar Parity Sweeps** (`scanNextDays`: 1, 7, 14, or 30 consecutive check-in dates) to catch weekend or high-demand compression undercuts early.
- **Detect Rogue OTAs & Wholesale Leakage** with signed parity math (`parityGapAmount` and `parityGapPercent` are **positive** whenever an OTA undercuts your Official Site rate).
- **Receive Delta Alerts (`onlyParityAlerts`)** via Key-Value Store state diffing and instant **Discord / Slack / n8n / Make** webhooks only when a new violation appears, a new OTA becomes cheapest, or an undercut deepens.

***

### Verified High-Efficiency Architecture (256–512 MB RAM)

Instead of launching heavy headless browsers, this Actor uses a **verified pure-HTTP Google Travel stack**:

1. **Chrome TLS Impersonation (`curl_cffi`) + Consent/Locale Cookies**: Bypasses consent interstitials cleanly with `CONSENT` and `SOCS` cookies while honoring `curr` (currency), `gl` (point-of-sale country), and `hl` (language).
2. **Entity Resolution + KVS Entity Cache (`/travel/search`)**: Accepts hotel names + cities or direct `google.com/travel/hotels/entity/...` URLs. Targeted hotel queries (`maxHotelsPerQuery=1`) cache resolved entity IDs and the latest Google Travel `bl` token in Key-Value Store (7-day TTL) so recurring scheduled runs skip `/travel/search` completely.
3. **Lightweight Batched `batchexecute` RPCs (`lvkpBc` + `M0CRd`)**: Fetches hotel metadata (`lvkpBc` ~200 KB JSON instead of multi-MB SSR HTML) and up to `7` check-in dates (`M0CRd`) in a **single parallelized HTTP POST**, with automatic `bl` token refresh on 400 and per-date SSR `ts=` fallback if needed.
4. **Pipelined Execution & Buffered Dataset Writes**: Each hotel streams directly from resolution into its batched RPC calls and flushes dataset records in chunks without waiting on global barriers.
5. **Zero Playwright Overhead & Multilingual Star Extraction**: Runs in **4.6–8.6 seconds** on **256 MB RAM** (16x leaner than 4 GB browser-based Google Hotels scrapers), with multilingual star-rating fallback parsing and 96–100% schema completeness. Proxy-free for normal schedules (`proxyConfiguration` is optional and disabled by default).

***

### Input Configuration

| Parameter | Type | Default | Description |
| :--- | :--- | :--- | :--- |
| `queriesOrHotelUrls` | `string[]` | `["Pullman Paris Tour Eiffel"]` | Hotel names + cities or direct Google Travel Hotel URLs. |
| `checkInDate` | `string` | `""` (auto: today + 7d) | Start check-in date (`YYYY-MM-DD`). Leave empty on scheduled runs for rolling future checks. |
| `nights` | `integer` | `1` | Length of stay (`1–30` nights). |
| `scanNextDays` | `integer` | `1` | Consecutive check-in dates to scan (`1`, `7`, `14`, or `30`). |
| `adults` | `integer` | `2` | Adult guests per room (`1–6`). |
| `currency` | `string` | `"EUR"` | Display currency (`EUR`, `USD`, `GBP`, `CHF`, `CAD`, `AUD`, `JPY`, `AED`, `SGD`). |
| `countryCode` | `string` | `"fr"` | Point-of-sale country (`gl` parameter, e.g., `fr`, `us`, `gb`, `de`). |
| `language` | `string` | `"en"` | Interface language (`hl` parameter). |
| `maxHotelsPerQuery` | `integer` | `1` | Keep `1` for targeted hotel monitoring; increase up to `20` for destination/comp-set sweeps. |
| `onlyParityAlerts` | `boolean` | `false` | **Delta Mode**: persist history in KV Store and emit/alert only new or worsened OTA undercuts. |
| `minParityGapPercent` | `number` | `0` | Minimum positive undercut % required to flag `isParityViolation: true`. |
| `webhookUrl` | `string` | `""` | Optional Discord / Slack / n8n / Make webhook URL for real-time violation alerts. |
| `maxConcurrency` | `integer` | `4` | Concurrent HTTP requests (`1–8`). |
| `proxyConfiguration` | `object` | `{ "useApifyProxy": false }` | Optional Apify Proxy configuration for high-volume sweeps. |

***

### Output Schema (Normalized per Hotel & Stay Date)

Each dataset item represents one `(hotel, checkIn)` parity check:

```json
{
  "hotelName": "Pullman Paris Tour Eiffel",
  "hotelId": "ChgIxfW9593Qkbu3ARoLL2cvMXRnczA3ZHQQAQ",
  "city": "Paris",
  "stars": 4,
  "rating": 4.6,
  "reviewsCount": 17771,
  "checkIn": "2026-12-10",
  "checkOut": "2026-12-12",
  "nights": 2,
  "adults": 2,
  "lowestPrice": 315.78,
  "currency": "EUR",
  "taxesIncluded": true,
  "officialSitePrice": 404.89,
  "officialProviderName": "Pullman Paris Tour Eiffel",
  "otaOffers": [
    {
      "provider": "Vio.com",
      "pricePerNight": 315.78,
      "totalPrice": 631.56,
      "isOfficial": false,
      "freeCancellation": null,
      "url": "https://deals.vio.com/..."
    },
    {
      "provider": "Pullman Paris Tour Eiffel",
      "pricePerNight": 404.89,
      "totalPrice": 809.78,
      "isOfficial": true,
      "freeCancellation": false,
      "url": "https://travel-productads.koddi.com/..."
    }
  ],
  "cheapestOta": {
    "provider": "Vio.com",
    "pricePerNight": 315.78,
    "totalPrice": 631.56,
    "url": "https://deals.vio.com/...",
    "freeCancellation": null
  },
  "parityGapAmount": 89.11,
  "parityGapPercent": 22.01,
  "isParityViolation": true,
  "parityStatus": "undercut",
  "googleHotelsUrl": "https://www.google.com/travel/hotels/entity/ChgIxfW9593Qkbu3ARoLL2cvMXRnczA3ZHQQAQ?...",
  "checkedAt": "2026-11-14T06:00:00+00:00",
  "sourceMode": "batchexecute_m0crd"
}
```

#### Parity Status Values

- `undercut`: A non-official OTA is strictly cheaper than `officialSitePrice` (`parityGapAmount > 0`).
- `parity`: Cheapest non-official OTA matches `officialSitePrice` (`parityGapAmount == 0`).
- `official_cheapest`: Hotel Official Site is cheaper than all OTAs (`parityGapAmount < 0`), or no non-official OTAs are listed.
- `no_official_rate`: OTAs are listed, but the hotel's Official Site rate is absent on Google Hotels (distribution visibility alert!).
- `no_offers`: No bookable rates returned for those stay dates (sold out / closed out).

#### Executive Summary (`PARITY_SUMMARY` in Key-Value Store)

Every run also writes a structured `PARITY_SUMMARY` JSON key to the default Key-Value Store containing `totalHotelDatesChecked`, `parityViolationsCount`, `violationRatePercent`, `topUndercuttingOtas`, `worstViolation`, and per-hotel breakdowns.

***

### Pay-Per-Event (PPE) Billing

This Actor supports Apify Pay-Per-Event billing via `hotel-date-checked` (`$0.005` per hotel-date verified in `.actor/pay_per_event.json`), with strict `maxTotalChargeUsd` budget enforcement and graceful `ABORTING` state persistence.

***

### Local Development & Testing

```bash
python -m venv .venv
source .venv/bin/activate  # or .venv\Scripts\activate on Windows
pip install -r requirements.txt pytest pytest-asyncio
pytest -v
```

# Actor input Schema

## `queriesOrHotelUrls` (type: `array`):

List of hotel names + cities (e.g. 'Pullman Paris Tour Eiffel', 'Marriott Marquis Times Square New York') or direct Google Travel Hotel URLs (https://www.google.com/travel/hotels/entity/...).

## `checkInDate` (type: `string`):

Starting check-in date in YYYY-MM-DD format. Leave empty on scheduled runs to automatically start 7 days from today.

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

Number of nights per stay check (checkOut = checkIn + nights).

## `scanNextDays` (type: `integer`):

Number of consecutive check-in dates to scan starting from checkInDate (1 = single date, 7 / 14 / 30 = multi-day parity calendar scan).

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

Number of adult guests for room rate lookup.

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

ISO 4217 currency code passed to Google Hotels (curr parameter).

## `countryCode` (type: `string`):

Two-letter country code (Google Hotels 'gl' parameter) controlling regional OTA visibility and point-of-sale pricing.

## `language` (type: `string`):

Language code (Google Hotels 'hl' parameter) for hotel metadata and provider labels.

## `maxHotelsPerQuery` (type: `integer`):

Keep at 1 for exact hotel rate parity checks. Increase (up to 20) only if passing destination queries like '5 star hotels Paris' to monitor a whole comp-set.

## `onlyParityAlerts` (type: `boolean`):

When enabled, persists previous parity snapshots in Key-Value Store and outputs/alerts ONLY when an OTA undercuts the Official Site (new violation, new cheapest OTA, or deeper undercut than the prior run).

## `minParityGapPercent` (type: `number`):

Minimum positive parityGapPercent required to flag isParityViolation=true (e.g. 2.0 ignores tiny currency rounding differences).

## `webhookUrl` (type: `string`):

Optional HTTPS webhook URL triggered whenever parity violations are detected in the run.

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

Maximum concurrent HTTP requests to Google Travel endpoints.

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

Disabled by default. Chrome TLS impersonation + consent cookies work directly for typical schedules; enable Apify Proxy only if running high-volume multi-property sweeps from datacenter IPs.

## Actor input object example

```json
{
  "queriesOrHotelUrls": [
    "Pullman Paris Tour Eiffel",
    "Hotel Ritz Paris"
  ],
  "checkInDate": "",
  "nights": 1,
  "scanNextDays": 1,
  "adults": 2,
  "currency": "EUR",
  "countryCode": "fr",
  "language": "en",
  "maxHotelsPerQuery": 1,
  "onlyParityAlerts": false,
  "minParityGapPercent": 0,
  "maxConcurrency": 4,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

## `parityRecords` (type: `string`):

Per-hotel, per-date rate comparison across Official Site and OTAs (Booking.com, Expedia, Agoda, Hotels.com, etc.) with parityGapAmount and parityGapPercent.

## `paritySummary` (type: `string`):

Aggregated run report with violation rate, worst undercutting OTAs, max parity gap, and per-hotel overview.

# 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 = {
    "queriesOrHotelUrls": [
        "Pullman Paris Tour Eiffel",
        "Hotel Ritz Paris"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("vesper_studio/google-hotels-rate-parity-monitor").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 = { "queriesOrHotelUrls": [
        "Pullman Paris Tour Eiffel",
        "Hotel Ritz Paris",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("vesper_studio/google-hotels-rate-parity-monitor").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 '{
  "queriesOrHotelUrls": [
    "Pullman Paris Tour Eiffel",
    "Hotel Ritz Paris"
  ]
}' |
apify call vesper_studio/google-hotels-rate-parity-monitor --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,vesper_studio/google-hotels-rate-parity-monitor"
        }
    }
}
```

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/SGvr8myKAyGy9LYHf/builds/KwMUMb9c7ONj3mjEv/openapi.json
