# Google Flights Scraper — Google Flights API & Prices | $0.80/1k (`glasswing/google-flights-scraper`) Actor

Scrape Google Flights: prices, airlines, flight numbers, times, stops, layovers, duration and CO2 for any route and dates. One-way or round trip, batch routes.

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

## Pricing

from $0.64 / 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

### What does Google Flights Scraper do?

Google Flights Scraper reads **Google Flights** (google.com/travel/flights) and turns every itinerary it lists for a route and your dates into one clean row: **price**, airlines, **flight numbers**, departure and arrival airports and local times, total duration, number of stops, **layovers** (airport, city, wait time), Google's CO2 estimate, included bags, Google's "top flight" ranking and its price level for those dates (low, typical or high).

It works like a Google Flights API: type an origin and a destination (airport codes such as `JFK` or city names such as `London`), pick dates, passengers and filters, run, and export CSV, Excel or JSON. Add as many routes as you like in one run.

- **Try it:** the prefill (JFK to LAX, one way, 30 days from today) returns 20 itineraries in well under a minute.
- **One-way or round trip**, 1-9 adults and up to 8 children, economy to first class, nonstop / 1-stop / 2-stop filters, airline include and exclude lists, maximum price, any currency and Google market.
- **No proxy setup, no Google account:** the Actor uses Apify's datacenter proxy, which is included in the price.

### Use cases for this Google Flights scraper

- **Fare monitoring and price alerts** - schedule the same routes every day and watch `price` and `priceLevel` move.
- **Travel startups and agencies** - fill a flight search or a deals newsletter with real fares, airlines, times and stops.
- **Airline and airport analysis** - who flies a route, how many nonstop options exist, typical durations and layover hubs.
- **Revenue and pricing research** - compare fares by market (`country`), cabin class and days before departure.
- **Corporate travel** - check the cheapest compliant itinerary for a list of trips in one batch.
- **AI agents and travel assistants** - structured JSON a model can filter by price, stops, departure time and emissions.
- **Automation** - send results to Google Sheets, Airtable or Slack via Make, n8n or Zapier.

### What data can Google Flights Scraper extract?

| Field | Example | Notes |
|---|---|---|
| `route` | JFK-LAX | Searched route (airport codes, or city names for city searches) |
| `position` | 1 | Position in Google's list |
| `price` | 224.2 | Total for all passengers; on round trips the round-trip total |
| `currency` | USD | Any currency you choose |
| `priceIsRoundTripTotal` | true | Present on round trips |
| `isBest` | true | Google ranks it under Top flights |
| `airlines` | \["American"] | Airlines Google names |
| `airlineCodes` | \["AA"] | IATA codes of the marketing airlines |
| `operatedBy` | Republic Airways as American Eagle | When another carrier operates the flight |
| `flightNumbers` | \["AA 537", "AA 2291"] | Every segment |
| `origin` / `destination` | JFK / LAX | Airport codes of this itinerary (a city search can return several airports) |
| `departureAirport` / `arrivalAirport` | John F. Kennedy International Airport / Los Angeles International Airport | Names |
| `departureTime` / `arrivalTime` | 2026-11-24T09:28 / 2026-11-24T15:33 | Local times |
| `durationMinutes` / `duration` | 545 / 9 hr 5 min | Total travel time including layovers |
| `stops` | 1 | 0 = nonstop |
| `layovers` | \[{"airportCode": "PHX", "airport": "Phoenix Sky Harbor International Airport", "city": "Phoenix", "durationMinutes": 117}] | One entry per stop, `overnight` when Google says so |
| `segments` | \[{"from": "JFK", "to": "PHX", "airlineCode": "AA", "flightNumber": "AA 537", "date": "2026-11-24"}] | One entry per flight |
| `co2Kg` / `typicalCo2Kg` / `co2VsTypicalPercent` | 308 / 344 / -10 | Google's emissions estimate for the searched passengers |
| `carryOnBagsIncluded` / `checkedBagsIncluded` | 1 / 0 | When Google states it |
| `overheadBinIncluded` | false | Present when the fare excludes overhead bin access (basic economy) |
| `priceLevel` | typical | Google's price insight for the searched dates: low, typical or high |
| `bookingToken` | CjRIbUp5... | Google's id for this itinerary, handy for de-duplication when monitoring |
| `googleFlightsUrl` | https://www.google.com/travel/flights?tfs=... | Open the search on Google Flights |
| `searchOrigin`, `searchDestination`, `tripType`, `departureDate`, `returnDate`, `adults`, `children`, `cabinClass`, `maxStopsFilter`, `airlinesFilter`, `country` | JFK, LAX, one_way, 2026-11-24 ... | The search, echoed from what Google ran |
| `status`, `error`, `scrapedAt` | ok | See below |

