# Google Hotels Price Scraper & Monitor – Hotel Rates by Provider (`puchus-monitoring/google-hotels-price-scraper-monitor`) Actor

Scrape Google Hotels prices for any city or a fixed list of hotels: lowest price, total stay, stars, rating and the price of every provider (Booking.com, Expedia, Agoda, hotel website). Monitor mode outputs only price drops, rises, sold-out and new-hotel alerts since the last run.

- **URL**: https://apify.com/puchus-monitoring/google-hotels-price-scraper-monitor.md
- **Developed by:** [Andres Garcia](https://apify.com/puchus-monitoring) (community)
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.00 / 1,000 hotel 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

## Google Hotels Price Scraper & Monitor – Hotel Rates by Provider

Get hotel prices from **Google Hotels** for any city or for a fixed list of hotels: lowest nightly price, total stay price, stars, rating, number of reviews and, optionally, **the price of every provider** (Booking.com, Expedia, Agoda, Hotels.com, Trip.com, the hotel's own website…). Run it as a normal scraper, or switch on **monitor mode** to get **only the price and availability changes** since the previous run: the daily rate-shopping report of a revenue manager, without the noise.

- **Two modes**: `search` (hotels of "hotels in Málaga", "hotels near Sagrada Familia"…) and `hotels` (your competitive set, by hotel token or Google Hotels URL).
- **Prices by provider** with a flag for the hotel's **official website**.
- **Monitor mode**: price drops and rises, provider price changes, sold out, back in stock and new hotels — with two thresholds (% **and** amount) and two-run confirmation, so you are not alerted for noise.
- **Fixed or relative dates** ("check-in in 30 days, 2 nights") for scheduled runs.
- **Cheap**: 1 $ per 1,000 hotels, 2 $ per 1,000 hotels with prices by provider. The leading Actors charge 4–5 $ per 1,000.

> This Actor is an independent tool, not affiliated with or endorsed by Google. It reads the public prices Google Hotels shows to any visitor, without login. It never collects personal data (no reviews with author names, no user photos) and never follows booking or ad links (`/travel/clk`), so it does not affect anyone's ad metrics.

### Who uses it

| Who                              | For what                                                                                                            |
| -------------------------------- | ------------------------------------------------------------------------------------------------------------------- |
| **Hotels and revenue managers**  | Rate shopping: watch the rates of the competitive set every morning, by provider and on their own website (parity). |
| **Travel agencies and analysts** | Compare prices by destination, dates and provider; track price trends for events and peak dates.                    |
| **Developers and AI agents**     | Hotel price data by API, ready to use as JSON.                                                                      |

### Scraper or monitor?

|                     | Scraper (`monitorMode: false`)      | Monitor (`monitorMode: true`)                          |
| ------------------- | ----------------------------------- | ------------------------------------------------------ |
| Output              | One row per hotel and date range    | One row per **relevant change** since the previous run |
| First run           | Every hotel                         | Saves the baseline, outputs nothing                    |
| Run with no changes | Every hotel again                   | Empty dataset                                          |
| You pay             | Each hotel with a price             | Each hotel checked with a price + each change          |
| Best for            | Datasets, one-off comparisons, APIs | Daily rate shopping and alerts                         |

### Input

| Field                     | Type                    | Default                                                          | Description                                                                                                                                                                   |
| ------------------------- | ----------------------- | ---------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `mode`                    | `search` / `hotels`     | `search`                                                         | Hotels of a search, or a fixed list of hotels.                                                                                                                                |
| `queries`                 | array of strings        | –                                                                | Search mode: e.g. `"hotels in Málaga"`.                                                                                                                                       |
| `hotels`                  | array of tokens or URLs | –                                                                | Hotels mode: the `hotelToken` of any result (e.g. `ChoIt63CuaSrqoq0ARoNL2cvMTFmMXN3NzY5dxAB`) or a Google Hotels URL (`https://www.google.com/travel/hotels/entity/<token>`). |
| `dateRanges`              | array                   | –                                                                | `{"checkIn": "2026-11-17", "checkOut": "2026-11-19"}` or `{"nightsFromToday": 30, "nights": 2}`. Up to 30 nights.                                                             |
| `adults`                  | integer                 | 2                                                                | Adults per room.                                                                                                                                                              |
| `currency`                | string                  | `EUR`                                                            | Currency of every price.                                                                                                                                                      |
| `country`                 | string                  | `ES`                                                             | Country of the search (Google's `gl`). It changes which providers appear. See [Proxy and country](#proxy-and-country).                                                        |
| `maxHotelsPerQuery`       | integer                 | 100                                                              | Max hotels per search query and date range (Google returns ~18 per page).                                                                                                     |
| `includeProviderPrices`   | boolean                 | false                                                            | Also get the price of every provider (one extra request per hotel).                                                                                                           |
| `monitorMode`             | boolean                 | false                                                            | Output only changes since the previous run.                                                                                                                                   |
| `monitorName`             | string                  | –                                                                | Monitor mode: name that keeps the state of this monitor apart (e.g. `madrid-competitors`).                                                                                    |
| `priceChangeThresholdPct` | number                  | 3                                                                | Monitor: minimum change in %.                                                                                                                                                 |
| `priceChangeThresholdAbs` | number                  | 5                                                                | Monitor: minimum change in the chosen currency (per night). Both thresholds must be reached.                                                                                  |
| `alertProviders`          | array                   | Booking.com, Expedia, Agoda, Hotels.com, Trip.com, Official site | Monitor: providers whose price changes are reported. Names match loosely ("Booking" = "Booking.com"); "Official site" is the hotel's own website.                             |

**Scraper example** (prices by provider for the hotels of Málaga, two stays):

```json
{
    "mode": "search",
    "queries": ["hotels in Málaga"],
    "dateRanges": [
        { "checkIn": "2026-11-17", "checkOut": "2026-11-19" },
        { "nightsFromToday": 30, "nights": 2 }
    ],
    "maxHotelsPerQuery": 20,
    "includeProviderPrices": true
}
```

**Rate-shopping monitor example** (your hotel and four competitors, the next weekends and a few weekdays):

```json
{
    "mode": "hotels",
    "hotels": [
        "ChoIt63CuaSrqoq0ARoNL2cvMTFmMXN3NzY5dxAB",
        "ChkI_LyB0eSmlNNfGg0vZy8xMWZkNDloZ2szEAE",
        "ChkIptfXuKTng-XkARoML2cvMTJiZmcyeF9kEAE"
    ],
    "dateRanges": [
        { "nightsFromToday": 1, "nights": 1 },
        { "nightsFromToday": 2, "nights": 1 },
        { "nightsFromToday": 3, "nights": 1 },
        { "nightsFromToday": 7, "nights": 1 },
        { "nightsFromToday": 14, "nights": 1 }
    ],
    "includeProviderPrices": true,
    "monitorMode": true,
    "monitorName": "madrid-competitors",
    "priceChangeThresholdPct": 3,
    "priceChangeThresholdAbs": 5,
    "alertProviders": ["Booking.com", "Expedia", "Official site"]
}
```

How to get hotel tokens: run a `search` once (e.g. `"hotels in Madrid"`) and copy the `hotelToken` of the hotels you want, or paste the Google Hotels URL of the hotel page.

#### Fixed and relative dates

- Fixed dates (`checkIn` / `checkOut`) are best for events and peak dates you want to watch over time.
- Relative dates (`nightsFromToday` + `nights`) are resolved with the date of each run (UTC), so a scheduled run always looks ahead.
- In monitor mode prices are compared **for the same real stay dates**. When a relative range moves to new dates the next day, those dates start a new baseline (no false alerts from comparing different nights). To follow a moving window every day, use several consecutive one-night ranges (`nightsFromToday` 1, 2, 3…): each night is then checked on several days in a row and compared.

### Output

**Hotel row** (scraper mode):

```json
{
    "hotelToken": "ChkIgL-h8r2Uq4CPARoML2cvMXl3MF9zOGY0EAE",
    "name": "Barceló Málaga",
    "stars": 4,
    "rating": 4.5,
    "reviewsCount": 3325,
    "checkIn": "2026-11-17",
    "checkOut": "2026-11-19",
    "adults": 2,
    "currency": "EUR",
    "lowestPrice": 142,
    "lowestPriceProvider": "trivago DEALS",
    "totalPrice": 284.27,
    "soldOut": false,
    "providers": [
        { "name": "Barcelo.com", "price": 151, "isOfficial": true },
        { "name": "trivago DEALS", "price": 142, "isOfficial": false },
        { "name": "Booking.com", "price": 158, "isOfficial": false }
    ],
    "query": "hotels in Málaga",
    "country": "ES",
    "googleHotelsUrl": "https://www.google.com/travel/hotels/entity/ChkIgL-h8r2Uq4CPARoML2cvMXl3MF9zOGY0EAE?hl=en&gl=es&curr=EUR",
    "scrapedAt": "2026-10-14T11:30:00.000Z"
}
```

- Prices are **per night, before taxes and fees**, as Google shows them first; `totalPrice` is the whole stay (before taxes, including fees such as apartment cleaning).
- `providers` and `lowestPriceProvider` are only filled with `includeProviderPrices`.
- Sold-out hotels are output with `soldOut: true` and no price (and are not charged).

**Change row** (monitor mode):

```json
{
    "changeType": "PROVIDER_PRICE_CHANGE",
    "hotelToken": "ChoIt63CuaSrqoq0ARoNL2cvMTFmMXN3NzY5dxAB",
    "name": "Hyatt Centric Gran Via Madrid",
    "checkIn": "2026-11-24",
    "checkOut": "2026-11-26",
    "adults": 2,
    "currency": "EUR",
    "provider": "Booking.com",
    "oldValue": 450,
    "newValue": 415,
    "changePct": -7.78,
    "query": null,
    "country": "ES",
    "googleHotelsUrl": "https://www.google.com/travel/hotels/entity/ChoIt63CuaSrqoq0ARoNL2cvMTFmMXN3NzY5dxAB?hl=en&gl=es&curr=EUR",
    "detectedAt": "2026-10-14T11:23:03.623Z",
    "monitorName": "madrid-competitors"
}
```

| `changeType`                | When                                                                                                                                           | `oldValue` → `newValue`       |
| --------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------- |
| `PRICE_DROP` / `PRICE_RISE` | The lowest nightly price changed by at least both thresholds                                                                                   | previous → new lowest price   |
| `PROVIDER_PRICE_CHANGE`     | The price of one of your `alertProviders` changed by at least both thresholds (`provider` says which; "Official site" for the hotel's website) | previous → new provider price |
| `SOLD_OUT`                  | No price for these dates, seen in **two runs in a row**                                                                                        | last price → null             |
| `BACK_IN_STOCK`             | Bookable again, seen in two runs in a row                                                                                                      | null → new lowest price       |
| `NEW_HOTEL`                 | Search mode: a hotel never seen before in that search and dates, seen in two runs in a row                                                     | null → lowest price           |

#### How the monitor avoids false alerts

- Each hotel is followed by its **token**, never by its position in the list (the order changes on every request).
- A change is reported only if it reaches **both** thresholds (default 3% **and** 5 in your currency). The reference price is the one of the last alert, so a slow drift (253 → 258 → 263) is reported once it adds up.
- Only the providers in `alertProviders` are compared. Small resellers that **appear or disappear** never produce an alert.
- `SOLD_OUT`, `BACK_IN_STOCK` and `NEW_HOTEL` must be seen in **two consecutive runs**.
- Google **rotates** the hotels of a city search: two requests in a row share only about half of their first page. In `search` mode a hotel that does not show up is simply not compared that day (it is never reported as removed), and `NEW_HOTEL` is only reported once the hotels already known cover at least 90% of the results. For a fixed competitive set, use `hotels` mode.
- In our tests, a second run with the same input right after the first produced **0 alerts for 43 hotel-date pairs**.

### Run it every day with email or Slack alerts

1. Create a **task** with your monitor input (e.g. the rate-shopping example above).
2. **Schedules** → *Create schedule* → daily at 07:00 in your time zone → add the task.
3. Get the changes:
   - **Slack**: in the task's *Integrations* tab add the Slack integration, *Run succeeded*, to post the run status ("3 changes (PRICE_DROP 2, PROVIDER_PRICE_CHANGE 1) in 45 hotel-date pairs") and the link to the dataset.
   - **Email**: add the Gmail integration to the task, or use Make / Zapier / n8n: *Watch Actor runs* → *Get dataset items* → send an email (or a Slack message per change) only when there are items.
   - **Google Sheets**: append the dataset to a sheet to keep the price history.
4. Add an alert for *Run failed* (Apify notifications): if Google changes its format, the run fails with a clear message instead of sending wrong data.

### Pricing

Pay per event — you pay only for results, Apify platform usage is included:

| Event                                                                       | Price                                       |
| --------------------------------------------------------------------------- | ------------------------------------------- |
| Actor start                                                                 | Minimum set by Apify (a fraction of a cent) |
| `hotel-result` – hotel with price, without prices by provider               | **$0.001** (1 $ / 1,000)                    |
| `hotel-result-with-providers` – hotel with price and its prices by provider | **$0.002** (2 $ / 1,000)                    |
| `price-change` – each change row in monitor mode                            | **$0.005**                                  |

- Sold-out hotels are not charged.
- In monitor mode you pay each hotel-date pair checked with a price (same events as above) plus each change. The first run (baseline) only pays the checks.
- You can set a maximum cost per run in Apify: the Actor stops cleanly when it is reached, and in monitor mode whatever was not delivered is reported in the next run.

**Compared with the leaders** (per 1,000 hotel results, October 2026):

| Actor          | Price per 1,000                       |
| -------------- | ------------------------------------- |
| zerobreak      | 4.99 $                                |
| factden        | 4–5 $                                 |
| **This Actor** | **1 $** (2 $ with prices by provider) |

**Monthly cost examples**

- Rate shopping: 10 hotels × 5 date ranges every day, with prices by provider = 50 checks/day × $0.002 = $0.10/day; with ~3 changes/day × $0.005 = $0.015/day → **about $3.50 per month**.
- Market dataset: 1,000 hotels of 5 cities with prices by provider once a week → 4 runs × $2 = **about $8 per month**.

### Proxy and country

- Prices and providers are those Google Hotels shows for the `country` you choose (`gl`), in the chosen currency.
- The Actor uses Apify Proxy datacenter IPs and first tries IPs of that country. **Many Apify accounts only have datacenter IPs in some countries** (often the US): in that case Apify Proxy refuses the country and the Actor continues with datacenter IPs of any country, logging it. The search is still made for your `country`, so the results are those of that country's Google; the IP location can add or remove a few small resellers (in our tests, US datacenter IPs showed ~15 providers per hotel against ~12 from Spanish IPs).
- If Google starts blocking (more than 5% of the requests answered with 429 or CAPTCHA, after at least 20 requests), the Actor switches **automatically to residential proxy in your `country`** and says so in the log and in the run summary. You do not pay anything extra for it.
- In a test of 10,000 requests on the Apify platform with datacenter proxy, every request succeeded (one network error was solved by retrying), with no 429 and no CAPTCHA.

### Reliability

- Fields are validated before anything is charged or saved: if the name, rating, number of reviews or price is empty in more than 20% of the hotels (a sign that Google changed its format), the run **fails with a clear message**, nothing is charged and the monitor state is not overwritten.
- A monitor run also fails if most of your hotels disappear at once, or if a search returns less than half of the hotels of the previous run.
- Every run ends with a summary in the log and in the `SUMMARY` record of the run's key-value store: hotels checked, changes by type, requests, block rate, proxy used and warnings.
- A health-check input with 5 known hotels of Madrid and Barcelona (relative dates, prices by provider) is used to detect format changes early.

### FAQ

**Where is the monitor state kept?** In a named key-value store of your Apify account, `google-hotels-monitor-<monitor name>`. Use a different `monitorName` per client or competitive set. Delete the store to start again from a new baseline.

**Why is the first monitor run empty?** It saves the baseline. Changes are reported from the second run.

**Why did a hotel not appear in today's search?** Google rotates the hotels of a city search between requests. Increase `maxHotelsPerQuery` to cover more of the city, or follow your competitors with `hotels` mode.

**Are prices with or without taxes?** Without taxes and fees, per night, as Google shows them first. `totalPrice` is the whole stay without taxes.

**Can I get the booking links?** No. The Actor never follows or returns Google's booking/ad links (`/travel/clk`); `googleHotelsUrl` is the public Google Hotels page of the hotel.

**Does it collect reviews?** It returns the rating and number of reviews only. It never collects review texts with author names or user photos.

**Which countries and currencies?** Any country code Google accepts for `gl` and any currency Google Hotels offers (EUR, USD, GBP…).

**How fast is it?** About 100 requests per minute: a search page gives ~18 hotels, and each hotel with prices by provider needs one more request.

### More monitors by puchus-monitoring

Same approach in every actor: no browser, change-only output, named state per monitor, and pay only for what you get.

- [TED Tender Monitor](https://apify.com/puchus-monitoring/ted-tender-monitor) – new EU public tenders, corrigenda, deadline changes and awards by keyword, CPV and country.
- [AppExchange Change Monitor](https://apify.com/puchus-monitoring/appexchange-change-monitor) – new Salesforce apps, reviews, ratings and pricing changes.

Missing a field or a source? Open an issue on any of them – I usually answer within 24 h.

### En español

**Google Hotels Price Scraper & Monitor** extrae de Google Hotels los hoteles de una búsqueda o de una lista fija, con su precio mínimo por noche, el total de la estancia, estrellas, valoración y, si quieres, **el precio de cada proveedor** (Booking.com, Expedia, Agoda, la web oficial del hotel…). En **modo monitor** solo devuelve los cambios desde la ejecución anterior.

#### Rate shopping para hoteles

Pensado para revenue managers: pon tu hotel y tu competencia en modo `hotels` (los tokens salen de cualquier búsqueda o de la URL de Google Hotels), elige las noches que quieres vigilar y activa `monitorMode`. Cada mañana recibirás solo:

- bajadas y subidas del precio mínimo (`PRICE_DROP`, `PRICE_RISE`) que superen **a la vez** el % y el importe que elijas (por defecto 3% y 5 €);
- cambios de precio de los proveedores que te interesan (`PROVIDER_PRICE_CHANGE`), incluida tu propia web ("Official site") para controlar la paridad;
- hoteles agotados o que vuelven a tener disponibilidad (`SOLD_OUT`, `BACK_IN_STOCK`), confirmados en dos ejecuciones seguidas;
- hoteles nuevos en una búsqueda (`NEW_HOTEL`).

Los revendedores pequeños que aparecen y desaparecen nunca generan avisos. Con las mismas entradas, dos ejecuciones seguidas dieron **0 avisos en 43 pares hotel-fecha**.

#### Programación diaria con aviso por email o Slack

1. Crea una *task* con tu input de monitor.
2. En *Schedules*, programa la task cada día a las 7:00.
3. En *Integrations*, añade Slack o Gmail para recibir el resumen ("3 cambios en 45 pares hotel-fecha") y el enlace a los cambios; con Make, Zapier o n8n puedes enviar un mensaje por cada cambio solo cuando los haya.
4. Activa el aviso de *Run failed*: si Google cambia su formato, la ejecución falla con un mensaje claro en lugar de enviar datos erróneos.

#### Fechas

Usa fechas fijas para eventos y temporadas altas, o relativas (`nightsFromToday` + `nights`) en ejecuciones programadas. El monitor compara siempre **las mismas noches reales**: para vigilar una ventana móvil, usa varios rangos de una noche seguidos (1, 2, 3… días desde hoy).

#### Precio y coste mensual de ejemplo

- 1 $ por 1.000 hoteles con precio; 2 $ por 1.000 con precios por proveedor; 0,005 $ por cambio en modo monitor. Los agotados no se cobran.
- Los líderes cobran entre 4 y 5 $ por 1.000 (zerobreak 4,99 $, factden 4–5 $).
- Ejemplo: 10 hoteles × 5 rangos de fechas cada día con proveedores = 50 comprobaciones × 0,002 $ = 0,10 $/día, más unos 3 cambios diarios × 0,005 $ → **unos 3,50 $ al mes**.

#### Preguntas frecuentes

**¿De qué país son los precios?** Del `country` que elijas (por defecto ES). El Actor intenta usar IPs de centro de datos de ese país; si tu cuenta de Apify no tiene IPs en ese país (es habitual tener solo IPs de EE. UU.), sigue con IPs de otro país, lo indica en el log y la búsqueda se hace igualmente para tu país. Si Google empezara a bloquear (más del 5% de 429 o CAPTCHA), cambia solo a proxy residencial de tu país, sin coste extra para ti.

**¿Los precios llevan impuestos?** No: son por noche, antes de impuestos y tasas, como los muestra Google en primer lugar. `totalPrice` es la estancia completa sin impuestos.

**¿Por qué un hotel no ha salido hoy en la búsqueda?** Google rota los hoteles de las búsquedas de ciudad. Para seguir siempre a los mismos competidores, usa el modo `hotels`.

**¿Recoge reseñas o datos personales?** No. Solo la valoración y el número de reseñas; nunca textos con autor ni fotos de usuarios, y no sigue enlaces de reserva ni de anuncios.

# Actor input Schema

## `mode` (type: `string`):

"search": hotels returned by Google Hotels for each query. "hotels": a fixed list of hotels (tokens or URLs).

## `queries` (type: `array`):

Required in "search" mode. Free text as you would type it in Google Hotels, e.g. "hotels in Málaga" or "hotels near Sagrada Familia".

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

Required in "hotels" mode. Hotel tokens (the "hotelToken" field of any result, e.g. "ChkI97ril8e4r5I2Gg0vZy8xMWI2ZHRmbTY0EAE") or Google Hotels URLs of the hotel page.

## `dateRanges` (type: `array`):

Stays to price. Each item is either fixed dates {"checkIn": "2026-11-17", "checkOut": "2026-11-19"} or dates relative to the day of the run {"nightsFromToday": 30, "nights": 2} (check-in in 30 days, 2 nights), which is what you want in scheduled runs. Up to 30 nights per stay.

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

Number of adults per room.

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

ISO 4217 currency code for all prices, e.g. EUR, USD, GBP.

## `country` (type: `string`):

Two-letter country of the search (Google's "gl"), e.g. ES, US, GB. It changes which providers appear. The proxy also tries to use an IP of this country; see the README for when that is not possible.

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

Maximum number of hotels per search query and date range (search mode). Google returns about 18 hotels per page.

## `includeProviderPrices` (type: `boolean`):

Also get the price of every provider (Booking.com, Expedia, Agoda, the hotel's website…) for each hotel. Needs one extra request per hotel, so it is charged as a hotel result with providers.

## `monitorMode` (type: `boolean`):

Output only the changes since the previous run with the same monitor name: price drops and rises, sold out, back in stock, new hotels and provider price changes. The first run saves the baseline and outputs nothing.

## `monitorName` (type: `string`):

Required in monitor mode. Keeps the saved state of this monitor separate from others, e.g. "madrid-competitors". Runs with the same name are compared with each other.

## `priceChangeThresholdPct` (type: `number`):

Monitor mode: a price change is reported only if it is at least this percentage AND at least the absolute threshold below.

## `priceChangeThresholdAbs` (type: `number`):

Monitor mode: minimum change in the chosen currency (per night) to report a price change, together with the percentage threshold.

## `alertProviders` (type: `array`):

Monitor mode with provider prices: only price changes of these providers are reported (names are matched loosely: "Booking" = "Booking.com"). "Official site" means the hotel's own website. Providers that appear or disappear are never reported.

## Actor input object example

```json
{
  "mode": "search",
  "queries": [
    "hotels in Madrid"
  ],
  "dateRanges": [
    {
      "nightsFromToday": 30,
      "nights": 2
    }
  ],
  "adults": 2,
  "currency": "EUR",
  "country": "ES",
  "maxHotelsPerQuery": 100,
  "includeProviderPrices": false,
  "monitorMode": false,
  "priceChangeThresholdPct": 3,
  "priceChangeThresholdAbs": 5,
  "alertProviders": [
    "Booking.com",
    "Expedia",
    "Agoda",
    "Hotels.com",
    "Trip.com",
    "Official site"
  ]
}
```

# Actor output Schema

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

No description

# 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 = {
    "mode": "search",
    "queries": [
        "hotels in Madrid"
    ],
    "dateRanges": [
        {
            "nightsFromToday": 30,
            "nights": 2
        }
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("puchus-monitoring/google-hotels-price-scraper-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 = {
    "mode": "search",
    "queries": ["hotels in Madrid"],
    "dateRanges": [{
            "nightsFromToday": 30,
            "nights": 2,
        }],
}

# Run the Actor and wait for it to finish
run = client.actor("puchus-monitoring/google-hotels-price-scraper-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 '{
  "mode": "search",
  "queries": [
    "hotels in Madrid"
  ],
  "dateRanges": [
    {
      "nightsFromToday": 30,
      "nights": 2
    }
  ]
}' |
apify call puchus-monitoring/google-hotels-price-scraper-monitor --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,puchus-monitoring/google-hotels-price-scraper-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/sVeCEDObNbRmVpyXH/builds/qg7ix3LhZHbqKCpKp/openapi.json
