# Google Flights & Hotels Scraper (`leorochasantos/google-flights-hotels-scraper`) Actor

Search Google Flights and Google Hotels in one actor: flight prices, airlines, flight numbers, times and stops, plus hotel nightly prices, ratings and amenities — clean typed JSON at $0.0005 per result.

- **URL**: https://apify.com/leorochasantos/google-flights-hotels-scraper.md
- **Developed by:** [Leonardo Santos](https://apify.com/leorochasantos) (community)
- **Categories:** Travel, E-commerce, Automation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per event + usage

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/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js/docs.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python/docs.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/integrations/mcp.md).

If your project is in a different language, use the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).


# README

## apify-actors

Monorepo for Hermes-built, monetized Apify actors. One actor per directory. Shared
code lives in [`lib/`](./lib/): `lib/src/transport.ts` (retry/session/backoff engine),
`lib/src/ppe.ts` (pay-per-event metering invariants), `lib/golden/` (the declarative
golden-set engine + runner — same vocabulary and message strings as the foundry cron's
`golden_generic.py`; `tools/diff-golden-engines/` proves the two engines agree and must
be re-run whenever either changes). **yahoo-finance and rdap-domain-lookup build on
lib/ today; google-trends and google-news still carry pre-lib copies** (migrate with
their next planned deploy).

**Deploying a lib/-based actor:** its Docker context is the repo root, and `apify push`
both refuses parent contexts and drops nested `.actor/` dirs from uploads — so always
push through the wrapper: `tools/push-actor.sh <actor-dir>` (log into the intended
account first; verify with `npx -y -p apify-cli apify info`).

| Actor | Status | Spec | Store listing |
|---|---|---|---|
| [`google-trends/`](./google-trends/) | Live + monetized (PPE `keyword-result`) | [spec](./google-trends/SPEC.md) | [README](./google-trends/README.md) |
| [`google-news/`](./google-news/) | Live + monetized (PPE `article-result`) | [spec](./google-news/SPEC.md) | [README](./google-news/README.md) |
| [`yahoo-finance/`](./yahoo-finance/) | Live + monetized (PPE `ticker-result`), launched 2026-07-16 | [spec](./yahoo-finance/SPEC.md) | [README](./yahoo-finance/README.md) |
| [`rdap-domain-lookup/`](./rdap-domain-lookup/) | Live public + monetized (PPE `domain-result`), launched 2026-07-16 | [spec](./rdap-domain-lookup/SPEC.md) | [README](./rdap-domain-lookup/README.md) |
| [`ads-transparency/`](./ads-transparency/) | Spec approved, build started; on hold pending proxy-economics gate | — (spec in `hermes:workspace/plans/2026-07-16-ads-transparency-actor-pilot.md`) | — (no listing yet) |

### Provenance

Built under the pilot plan `hermes:workspace/plans/2026-07-03-google-trends-actor-pilot.md`,
which is the successor to the Apify demand probe (`2026-07-03-apify-demand-probe.md`).
The Google Trends actor is a deliberate single-actor pilot testing two theses: (1) a
reliable Google Trends actor can win users in a niche whose official incumbent fails 1 in
4 runs, and (2) a Hermes cron can detect degradation and ship repairs faster than a human
maintainer.

### Accounts

- **Publish / monetize:** Apify account `leorochasantos` (token `APIFY_API_TOKEN_BACKUP`
  in Hermes `.env`). Financial/monetization actions are Leo-only.
- **Dev / probe:** account `jarbaspsantosbr` (`APIFY_API_KEY`). Used for on-platform test
  runs so the publish account's free credit stays clean.

Tokens live only in Hermes `.env`; never commit them.

# Actor input Schema

## `flightQueries` (type: `array`):

One flight search per object: <code>{"origin": "JFK", "destination": "LAX", "departureDate": "2026-09-10", "returnDate": "2026-09-17"}</code>. Origin/destination take airport codes or city names. Dates are <code>YYYY-MM-DD</code> or relative <code>"+N"</code> (N days from today). Omit <code>returnDate</code> for one-way pricing; with it, prices are round-trip totals for each outbound option.
## `hotelQueries` (type: `array`):

One hotel search per object: <code>{"location": "Austin", "checkIn": "2026-09-10", "checkOut": "2026-09-14"}</code>. Location is a city, neighborhood, or landmark. Dates are optional (both or neither), <code>YYYY-MM-DD</code> or relative <code>"+N"</code> days from today.
## `currency` (type: `string`):

3-letter currency code for all prices (e.g. USD, EUR, BRL).
## `language` (type: `string`):

Google interface language. Keep the default "en" unless you need localized airport/hotel names.
## `country` (type: `string`):

Google country code affecting result localization.
## `maxItemsPerQuery` (type: `integer`):

