# Google Flights Scraper - All Fares, Price History, Calendar (`benthepythondev/google-flights-scraper`) Actor

Returns the flights Google Flights lists for a route and date: price, airlines, flight numbers, times, stops, layovers, aircraft, legroom and CO2, with Google's price insights (usual price, typical range, 60 days of history). Whole lists, fare calendars, round trips. No browser, no login.

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

## Pricing

from $0.70 / 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.
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 Scraper

Returns the flights Google Flights lists for a route and a date, without a browser or a login. One row per itinerary: price, airlines, flight numbers, departure and arrival times, stops and layovers, aircraft, legroom and CO2. Every row also carries Google's price insights for its search: the usual price, the typical range and whether today's price is low, typical or high. Search many routes and days in one run to get a fare calendar.

**Price:** $1.00 per 1,000 flights on the Apify Free plan, down to $0.70 from the Gold plan up. A search without flights costs nothing. Export to JSON, CSV or Excel, run on a schedule, call via API, or connect to Make, Zapier or n8n.

### 🔎 What is the Google Flights Scraper?

A Google Flights search page carries its results inside the page. This Actor builds the search the way Google's own links encode it, loads that page once and reads the results from it. One search is one request of about two seconds. No browser runs, so 512 MB of memory is enough, and several searches go side by side.

It reads the page in the state Google shows after "View more flights". In a test of Frankfurt to Bangkok the page held 9 itineraries at first and 54 in that state; New York to Los Angeles gave 120.

#### What data does it extract?

- **Price:** as Google shows it for the search, in the currency you choose
- **Flights:** airlines, flight numbers, aircraft and legroom of every leg
- **Times:** local departure and arrival time of the trip and of each leg, travel time in minutes
- **Stops:** number of stops, and for each layover the airport, city and waiting time
- **CO2:** Google's estimate per passenger, the typical value for the route and the difference in percent
- **Price insights:** the lowest price of the search, the usual price, the typical range, a level (low, typical, high) and, on request, about 60 days of price history
- **Link:** the search on Google Flights, to open and compare

#### What to know before you compare

The issue page of the most used Google Flights Actor on Apify was read on October 4, 2026. The complaint that returns there is "fares do not match Google's price". Three things explain most differences, and this Actor states them on every row: prices depend on the **currency and country** of the search (`currency`, shown on the row), they are the **total for all passengers** (one adult $295, two adults $589 on the same flights in a test), and for a round trip they are the price of the **whole trip**. `searchUrl` opens the very search the row came from.

### ⬇️ Input