Field coverage on the prefilled run: price, airlines, flight numbers, times, duration, stops and CO2 100%; bags as Google states them.

#### Result status (tri-state output)

Every row has a `status`:

- `ok` - an itinerary was extracted. Only these rows are billed.
- `not_found` - Google listed no flights for the search (no service on that route or date, or a place it could not match). Free.
- `error` - a page could not be read after retries, or a route in the input was invalid (for example a date in the past); `error` says why. Free.

### How to scrape Google Flights with this Actor

1. **Enter the route** - `From` and `To` as airport codes (`JFK`, `LHR`), metro codes (`NYC`, `LON`) or city names (`New York`, `Barcelona`).
2. **Pick dates** - a departure date (empty = 30 days from today) and, for a round trip, a return date.
3. **Set passengers and filters** - adults, children, cabin class, stops, airlines to include or exclude, maximum price, currency and country.
4. **Add more routes (optional)** - one per line in Batch routes: `LHR-BCN`, `Paris to Rome`, `SFO-NRT, 2026-12-10, 2026-12-20`.
5. **Run** - itineraries appear in Google's order. Export as CSV, Excel, JSON or HTML, or read them through the API.

Google lists about 10-35 itineraries per search; Maximum results is split evenly across the routes. City names cost one extra page (Google resolves the name first), the price per itinerary stays the same.

### How much does it cost to scrape Google Flights?

Pay per result: **$0.80 per 1,000 itineraries** plus a $0.005 start fee per run. The proxy and platform usage are included.

| Event | Price | Charged when |
|---|---|---|
| Actor start | $0.005 | Once per run (default 1 GB memory) |
| Flight itinerary | $0.0008 | One itinerary with status `ok` saved to the dataset |

Examples: 100 itineraries cost about $0.09, 1,000 about $0.81, 10,000 about $8. Rows with status `not_found` or `error`, and itineraries your filters skip, are never charged. The Actor stops gracefully when your run's maximum charge is reached.

### Input

| Field | What it does |
|---|---|
| `origin` / `destination` | Airport code, metro code or city name. |
| `departureDate` / `returnDate` | `YYYY-MM-DD`. Empty departure = 30 days from today; empty return = one way. |
| `routes` | More searches, one per line: `JFK-LAX`, `New York to London`, `LHR-BCN, 2026-12-10, 2026-12-17`. |
| `adults` / `children` | 1-9 adults, 0-8 children (2-11 years). The price covers everyone. |
| `cabinClass` | `economy`, `premium_economy`, `business` or `first`. |
| `maxStops` | `any`, `0` (nonstop), `1` or `2`. |
| `airlines` | Only these airlines: IATA codes (`DL`, `BA`) or `STAR_ALLIANCE`, `ONEWORLD`, `SKYTEAM`. |
| `excludeAirlines` | Skip itineraries with these airlines (codes or names, e.g. `NK`, `Spirit`). |
| `maxPrice` | Skip itineraries above this total price. |
| `currency` | `USD`, `EUR`, `GBP`, `JPY` and any other code Google supports. |
| `country` | Two-letter Google market (`us`, `gb`, `de`, `in` ...). |
| `startUrls` | Optional Google Flights URLs from your browser; their own dates and filters are used. The prefilled example URL is skipped while a route is filled in. |
| `maxItems` | Maximum rows in total. |

Example input (the prefill):

```json
{
    "origin": "JFK",
    "destination": "LAX",
    "currency": "USD",
    "maxItems": 20
}
```

Three routes, round trip, two adults and a child, at most one stop, no Spirit, in euros for the UK market:

```json
{
    "origin": "New York",
    "destination": "London",
    "departureDate": "2026-12-10",
    "returnDate": "2026-12-17",
    "routes": ["LHR-BCN", "Paris to Rome, 2026-12-12"],
    "adults": 2,
    "children": 1,
    "maxStops": "1",
    "excludeAirlines": ["NK"],
    "currency": "EUR",
    "country": "gb",
    "maxItems": 60
}
```

### Output

A real row from the prefilled run (booking token and links shortened):

