# Google Hotels Prices Scraper (City Search) (`steadfetch/google-hotels-scraper`) Actor

Lowest nightly hotel prices from Google Hotels for any city and dates. Returns one row per hotel with name, rating, coordinates, property type and current price. You are responsible for complying with the terms of use of Google.

- **URL**: https://apify.com/steadfetch/google-hotels-scraper.md
- **Developed by:** [Steadfetch](https://apify.com/steadfetch) (community)
- **Categories:** Travel, Business
- **Features:** Limited permissions
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.29 / 1,000 hotel price delivereds

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/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

Base [Apify](https://apify.com) Actor template for [Steadfetch](https://apify.com/steadfetch): a starting point that ships pay-per-event (PPE) pricing, a validated OUTPUT schema and the automated tests Steadfetch requires before anything is published. Written in TypeScript with [Crawlee](https://crawlee.dev), the language every Steadfetch Actor uses. Development steps, project structure and the publishing checklist live in [PUBLISHING.md](PUBLISHING.md) and [CONTRIBUTING.md](../CONTRIBUTING.md).

### What it does

- Accepts a list of public start URLs, crawls each page with Crawlee (HTML only, no logins, no paywalls, no CAPTCHA bypass) and pushes one dataset item per page.
- Validates every item against the dataset schema in `.actor/dataset_schema.json` before it reaches the dataset. With `strictSchema: true` (the default) invalid data is surfaced instead of published.
- Ships the two synthetic Apify pricing events preconfigured, so monetization is ready on day one.
- Ships lint, typecheck, schema and publish-gate tests (`npm test`, Vitest, offline) so a new Actor is green before it touches the platform.

### How to use

1. From the monorepo root, scaffold a copy: `node tools/scaffold-actor.mjs <vertical> <source>-scraper`.

2. Fill the input in the Apify Console or with the CLI:

   ```bash
   apify call steadfetch/template-scraper --input='{"startUrls":[{"url":"https://example.com"}],"maxItems":100,"strictSchema":true}'
   ```

3. Read results from the run's default dataset (JSON, CSV or the API).

#### Input fields

| Field | Type | Required | Default | Description | Example |
| --- | --- | --- | --- | --- | --- |
| `startUrls` | array | Yes | - | Public URLs where the crawl starts. | `[{"url":"https://example.com"}]` |
| `maxItems` | integer | No | 100 | Maximum number of results pushed to the dataset. | `100` |
| `strictSchema` | boolean | No | true | Fail the run when an item does not match the OUTPUT schema. Keep enabled. | `true` |
| `proxyConfiguration` | object | No | built-in | Optional proxy settings for public pages. | `{"useApifyProxy":true}` |

#### Example input

Matches the declared `exampleRunInput` exactly:

```json
{
  "startUrls": [{ "url": "https://example.com" }],
  "maxItems": 100,
  "strictSchema": true
}
```

### Output

#### Example output

```json
{
  "url": "https://example.com/",
  "title": "Example Domain",
  "scrapedAt": "2026-10-19T12:00:00.000Z",
  "anySourceSpecificField": "extend freely, required fields never change"
}
```

#### Output fields

| Field | Type | Description |
| --- | --- | --- |
| `url` | string | Source page URL (common Steadfetch envelope, required). |
| `title` | string | Page title. |
| `scrapedAt` | date-time | ISO 8601 UTC timestamp of the run (common envelope, required). |

New fields are additive and `required` fields never change, so downstream code can rely on `url` and `scrapedAt`.

### Pricing

Pay-per-event with the two synthetic platform events: `apify-actor-start` at 0.00005 USD per run (Apify-recommended default, includes the first 5 seconds of compute) and `apify-default-dataset-item` at 5 USD per 1,000 results. There is no custom per-item event and no `Actor.charge()` call, so users are never billed twice. Steadfetch keeps result prices between 1 and 10 USD per 1,000 results, set per Actor against its direct competitors on the Apify Store.

Monitor Actors built from this template may add exactly one more event: the reserved `monitor-check`, charged once per watched item actually checked in a run, priced 0.01-1.00 USD per 1,000 checks (a check delivers no result, so it prices far below one). The pattern and the price measurement are documented in the repository `CONTRIBUTING.md`, section "Monitor Actors: charge per check"; the publish gate rejects every other custom event.

**Works on the Apify free plan** - state about N results for the $5 monthly credit: N = floor((5.00 USD - run-start at the Actor default memory) / price per result), computed from the real PPE prices of this Actor (PUBLISHING.md sections 2 and 4 before publishing).

### Other Steadfetch Actors

Real Actors built from this template, sharing the same envelope and pricing model:

- [Spanish Cruise Port Schedule Scraper](https://apify.com/steadfetch/puerto-tenerife-cruceros-monitor) - cruise calls in Tenerife and other Spanish ports.
- [Canary Islands Electricity Scraper](https://apify.com/steadfetch/canarias-electricity-consumption-monitor) - daily electricity consumption in the Canary Islands.
- [Spain Tourism Statistics Scraper](https://apify.com/steadfetch/exceltur-indicadores-extractor) - Exceltur tourism indicators.
- [AENA Airport Stats Scraper](https://apify.com/steadfetch/aena-estadisticas-extractor) - monthly traffic of the Spanish airports.

### FAQ

**Does the Actor need a login or paid subscription to the target site?** No. Steadfetch Actors only read public pages; they never bypass logins, paywalls or CAPTCHAs.

**Why no browser (Playwright)?** HTTP + Cheerio is roughly 10x cheaper and faster. Playwright is added only when a source truly requires JavaScript rendering, and the reason is documented in that Actor's README.

**When am I charged?** Once per run start (`apify-actor-start`) and once per result saved (`apify-default-dataset-item`). Failed runs that deliver no results only incur the start event.

**Is the output schema stable?** Yes. New fields are added additively and `required` fields never change.

**Can I request a new source?** Yes, open an issue in the Steadfetch actors repository describing the public page you want tracked.

### Support

Report bugs or request features through the Apify Store page (Issues tab) of the Actor you ran, or through the Steadfetch actors repository issues. Include the run ID and the input used.

### Maintenance

The template is **tested daily** through the monorepo CI (`npm test` and `npm run publish:check` on every push, plus the shared publish gate), and every Actor built from it must pass the same suite before publication. Schema changes are announced through repository releases.

# Actor input Schema

## `city` (type: `string`):

City or destination name to search for hotels. Google Hotels accepts any city name (e.g. "Palma de Mallorca", "Barcelona", "Paris").

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

Check-in date in YYYY-MM-DD format. Prices are for nights starting on this date.

## `checkOutDate` (type: `string`):

Check-out date in YYYY-MM-DD format. Must be after check-in date.

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

Maximum number of hotel listings to return. Fixed cap: 500.

## Actor input object example

```json
{
  "city": "Palma de Mallorca",
  "checkInDate": "2026-12-01",
  "checkOutDate": "2026-12-03",
  "maxResults": 25
}
```

# Actor output Schema

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

Dataset items validated against the item schema in dataset_schema.json (fields).

# 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 = {
    "city": "Palma de Mallorca",
    "checkInDate": "2026-12-01",
    "checkOutDate": "2026-12-03",
    "maxResults": 25
};

// Run the Actor and wait for it to finish
const run = await client.actor("steadfetch/google-hotels-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 = {
    "city": "Palma de Mallorca",
    "checkInDate": "2026-12-01",
    "checkOutDate": "2026-12-03",
    "maxResults": 25,
}

# Run the Actor and wait for it to finish
run = client.actor("steadfetch/google-hotels-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 '{
  "city": "Palma de Mallorca",
  "checkInDate": "2026-12-01",
  "checkOutDate": "2026-12-03",
  "maxResults": 25
}' |
apify call steadfetch/google-hotels-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,steadfetch/google-hotels-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/BuNWfpBncUSvEhoB3/builds/ZBCpv7eDyMZWvGMzN/openapi.json