| Field | Type | Default | What it does |
|---|---|---|---|
| `origins` | array | | Three-letter airport or city codes (`JFK`, `LHR`, `NYC`). Every origin is searched with every destination |
| `destinations` | array | | Three-letter airport or city codes |
| `departureDate` | string | | First departure day (YYYY-MM-DD) |
| `departureInDays` | integer | 30 | Used without a date: start this many days from today |
| `days` | integer | 1 | Number of departure days in a row, up to 90 |
| `returnDate` | string | | Makes it a round trip |
| `stayDays` | integer | | Or: return this many days after each departure |
| `maxResults` | integer | 20 | Flights to save per route and day, up to 500 |
| `sortBy` | string | `best` | `best` (Google's order), `price`, `duration`, `departure`, `arrival`, `emissions` |
| `stops` | string | any | `0` nonstop only, `1` or `2` at most that many stops |
| `cabinClass` | string | `economy` | `economy`, `premium_economy`, `business`, `first` |
| `adults`, `children`, `infantsInSeat`, `infantsOnLap` | integer | 1, 0, 0, 0 | Passengers |
| `onlyAirlines` | array | | Two-character airline codes (`DL`, `BA`) |
| `currency` | string | `USD` | Three-letter currency code |
| `includePriceHistory` | boolean | false | Adds about 60 daily values of the lowest price to each row |
| `links` | array | | Search links copied from Google Flights |

An empty input searches New York (JFK) to Los Angeles 30 days from today.

#### Example input

One route on one day, the 50 best options:

```json
{
  "origins": ["JFK"],
  "destinations": ["LAX"],
  "departureDate": "2026-11-03",
  "maxResults": 50
}
```

A fare calendar: the cheapest flight of each day for four routes over 30 days (120 searches, 120 rows):

```json
{
  "origins": ["JFK", "ORD"],
  "destinations": ["LAX", "MIA"],
  "departureInDays": 14,
  "days": 30,
  "maxResults": 1,
  "sortBy": "price"
}
```

A round trip with a week's stay, in euros:

```json
{
  "origins": ["BER"],
  "destinations": ["PMI"],
  "departureDate": "2026-11-18",
  "stayDays": 7,
  "currency": "EUR",
  "maxResults": 30
}
```

Nonstop business class for two, on two airlines:

```json
{
  "origins": ["JFK"],
  "destinations": ["LHR"],
  "departureInDays": 30,
  "stops": "0",
  "cabinClass": "business",
  "adults": 2,
  "onlyAirlines": ["BA", "VS"],
  "currency": "GBP"
}
```

#### Coming from another Google Flights Actor?

These input names of the most used Google Flights Actors are read as they are: `departure_id`, `arrival_id`, `outbound_date`, `return_date`, `max_stops`, `airlines`, `hl`, `gl`, and `origin`, `destination`, `departDate`, `returnDate`, `maxStops`, `maxItems`, `market`, `language`, `startUrls`, `flightUrl`. An input like this one runs here unchanged:

```json
{
  "departure_id": "LAX",
  "arrival_id": "JFK",
  "outbound_date": "2026-11-04",
  "return_date": "2026-11-09",
  "adults": 1,
  "currency": "USD",
  "max_stops": 1,
  "airlines": "AA,DL"
}
```

### ⬆️ Output

One row per itinerary. The first row of the sample search:

```json
{
  "origin": "JFK",
  "destination": "LAX",
  "departureDate": "2026-11-03",
  "returnDate": null,
  "tripType": "one_way",
  "cabinClass": "economy",
  "currency": "USD",
  "price": 179,
  "isBest": true,
  "airlines": ["JetBlue"],
  "flightNumbers": ["B6 618", "B6 387"],
  "departureAirport": "JFK",
  "departureTime": "2026-11-03T15:14",
  "arrivalAirport": "LAX",
  "arrivalTime": "2026-11-03T21:34",
  "durationMinutes": 560,
  "stops": 1,
  "layovers": [
    { "airport": "BOS", "airportName": "Boston Logan International Airport", "city": "Boston", "minutes": 61, "changeOfAirport": false }
  ],
  "legs": [
    {
      "flightNumber": "B6 618",
      "airline": "JetBlue",
      "airlineCode": "B6",
      "departureAirport": "JFK",
      "departureAirportName": "John F. Kennedy International Airport",
      "departureTime": "2026-11-03T15:14",
      "arrivalAirport": "BOS",
      "arrivalAirportName": "Boston Logan International Airport",
      "arrivalTime": "2026-11-03T16:59",
      "durationMinutes": 105,
      "aircraft": "Airbus A220-300 Passenger",
      "legroom": "32 inches"
    },
    {
      "flightNumber": "B6 387",
      "airline": "JetBlue",
      "airlineCode": "B6",
      "departureAirport": "BOS",
      "departureAirportName": "Boston Logan International Airport",
      "departureTime": "2026-11-03T18:00",
      "arrivalAirport": "LAX",
      "arrivalAirportName": "Los Angeles International Airport",
      "arrivalTime": "2026-11-03T21:34",
      "durationMinutes": 394,
      "aircraft": "Airbus A320",
      "legroom": "33 inches"
    }
  ],
  "co2Kg": 480,
  "co2TypicalKg": 346,
  "co2DifferencePercent": 39,
  "lowestPrice": 179,
  "usualPrice": 144,
  "typicalPriceLow": 85,
  "typicalPriceHigh": 240,
  "priceLevel": "typical",
  "searchUrl": "https://www.google.com/travel/flights/search?tfs=GhoSCjIwMjYtMTEtMDNqBRIDSkZLcgUSA0xBWEIBAUgBmAEC&tfu=EgQIABABIgA&hl=en&gl=us&curr=USD",
  "position": 1,
  "scrapedAt": "2026-10-04T14:14:45.153409+00:00"
}
```

Times are local times of the airports. `lowestPrice`, `usualPrice`, the typical range and `priceLevel` describe the search and are the same on all of its rows; `priceLevel` is `low` below the typical range, `high` above it. With `includePriceHistory` each row also has `priceHistory`, a list of `{ "date": "2026-08-05", "price": 174 }`. The run writes a `SUMMARY` record with the number of flights per search and the searches without flights.

### 💰 What a run costs

| Apify plan | Per 1,000 flights |
|---|---|
| Free | $1.00 |
| Bronze | $0.90 |
| Silver | $0.80 |
| Gold, Platinum, Diamond | $0.70 |

Apify's standard start event ($0.00005) is the only other charge; proxies are included. A fare calendar with one row per search costs one flight per route and day: 120 searches are 12 cents on the Free plan. Not charged: a search without flights and a search Google did not serve. Set the run's maximum charge and the Actor stops at it with the rows it has saved.

### ⏱️ Measured (October 4, 2026)

| Run | Flights | Time |
|---|---|---|
| Empty input (sample search) | 20 | 2 s |
| The whole list of one busy route (29 nonstop, 87 with one stop, 4 with two) | 120 | 3 s |
| Two routes on seven days, the cheapest flight of each | 14 | 6 s |
| Four routes on thirty days, the cheapest flight of each | 120 | 44 s |
| A round trip with a week's stay | 28 | 3 s |
| Nonstop business class for two on two airlines | 17 | 3 s |

A run of 80 searches that was killed after nine seconds and started again ended with 400 rows from 80 searches, none of them twice.

### 🤖 For AI agents

Smallest useful call:

```json
{"origins": ["JFK"], "destinations": ["LAX"], "departureDate": "2026-11-03", "maxResults": 10, "sortBy": "price"}
```

Each row is one itinerary with `price`, `currency`, `airlines`, `flightNumbers`, `departureTime`, `arrivalTime`, `durationMinutes`, `stops`, `layovers` and `priceLevel`. Add `returnDate` for a round trip. Add `"days": 7` to search a week of departures. A route without flights returns no rows; the status message and the `SUMMARY` record name it. No credentials are needed.

### 💡 Use cases

- 📉 **Fare tracking:** a daily schedule over your routes and dates, with Google's own judgement whether a price is low.
- 🗓️ **Cheapest day to fly:** one row per day over the next months.
- 🧳 **Travel apps and agents:** real itineraries with times, layovers and aircraft for an itinerary planner.
- 🌱 **Emissions reporting:** CO2 per itinerary against the typical value of the route.

### ⚠️ Limits, stated plainly

- **Airports and cities are given as codes.** `JFK`, `LHR`, `NYC`; names such as "New York" are skipped with a note.
- **A round trip lists the outbound flights.** Each row has Google's price for the whole trip; the return flights to choose from are not listed.
- **No booking links and no fares of single sellers.** `searchUrl` opens the search on Google Flights.
- **The price is the total for all passengers** of the search, as Google shows it.
- **The airline filter is Google's:** it keeps code-share partners. A search for British Airways and Virgin Atlantic also returned flights sold by American and Delta.
- **Price insights as Google gives them.** When Google publishes no typical range for a search, `priceLevel` is empty.
- **90 departure days and 2,000 searches per run.** A departure date in the past is moved to today.
- **The Actor reads Google's page.** If Google changes it, a search ends as "another shape" in the status message and is not charged.

### ❓ FAQ

**Do I need a Google account, an API key or a proxy?** No.

**How many flights does a search return?** As many as Google lists after "View more flights": about 120 on a busy route, fewer on small ones. `maxResults` cuts the list after sorting.

**How do I get the cheapest price per day?** Set `days`, `maxResults` to 1 and `sortBy` to `price`. Each day of each route gives one row.

**Why does my price differ from what I see in the browser?** Check the currency, the number of passengers and whether you compare a one-way with a round trip. Open `searchUrl` to see the same search.

**Can I search several routes at once?** Yes. Every origin is combined with every destination, four searches at a time.

**Does it support city codes?** Yes, Google's own: `NYC` or `LON` cover all airports of the city.

**Can I schedule it?** Yes. Use `departureInDays` instead of a fixed date, so the search moves with the calendar.

**What does `priceLevel` mean?** Google publishes a typical price range for many searches. The level says whether the lowest price of your search is below it, inside it or above it.

**How do I call it from code?** With the Apify API or the Python and JavaScript clients; every run returns a dataset you can fetch as JSON or CSV. It also works as a tool through Apify's MCP server.

**Is it legal?** The Actor reads flight offers that Google shows to everyone without a login. It collects no personal data. Google's terms apply to you as well.

### 🔗 You might also like

- [Ryanair Flights Scraper](https://apify.com/benthepythondev/ryanair-flights-scraper): Ryanair's own fares by route and date window
- [Wizz Air Flight Scraper](https://apify.com/benthepythondev/wizzair-flight-scraper): Wizz Air's fare calendar and cheapest days
- [Airbnb Scraper](https://apify.com/benthepythondev/airbnb-search-scraper): stays with prices for dates and guests
- [Tripadvisor Reviews Scraper](https://apify.com/benthepythondev/tripadvisor-reviews-scraper): reviews of hotels, restaurants and attractions

**Keywords:** google flights scraper, google flights api, flight price api, flight search data, cheap flights data, fare calendar, flight price tracker, flight price history, airfare data, flight prices csv, google flights price insights, flight emissions data, travel api, flight data for ai agents, no browser google flights

# Actor input Schema

## `origins` (type: `array`):

Three-letter airport or city codes, for example JFK, LHR or NYC for all New York airports. Every origin is searched with every destination.

## `destinations` (type: `array`):

Three-letter airport or city codes.

## `departureDate` (type: `string`):

The first departure day (YYYY-MM-DD). Without a date the search starts the number of days ahead that is set below.

## `departureInDays` (type: `integer`):

Used when no departure date is given: the search starts this many days from today. Useful for schedules, where a fixed date would grow old.

## `days` (type: `integer`):

Searches this many days in a row, starting at the departure date: one search per route and day. With one result per search and the order "price" this gives a fare calendar.

## `returnDate` (type: `string`):

Makes the search a round trip (YYYY-MM-DD). Rows are the outbound flights with Google's price for the whole trip. Over several departure days the stay keeps its length.

## `stayDays` (type: `integer`):

Makes the search a round trip that returns this many days after each departure.

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

Rows to save for each route and day, taken from the top of the chosen order. A busy route has about 120 itineraries.

## `sortBy` (type: `string`):

Google's own order puts its best flights first and the others after them. The other orders sort the whole list before the limit is applied.

## `stops` (type: `string`):

Google's stops filter.

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

The cabin the prices are for.

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

Number of adult passengers.

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

Passengers aged 2 to 11.

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

Passengers under 2 with their own seat.

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

Passengers under 2 without a seat.

## `onlyAirlines` (type: `array`):

Two-character airline codes such as DL, BA or LH. Google keeps flights of these airlines and their code-share partners.

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

Three-letter currency code for the prices, for example USD, EUR or GBP.

## `includePriceHistory` (type: `boolean`):

Adds Google's history of the lowest price for the search, about 60 daily values, to each row. It makes rows larger; with one result per search it is one history per route and day.

## `links` (type: `array`):

Search links copied from Google Flights (they contain tfs=). The search is run as the link defines it.

## Actor input object example

```json
{
  "origins": [
    "JFK"
  ],
  "destinations": [
    "LAX"
  ],
  "departureInDays": 30,
  "days": 1,
  "maxResults": 20,
  "sortBy": "best",
  "stops": "any",
  "cabinClass": "economy",
  "adults": 1,
  "children": 0,
  "infantsInSeat": 0,
  "infantsOnLap": 0,
  "currency": "USD",
  "includePriceHistory": false
}
```

# Actor output Schema

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

No description

## `summary` (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 = {
    "origins": [
        "JFK"
    ],
    "destinations": [
        "LAX"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("benthepythondev/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 = {
    "origins": ["JFK"],
    "destinations": ["LAX"],
}

# Run the Actor and wait for it to finish
run = client.actor("benthepythondev/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 '{
  "origins": [
    "JFK"
  ],
  "destinations": [
    "LAX"
  ]
}' |
apify call benthepythondev/google-flights-scraper --silent --output-dataset

```

## MCP server setup

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