```json
{
    "url": "https://www.google.com/travel/flights?tfs=CBwQAhoeEgoyMDI2LTExLTI0agcIARIDSkZL...&hl=en&gl=us&curr=USD",
    "status": "ok",
    "scrapedAt": "2026-10-25T19:15:59.154Z",
    "route": "JFK-LAX",
    "position": 1,
    "price": 224.2,
    "currency": "USD",
    "isBest": true,
    "airlines": ["American"],
    "airlineCodes": ["AA"],
    "flightNumbers": ["AA 537", "AA 2291"],
    "origin": "JFK",
    "destination": "LAX",
    "departureAirport": "John F. Kennedy International Airport",
    "arrivalAirport": "Los Angeles International Airport",
    "departureTime": "2026-11-24T09:28",
    "arrivalTime": "2026-11-24T15:33",
    "durationMinutes": 545,
    "duration": "9 hr 5 min",
    "stops": 1,
    "layovers": [
        { "airportCode": "PHX", "airport": "Phoenix Sky Harbor International Airport", "city": "Phoenix", "duration": "1 hr 57 min", "durationMinutes": 117 }
    ],
    "segments": [
        { "from": "JFK", "to": "PHX", "airlineCode": "AA", "flightNumber": "AA 537", "date": "2026-11-24" },
        { "from": "PHX", "to": "LAX", "airlineCode": "AA", "flightNumber": "AA 2291", "date": "2026-11-24" }
    ],
    "co2Kg": 308,
    "typicalCo2Kg": 344,
    "co2VsTypicalPercent": -10,
    "carryOnBagsIncluded": 1,
    "checkedBagsIncluded": 0,
    "bookingToken": "CjRIbUp5OXVfSktLallBUmFXT0FCRy0tLS0tLW9rZ2QxNS1uMUFB...",
    "priceLevel": "typical",
    "searchOrigin": "JFK",
    "searchDestination": "LAX",
    "tripType": "one_way",
    "departureDate": "2026-11-24",
    "adults": 1,
    "children": 0,
    "cabinClass": "economy",
    "maxStopsFilter": "any",
    "country": "us",
    "googleFlightsUrl": "https://www.google.com/travel/flights?tfs=CBwQAhoeEgoyMDI2LTExLTI0agcIARIDSkZL...&hl=en&gl=us&curr=USD"
}
```

A missing field is honest: Google did not show it for that itinerary. Flight data contains no personal data.

### Integrations, exports and API access

Download results as CSV, Excel, JSON, XML or HTML from the run's Storage tab, or read them with the Apify API:

```bash
curl "https://api.apify.com/v2/acts/glasswing~google-flights-scraper/run-sync-get-dataset-items?token=<YOUR_TOKEN>" \
  -X POST -H "Content-Type: application/json" \
  -d '{"origin": "SFO", "destination": "NRT", "departureDate": "2026-12-10", "returnDate": "2026-12-20", "maxItems": 30}'
```

The Actor also works from Make, n8n, Zapier, Google Sheets and any MCP client or AI agent (plain JSON input; every field has a default).

### Tips

- For daily fare tracking, schedule the same routes with fixed dates and compare `price` per `bookingToken` or per `flightNumbers`.
- Use a metro code (`NYC`, `LON`, `TYO`) or a city name to search every airport of a city at once.
- `price` is the total for all passengers you set; divide by the passenger count for a per-person fare.
- Set `country` to your customers' market: Google can price the same flight differently per point of sale.

### Limitations

- **Round trips:** each row is an outbound itinerary with Google's round-trip total price; the return flight is chosen on Google's next screen and is not listed.
- **Depth:** Google shows about 10-35 itineraries per search (its top and other flights); the Actor returns all of them.
- **Infants:** not supported, because Google does not list results for infant passengers without a browser.
- **No price calendar or "explore anywhere" mode** in this version; search specific dates (a batch of dates works).
- **Aircraft type and legroom** are not on the results page and are not returned.
- **Prices change:** they are Google's live prices at the time of the run. Results are in English.

### FAQ

#### Is it legal to scrape Google Flights?

The Actor reads only public Google Flights pages, without logging in. Fares, schedules and airline names are public business information, and no personal data is involved. Check Google's terms and your local law for your use case.

#### Can I use this Actor from an AI agent or MCP client?

Yes. Every field has a default, so a call with just `{"origin": "BOS", "destination": "MIA"}` works.

#### Why did I get fewer rows than `maxItems`?

Google listed fewer itineraries for that route and date, your filters (`maxPrice`, `excludeAirlines`) skipped some, or `maxItems` was split across several routes.

#### Why is a route `not_found`?

Google showed no flights for it: no service on that day, a place name it could not match, or filters that remove everything (for example nonstop only on a route without nonstop flights).

#### Do I need a proxy or a Google account?

No. The proxy is set up and paid for by the Actor; no Google account is used.

#### What if a field is missing?

Google did not show it for that itinerary. Fields are omitted rather than guessed.

### Related Actors

