# Google Flights Scraper (`reportable_broth/google-flights-scraper`) Actor

Google Flights scraper, no API key, no browser. Prices, airlines, flight numbers, stops, layovers, segments and aircraft for any route and date, one-way or round trip, any cabin and passengers. Price insights (low/typical/high). Relative dates for daily price tracking.

- **URL**: https://apify.com/reportable\_broth/google-flights-scraper.md
- **Developed by:** [Quiet Harvest](https://apify.com/reportable_broth) (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

$0.05 / 1,000 flights

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 Flights Scraper

Scrape Google Flights for any route and date without a browser or API key. Every flight comes with price, airlines, flight numbers, departure and arrival times, duration, stops, layovers, every segment (aircraft, legroom), and Google's price insight for the search (low / typical / high, with the typical price range).

**$0.05 per 1,000 flights.** No start fee.

***

### Why this one

**Fast and direct.** One request per search returns the whole results page, and the Actor parses it without a browser. No third-party flight API sits in between.

**Built for price tracking.** Write dates as `+30` (30 days from today) and schedule the Actor daily: it always checks the same distance ahead, so the dates never go stale. If you pass a date that has already passed, it is moved to today (a round trip keeps its length) and noted in `dateNote`. The run does not fail.

**Price insight included.** Every flight carries `priceLevel` (`low`, `typical`, `high`), `lowestPrice`, and the `typicalPriceLow` to `typicalPriceHigh` range Google shows for that search.

**Pairs with our [Google Hotels Scraper](https://apify.com/reportable_broth/google-hotels-scraper)** for full trip pricing.

***

### Quick start

```json
{
  "routes": ["JFK-LHR +30", "SFO-NRT 2026-12-10 2026-12-20"],
  "cabinClass": "economy",
  "adults": 2,
  "maxStops": "1"
}
```

One line per search: `FROM-TO DEPART [RETURN]`, using 3-letter IATA airport codes. Add a return date for a round trip. `JFK LHR +30 +37` works too.

### Output

One item per flight:

| Field | Notes |
|---|---|
| `route`, `tripType`, `departureDate`, `returnDate` | What was searched |
| `price`, `currency` | Per the passengers searched. For round trips, the **total round-trip price** for this outbound choice |
| `isBest`, `rank` | Google's "Best flights" (price + convenience) come first |
| `airlines`, `airlineCode`, `flightNumbers` | e.g. `["DL68", "DL429"]` |
| `from`, `to`, `departure`, `arrival` | Local times, `YYYY-MM-DDTHH:MM` |
| `durationMin`, `stops` | |
| `layovers` | `[{airport, airportName, city, durationMin}]` |
| `segments` | `[{from, fromName, to, toName, departure, arrival, durationMin, flightNumber, airline, aircraft, legroom}]` |
| `priceLevel`, `lowestPrice`, `typicalPriceLow`, `typicalPriceHigh` | Google's price insight for this search |
| `cabinClass`, `passengers` | |
| `googleFlightsUrl` | Opens the same search on Google Flights |
| `dateNote` | Set when a past date was moved |

### Input

| Field | Default | |
|---|---|---|
| `routes` | | Required. One per line |
| `cabinClass` | economy | economy, premium, business, first |
| `adults`, `children`, `infantsInSeat`, `infantsOnLap` | 1, 0, 0, 0 | |
| `maxStops` | any | any, 0 (nonstop), 1, 2 |
| `airlines` | all | 2-letter codes, e.g. `["BA", "AA"]` |
| `maxPrice`, `maxDurationHours` | | Flights over the limit are skipped and not charged |
| `onlyBestFlights` | false | Only Google's "Best flights" |
| `maxFlightsPerRoute` | 100 | |
| `currency`, `countryCode` | USD, us | Prices can differ by the traveller's country |

### Pricing

| Event | Price |
|---|---|
| Flight | $0.05 per 1,000 |

Example: tracking 20 routes daily, about 30 flights each, costs about $0.03 a day.

### Good to know

- Round trips return the outbound options with the total round-trip price, like Google Flights' first step. To get return-flight details, search the return leg as a separate one-way route.
- Times are local to each airport.
- Some filter combinations (for example business class for 3 passengers on one airline) can have no availability; that route then returns 0 flights and nothing is charged.

### Questions

Found a bug or want a field added? Open an issue on the Issues tab.

# Actor input Schema

## `routes` (type: `array`):

One per line: FROM-TO DEPART \[RETURN], using IATA airport codes. Dates as YYYY-MM-DD, or +N for N days from today (good for schedules). Add a return date for round trips.

## `cabinClass` (type: `string`):

Cabin class.

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

Passengers 12+.

## `children` (type: `integer`):

Ages 2-11.

## `infantsInSeat` (type: `integer`):

Under 2, own seat.

## `infantsOnLap` (type: `integer`):

Under 2, on lap.

## `maxStops` (type: `string`):

Maximum number of stops.

## `airlines` (type: `array`):

Only these airlines, as 2-letter codes (e.g. BA, UA, SQ). Empty = all.

## `maxPrice` (type: `integer`):

Skip flights above this price (in the chosen currency). Skipped flights are not charged.

## `maxDurationHours` (type: `integer`):

Skip flights longer than this. Skipped flights are not charged.

## `onlyBestFlights` (type: `boolean`):

Only the flights Google ranks as best (price and convenience).

## `maxFlightsPerRoute` (type: `integer`):

Cheapest and best come first.

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

Three-letter code: USD, EUR, GBP, JPY, TWD...

## `countryCode` (type: `string`):

Two-letter code. Prices can differ by the traveller's country.

## `concurrency` (type: `integer`):

How many routes to search at the same time.

## `proxyConfiguration` (type: `object`):

Every search and retry uses a new IP.

## Actor input object example

```json
{
  "routes": [
    "JFK-LHR +30",
    "SFO-NRT 2026-12-10 2026-12-20"
  ],
  "cabinClass": "economy",
  "adults": 1,
  "children": 0,
  "infantsInSeat": 0,
  "infantsOnLap": 0,
  "maxStops": "any",
  "airlines": [],
  "onlyBestFlights": false,
  "maxFlightsPerRoute": 100,
  "currency": "USD",
  "countryCode": "us",
  "concurrency": 5,
  "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 = {
    "routes": [
        "JFK-LHR +30",
        "SFO-NRT 2026-12-10 2026-12-20"
    ],
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("reportable_broth/google-flights-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 = {
    "routes": [
        "JFK-LHR +30",
        "SFO-NRT 2026-12-10 2026-12-20",
    ],
    "proxyConfiguration": { "useApifyProxy": True },
}

# Run the Actor and wait for it to finish
run = client.actor("reportable_broth/google-flights-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 '{
  "routes": [
    "JFK-LHR +30",
    "SFO-NRT 2026-12-10 2026-12-20"
  ],
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}' |
apify call reportable_broth/google-flights-scraper --silent --output-dataset

```

## MCP server setup

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