# 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
- **Security:** Limited permissions
- **Stats:** 4 total users, 2 monthly users, 99.3% 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/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 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 event, and **the platform usage is on us** — the price you see is the price you pay, with no compute bill on top.

| Event | Price | What one charge buys |
|---|---|---|
| Flight itinerary | **$0.0005** | Charged once per delivered flight itinerary (price, airlines, flight numbers, times, stops, legs). Error items are always free. |
| Hotel record | **$0.0005** | Charged once per delivered hotel (nightly price, rating, reviews, star class, amenities). Error items are always free. |
| Actor Start | **$0.004** | One run, whatever it returns. |

Higher Apify subscription tiers pay less on every event (Silver −20%, Gold −35%).

### 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(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 '{
  "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": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,leorochasantos/google-flights-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/CgfayhGfdb05YLVgg/builds/j9tZsYPMHjcnASXi5/openapi.json