Cap on delivered itineraries/hotels per query (a Google page carries ~32 itineraries or ~20 hotels). Each delivered result is one charged event.
## `proxyConfiguration` (type: `object`):

Proxy to use for outgoing requests. Default datacenter proxies work — no residential needed.

## Actor input object example

```json
{
  "flightQueries": [
    {
      "origin": "JFK",
      "destination": "LAX",
      "departureDate": "+30",
      "returnDate": "+37"
    }
  ],
  "hotelQueries": [
    {
      "location": "Austin",
      "checkIn": "+30",
      "checkOut": "+33"
    }
  ],
  "currency": "USD",
  "language": "en",
  "country": "us",
  "maxItemsPerQuery": 50,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
````

# 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 = {
    "flightQueries": [
        {
            "origin": "JFK",
            "destination": "LAX",
            "departureDate": "+30",
            "returnDate": "+37"
        }
    ],
    "hotelQueries": [
        {
            "location": "Austin",
            "checkIn": "+30",
            "checkOut": "+33"
        }
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("leorochasantos/google-flights-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 = {
    "flightQueries": [{
            "origin": "JFK",
            "destination": "LAX",
            "departureDate": "+30",
            "returnDate": "+37",
        }],
    "hotelQueries": [{
            "location": "Austin",
            "checkIn": "+30",
            "checkOut": "+33",
        }],
}

# Run the Actor and wait for it to finish
run = client.actor("leorochasantos/google-flights-hotels-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "flightQueries": [
    {
      "origin": "JFK",
      "destination": "LAX",
      "departureDate": "+30",
      "returnDate": "+37"
    }
  ],
  "hotelQueries": [
    {
      "location": "Austin",
      "checkIn": "+30",
      "checkOut": "+33"
    }
  ]
}' |
apify call leorochasantos/google-flights-hotels-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=leorochasantos/google-flights-hotels-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Google Flights & Hotels Scraper",
        "description": "Search Google Flights and Google Hotels in one actor: flight prices, airlines, flight numbers, times and stops, plus hotel nightly prices, ratings and amenities — clean typed JSON at $0.0005 per result.",
        "version": "0.1",
        "x-build-id": "1i12cy2wIQlr0d10j"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/leorochasantos~google-flights-hotels-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-leorochasantos-google-flights-hotels-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/leorochasantos~google-flights-hotels-scraper/runs": {
            "post": {
                "operationId": "runs-sync-leorochasantos-google-flights-hotels-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/leorochasantos~google-flights-hotels-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-leorochasantos-google-flights-hotels-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "properties": {
                    "flightQueries": {
                        "title": "Flight searches",
                        "type": "array",
                        "description": "One flight search per object: <code>{\"origin\": \"JFK\", \"destination\": \"LAX\", \"departureDate\": \"2026-09-10\", \"returnDate\": \"2026-09-17\"}</code>. Origin/destination take airport codes or city names. Dates are <code>YYYY-MM-DD</code> or relative <code>\"+N\"</code> (N days from today). Omit <code>returnDate</code> for one-way pricing; with it, prices are round-trip totals for each outbound option."
                    },
                    "hotelQueries": {
                        "title": "Hotel searches",
                        "type": "array",
                        "description": "One hotel search per object: <code>{\"location\": \"Austin\", \"checkIn\": \"2026-09-10\", \"checkOut\": \"2026-09-14\"}</code>. Location is a city, neighborhood, or landmark. Dates are optional (both or neither), <code>YYYY-MM-DD</code> or relative <code>\"+N\"</code> days from today."
                    },
                    "currency": {
                        "title": "Currency",
                        "type": "string",
                        "description": "3-letter currency code for all prices (e.g. USD, EUR, BRL).",
                        "default": "USD"
                    },
                    "language": {
                        "title": "Language (hl)",
                        "type": "string",
                        "description": "Google interface language. Keep the default \"en\" unless you need localized airport/hotel names.",
                        "default": "en"
                    },
                    "country": {
                        "title": "Country (gl)",
                        "type": "string",
                        "description": "Google country code affecting result localization.",
                        "default": "us"
                    },
                    "maxItemsPerQuery": {
                        "title": "Max results per query",
                        "minimum": 1,
                        "maximum": 200,
                        "type": "integer",
                        "description": "Cap on delivered itineraries/hotels per query (a Google page carries ~32 itineraries or ~20 hotels). Each delivered result is one charged event.",
                        "default": 50
                    },
                    "proxyConfiguration": {
                        "title": "Proxy configuration",
                        "type": "object",
                        "description": "Proxy to use for outgoing requests. Default datacenter proxies work — no residential needed.",
                        "default": {
                            "useApifyProxy": true
                        }
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
