# Google Flights Scraper — All Flights, Prices & Price Calendar (`vor_al/google-flights-scraper`) Actor

Scrape Google Flights: every itinerary for a route with price, airlines, flight numbers, stops, layovers, duration, aircraft, legroom and CO2, plus Google price insights. Price calendar mode returns the cheapest fare for each day. Fast HTTP, no browser.

- **URL**: https://apify.com/vor_al/google-flights-scraper.md
- **Developed by:** [Aliaksei Varabyou](https://apify.com/vor_al) (community)
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 14.3% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

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

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 — All Flights, Prices & Price Calendar

Scrape **Google Flights** for any route and date and get every itinerary Google shows — not just the top few — with price, airlines, flight numbers, departure and arrival times, total duration, stops and layovers, aircraft, legroom and CO2 emissions, plus Google's price insight ("prices are currently low / typical / high" and the typical price range).

**Price calendar mode** returns the cheapest fare for every departure day in a date range (one-way, or round-trip with a fixed trip length) — perfect for "when is it cheapest to fly?".

Fast HTTP scraper, **no browser**: a route with 150+ flights takes 1–2 seconds.

### Use cases

- **Fare monitoring** — schedule daily runs and build a price history for your routes.
- **Cheapest-date finder** — scan 3–4 months of departure dates in one run.
- **Travel apps & AI agents** — live flight options for an itinerary in a single call; pairs well with [Google Hotels Scraper](https://apify.com/vor_al/google-hotels-scraper).
- **Airline & route analytics** — who flies a route, how often, nonstop vs connections, emissions.

### Input

| Field | Description | Default |
|---|---|---|
| `mode` | `flights` (itineraries for dates) or `priceCalendar` (cheapest price per day) | flights |
| `routes` | `WAW-BCN`, several airports `LHR,LGW-JFK`, city codes `LON-NYC`, `PAR-TYO` | required |
| `departureDate` / `returnDate` | `YYYY-MM-DD`; empty return = one-way | today + 30 days / none |
| `adults` / `children` | up to 9 passengers | 1 / 0 |
| `cabinClass` | economy, premium_economy, business, first | economy |
| `maxStops` | any, nonstop, max1, max2 | any |
| `currency` | USD, EUR, GBP, PLN… | USD |
| `maxResultsPerRoute` | itineraries to save per route | 100 |
| `calendarStartDate` / `calendarEndDate` / `tripLengthDays` | price calendar range (up to ~11 months) and trip length for round trips | next 60 days |

Flights for specific dates:

```json
{ "routes": ["WAW-BCN", "LON-NYC"], "departureDate": "2026-12-03", "returnDate": "2026-12-10", "currency": "EUR" }
```

Cheapest days for a 4-day round trip:

```json
{ "mode": "priceCalendar", "routes": ["BER-ROM"], "calendarStartDate": "2026-11-10", "calendarEndDate": "2027-02-28", "tripLengthDays": 4 }
```

### Output — flights

```json
{
  "route": "WAW-BCN",
  "tripType": "one_way",
  "position": 3,
  "isBest": true,
  "price": 123,
  "currency": "EUR",
  "airlines": ["SWISS"],
  "departureAirport": "WAW",
  "departureDate": "2026-12-03",
  "departureTime": "14:30",
  "arrivalAirport": "BCN",
  "arrivalTime": "19:05",
  "totalDurationMinutes": 275,
  "stops": 1,
  "layovers": [{ "airport": "ZRH", "city": "Zürich", "durationMinutes": 45, "changeOfAirport": false }],
  "segments": [
    { "flightNumber": "LX 1349", "airline": "SWISS", "aircraft": "Airbus A220-100", "departureAirport": "WAW", "departureTime": "14:30", "arrivalAirport": "ZRH", "arrivalTime": "16:35", "durationMinutes": 125, "legroom": "30 inches", "co2EmissionsKg": 127 },
    { "flightNumber": "LX 1956", "airline": "SWISS", "aircraft": "Airbus A321neo", "departureAirport": "ZRH", "departureTime": "17:20", "arrivalAirport": "BCN", "arrivalTime": "19:05", "durationMinutes": 105, "legroom": "29 inches", "co2EmissionsKg": 77 }
  ],
  "co2EmissionsKg": 205,
  "emissionsVsTypicalPercent": 3,
  "priceLevel": "typical",
  "typicalPriceLow": 40,
  "typicalPriceHigh": 130,
  "googleFlightsUrl": "https://www.google.com/travel/flights/search?tfs=..."
}
```

Prices are for all passengers. For round trips the price is the full round-trip fare and the segments describe the outbound flight (Google shows return options after an outbound is selected).

### Output — price calendar

```json
{ "route": "BER-ROM", "tripType": "round_trip", "departureDate": "2026-11-12", "returnDate": "2026-11-16", "tripLengthDays": 4, "price": 138, "currency": "USD", "googleFlightsUrl": "https://www.google.com/travel/flights/search?tfs=..." }
```

### Pricing

Pay per result: one charge per saved flight itinerary, a smaller charge per calendar day with a price. Days without flights are free. No monthly fee.

### FAQ

**Which codes can I use?** 3-letter IATA airport codes. Common city codes (LON, NYC, PAR, MIL, ROM, TYO, WAS, CHI, SAO…) are expanded to all their airports.

**Is it legal?** The scraper reads publicly available fare information only, no personal data. You are responsible for using the data in line with applicable laws and Google's terms.

**Need return flights for round trips, multi-city or an airline filter?** Open an issue — these are next on the roadmap.

# Actor input Schema

## `mode` (type: `string`):

Flights: all itineraries for the given dates. Price calendar: the cheapest price for each departure day in a date range.

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

One per line, IATA airport codes: "WAW-BCN". Several airports: "LHR,LGW-JFK". City codes are expanded: LON, NYC, PAR, MIL, ROM, TYO, WAS, CHI…

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

YYYY-MM-DD. Defaults to 30 days from today. In Price calendar mode it is the default start of the range.

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

YYYY-MM-DD. Leave empty for one-way. In Price calendar mode, departure + return dates define the trip length.

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

Number of adult passengers (1–9).

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

Number of children aged 2–11. Total passengers max 9.

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

Seat class to search.

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

Maximum number of stops per direction.

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

ISO 4217 code, e.g. USD, EUR, GBP, PLN.

## `maxResultsPerRoute` (type: `integer`):

Flights mode: how many itineraries to save per route (Google usually returns 50–300).

## `calendarStartDate` (type: `string`):

Price calendar mode: first departure date. Defaults to the departure date or tomorrow.

## `calendarEndDate` (type: `string`):

Price calendar mode: last departure date (up to ~11 months). Defaults to 60 days after the start.

## `tripLengthDays` (type: `integer`):

Price calendar mode: set for round trips (e.g. 7). Leave empty for one-way prices, or fill both departure and return dates instead.

## `language` (type: `string`):

Google interface language (hl), e.g. en, de, pl.

## `country` (type: `string`):

Google country (gl), e.g. us, gb, de, pl. Prices can differ by point of sale.

## `maxConcurrency` (type: `integer`):

How many routes to process at the same time.

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

Apify Proxy (datacenter) works for most runs.

## Actor input object example

```json
{
  "mode": "flights",
  "routes": [
    "WAW-BCN"
  ],
  "adults": 1,
  "children": 0,
  "cabinClass": "economy",
  "maxStops": "any",
  "currency": "USD",
  "maxResultsPerRoute": 100,
  "language": "en",
  "country": "us",
  "maxConcurrency": 3,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

## `flights` (type: `string`):

All itineraries with price, airlines, times, duration, stops, layovers, segments and CO2 (Flights mode).

## `calendar` (type: `string`):

Cheapest price per departure day (Price calendar mode).

# 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": [
        "WAW-BCN"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("vor_al/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": ["WAW-BCN"] }

# Run the Actor and wait for it to finish
run = client.actor("vor_al/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": [
    "WAW-BCN"
  ]
}' |
apify call vor_al/google-flights-scraper --silent --output-dataset

```

## MCP server setup

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