# 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

from $0.33 / 1,000 flight itineraries

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — 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

## Google Flights & Hotels Scraper

Search **Google Flights** and **Google Hotels** in one actor and get clean,
typed JSON: flight itineraries with total price, airlines, flight numbers,
departure/arrival times, stops, layovers and aircraft — plus hotels with
nightly price, guest rating, review count, star class and amenities. Batch as
many searches as you want in one run, in any currency.

### Why this actor?

- **Both verticals in one actor** — flight routes *and* hotel searches in the
  same run, one schema, one bill.
- **Pay per result, aggressively priced** — $0.0005 per itinerary or hotel
  (a typical full search ≈ $0.015). No per-page fees, no setup fees.
- **No residential-proxy tax** — runs on standard datacenter proxies.
- **Relative dates** (`"+30"` = 30 days from today) so scheduled/monitoring
  runs never go stale.
- **Agent/LLM-ready output** — flat, typed fields; per-query errors are
  delivered as free structured error items, never silent drops.
- **Maintained 24/7** — automated daily health checks against a golden test
  suite catch upstream changes before you do.

### Input

```json
{
  "flightQueries": [
    { "origin": "JFK", "destination": "LAX", "departureDate": "2026-09-10", "returnDate": "2026-09-17" },
    { "origin": "SFO", "destination": "SEA", "departureDate": "+21" }
  ],
  "hotelQueries": [
    { "location": "Austin", "checkIn": "+30", "checkOut": "+33" }
  ],
  "currency": "USD",
  "maxItemsPerQuery": 50
}
```

- Dates are `YYYY-MM-DD` or relative `"+N"` (N days from today).
- Omit `returnDate` for one-way pricing; with it, each itinerary's `price` is
  the round-trip total for that outbound option.
- Hotel dates are optional (both or neither); dated searches return live
  nightly rates.

### Output

One item per itinerary / hotel / failed query (`type`: `flight` | `hotel` | `error`):

```json
{
  "type": "flight",
  "origin": "JFK", "destination": "LAX",
  "departure_date": "2026-09-10", "return_date": "2026-09-17",
  "trip_type": "round_trip", "rank": 1, "category": "best",
  "price": 387, "currency": "USD",
  "airlines": ["JetBlue"], "flight_numbers": ["B6 323"],
  "stops": 0, "duration_minutes": 364,
  "departure_airport": "JFK", "arrival_airport": "LAX",
  "departure_time": "2026-09-10T08:00", "arrival_time": "2026-09-10T11:04",
  "layover_airports": [], "aircraft": ["Airbus A320"],
  "legs": [ { "departure_airport": "JFK", "arrival_airport": "LAX", "flight_number": "B6 323", "aircraft": "Airbus A320", "departure_time": "2026-09-10T08:00", "arrival_time": "2026-09-10T11:04", "duration_minutes": 364, "airline": "B6", "airline_name": "JetBlue" } ],
  "scraped_at": "2026-07-19T12:00:00.000Z"
}
```

```json
{
  "type": "hotel",
  "query_location": "Austin", "check_in": "2026-08-18", "check_out": "2026-08-21",
  "rank": 1, "name": "Hilton Austin",
  "entity_id": "ChYI6YrJipS6urUgGgovbS8wYm1nbnBmEAE",
  "url": "https://www.google.com/travel/hotels/entity/ChYI6YrJipS6urUgGgovbS8wYm1nbnBmEAE",
  "price_nightly": 187, "currency": "USD",
  "rating": 4.2, "reviews_count": 1341, "hotel_class": 4,
  "amenities": ["Pool", "Free Wi-Fi", "Fitness center"],
  "scraped_at": "2026-07-19T12:00:00.000Z"
}
```

Times are airport-/hotel-local ISO strings. `price` is a number in your
requested `currency`.

### Pricing

Pay per result: one **`flight-result`** event per delivered itinerary and one
**`hotel-result`** event per delivered hotel. Error items are always free.
Cap spend per query with `maxItemsPerQuery`.

### Use cases

- Fare monitoring and price-drop alerts on fixed routes (relative dates make
  scheduled runs zero-maintenance).
- Travel-deal aggregation and newsletter tooling.
- Hotel rate benchmarking / revenue management for specific markets.
- OTA and metasearch competitive intelligence.
- Feeding travel agents/LLM apps live flight + hotel options in one call.

### FAQ

**Do I get booking links?** v1 returns Google's entity/itinerary data (with a
hotel details URL); per-OTA booking links are on the roadmap.

**Round-trip prices look higher than one-way — why?** With `returnDate` set,
Google lists outbound options priced as the *round-trip total*, which is how
the Google Flights UI works. Omit `returnDate` for one-way fares.

**Which markets work?** Any market Google Travel serves; set `currency`,
`language`, and `country` to localize.

***

*This Actor is an independent tool and is not affiliated with, endorsed by, or
sponsored by Google. It accesses only publicly available pages.*

# 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

Download the OpenAPI definition: https://api.apify.com/v2/actors/CgfayhGfdb05YLVgg/builds/yW1RNFsetRYAINpG1/openapi.json