- [Ryanair Flights Scraper](https://apify.com/glasswing/ryanair-flights-scraper) - Ryanair fares and flight schedules for your travel dates.
- [Google Hotels Scraper](https://apify.com/glasswing/google-hotels-scraper) - hotel prices, ratings and amenities for the same trip.
- [Google Trends Scraper](https://apify.com/glasswing/google-trends-scraper) - search interest over time, to time travel demand.
- [Google Maps Scraper](https://apify.com/glasswing/google-maps-scraper) - places and businesses at your destination.
- [Keyword Suggestions Scraper](https://apify.com/glasswing/keyword-suggestions-scraper) - Google autocomplete ideas for travel keywords.

### Legal and data-protection notice

This Actor extracts only data that Google Flights publishes publicly; it does not extract private user data such as e-mail addresses, phone numbers, gender or precise location, and it does not log in or circumvent access controls. However, your results could still contain personal data. Personal data is protected by the GDPR in the European Union and by other regulations around the world. You should not scrape personal data unless you have a legitimate reason to do so. If you are unsure whether your reason is legitimate, consult your lawyers. You are responsible for complying with Google's terms of service and applicable law when using the extracted data.

This Actor is an independent tool and is not affiliated with, endorsed by or sponsored by Google or its owners. All trademarks belong to their respective owners.

# Changelog

This Actor's version history is a separate document: https://apify.com/glasswing/google-flights-scraper/changelog.md

# Actor input Schema

## `origin` (type: `string`):

IATA airport code (`JFK`, `LHR`), metro code (`NYC`, `LON`) or a city name as you would type it into Google Flights (`New York`). City names are resolved by Google (one extra page).

## `destination` (type: `string`):

IATA airport code (`LAX`, `BCN`), metro code or city name.

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

YYYY-MM-DD. Leave empty for 30 days from today. Google sells flights up to about 11 months ahead.

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

YYYY-MM-DD for a round trip (the price is then the round-trip total and the row shows the outbound flight). Leave empty for one way.

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

More searches in one run, one per line: `JFK-LAX`, `New York to London` or `LHR-BCN, 2026-12-10, 2026-12-17` (dates optional; without them the dates above are used). Maximum results is split evenly across all routes.

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

Number of adult passengers (1-9). The price is the total for all passengers.

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

Number of child passengers (0-8). Infants are not supported (Google does not list results for them without a browser).

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

Seating class to price.

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

Maximum number of stops per direction.

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

IATA airline codes (`DL`, `BA`, `LH`) or alliances (`STAR_ALLIANCE`, `ONEWORLD`, `SKYTEAM`). Google then lists only flights with these airlines. Leave empty for all.

## `excludeAirlines` (type: `array`):

IATA airline codes (`NK`, `F9`) or airline names as Google shows them (`Spirit`); itineraries with any of them are skipped (not charged).

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

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

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

Three-letter currency code for all prices (USD, EUR, GBP, JPY ...).

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

Two-letter country code of the market Google prices for (`us`, `gb`, `de`, `in` ...). Fares can differ by point of sale. Results are always in English.

## `startUrls` (type: `array`):

Optional: Google Flights search URLs copied from your browser (`https://www.google.com/travel/flights/search?tfs=...` or `...?q=...`). Each URL is one search with its own dates and filters. The prefilled example URL is skipped while a route is filled in above.

## `maxItems` (type: `integer`):

Stop after this many rows have been saved. Each itinerary with status `ok` is one billable result. Split evenly across routes; Google lists about 10-35 itineraries per search.

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

Optional. The Actor reads Google Flights over plain HTTP and works from Apify's datacenter IPs; residential proxies are not needed.

## Actor input object example

```json
{
  "origin": "JFK",
  "destination": "LAX",
  "routes": [],
  "adults": 1,
  "children": 0,
  "cabinClass": "economy",
  "maxStops": "any",
  "airlines": [],
  "excludeAirlines": [],
  "currency": "USD",
  "country": "us",
  "startUrls": [
    "https://www.google.com/travel/flights?q=Flights%20from%20LHR%20to%20BCN%20one%20way"
  ],
  "maxItems": 20,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# 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 = {
    "origin": "JFK",
    "destination": "LAX",
    "currency": "USD",
    "startUrls": [
        "https://www.google.com/travel/flights?q=Flights%20from%20LHR%20to%20BCN%20one%20way"
    ],
    "maxItems": 20,
    "proxyConfiguration": {
        "useApifyProxy": false
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("glasswing/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 = {
    "origin": "JFK",
    "destination": "LAX",
    "currency": "USD",
    "startUrls": ["https://www.google.com/travel/flights?q=Flights%20from%20LHR%20to%20BCN%20one%20way"],
    "maxItems": 20,
    "proxyConfiguration": { "useApifyProxy": False },
}

# Run the Actor and wait for it to finish
run = client.actor("glasswing/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 '{
  "origin": "JFK",
  "destination": "LAX",
  "currency": "USD",
  "startUrls": [
    "https://www.google.com/travel/flights?q=Flights%20from%20LHR%20to%20BCN%20one%20way"
  ],
  "maxItems": 20,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}' |
apify call glasswing/google-flights-scraper --silent --output-dataset

```

## MCP server setup

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