# Google Flights Scraper - Prices, Airlines, Times, Price Tracker (`rjmacarthy/google-flights-scraper`) Actor

Scrape Google Flights: every flight option with price, airlines, flight numbers, times, stops, layovers, aircraft and CO2, for one-way or round trips in any cabin. Free summary row with cheapest fare, typical price range and history. Price-tracker mode outputs only changes. No start fee.

- **URL**: https://apify.com/rjmacarthy/google-flights-scraper.md
- **Developed by:** [rj](https://apify.com/rjmacarthy) (community)
- **Categories:** Travel, MCP servers
- **Features:** Limited permissions
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.30 / 1,000 flight options

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 - Prices, Airlines, Times, Price Tracker

Scrape Google Flights for any route and date: every flight option with **price, airlines, flight numbers, departure
and arrival times, duration, stops, layovers, aircraft, legroom and CO2 emissions**, for one-way or round trips, in
economy, premium economy, business or first. Each route also gets a **free summary row** with the cheapest fare,
Google's usual price, its typical price range, a low / typical / high price level and up to 60 days of price history.
Switch on **price-tracker mode** and scheduled runs output only flights that are new or changed price, with the
previous price. **$0.30 per 1,000 flights and no run fee**, about 3x cheaper than the usual $0.90 per 1,000. Page
fetching is built in, no proxy setup needed.

### What data can you get

| Field | Example |
|---|---|
| `route`, `date`, `returnDate`, `tripType`, `cabin`, `adults` | JFK-LHR, 2026-12-19, 2027-01-03, round-trip, economy, 1 |
| `departureAirport`, `arrivalAirport` (+ `...Name`) | JFK (John F. Kennedy International Airport), LHR (Heathrow Airport) |
| `departureTime`, `arrivalTime`, `durationMinutes` | 2026-12-19T09:30, 2026-12-19T21:40 (local times), 430 |
| `stops`, `layovers` | 1, \[{ airport: RDU, city: Raleigh, durationMinutes: 511 }] |
| `airlines`, `flightNumbers`, `aircraft` | \[JetBlue], \[B61107], \[Airbus A321neo] |
| `legs` | per leg: flight number, airline, operated by, airports, times, duration, aircraft, legroom |
| `price`, `currency`, `isBest` | 2014, USD, true (in Google's "Best" group) |
| `emissionsKg`, `typicalEmissionsKg`, `emissionsVsTypicalPercent` | 588, 435, 35 |
| Summary row: `cheapestPrice`, `usualPrice`, `typicalPriceLow`, `typicalPriceHigh`, `priceLevel`, `priceHistory` | 1863, 765, 620, 1400, high, \[{ date: 2026-09-19, price: 950 }, ...] (61 days) |
| Price tracker: `changeType`, `previousPrice`, `previousCheapestPrice` | price_increase, 1726 (was 1600), 1027 |

Prices are the **total for all passengers**. For round trips Google prices the **whole trip**, and each row is an
outbound flight (see Tips and limits).

### Use cases

- **Fare tracking and price alerts:** schedule a daily run on your routes and get only the fares that moved.
- **Travel agencies and deal sites:** pull current fares for popular routes and flag the ones below Google's typical range.
- **Travel startups and AI agents:** feed real flight options (times, stops, airlines, prices) into planners and chatbots.
- **Airline and airport analysts:** compare carriers, schedules, aircraft and nonstop coverage on a route.
- **Corporate travel and sustainability teams:** compare CO2 per option against the route's typical emissions.

### How to use

1. Add one or more **routes**: `from`, `to`, `date` and, for a round trip, `returnDate`. Use 3-letter airport codes
   (JFK, LHR) or city codes such as LON or PAR (all London or Paris airports). Leave out `date` to search 30 days
   ahead; dates up to about 11 months ahead work.
2. Choose adults, cabin class, stops, currency and country.
3. Run it, then download the dataset as JSON, CSV or Excel, or use the API. The **Flights** view shows one row per
   option, the **Route summary** view the cheapest fare and price level per route.

New York to London, 30 days from today (the prefill):

```json
{ "routes": [{ "from": "JFK", "to": "LHR" }], "maxItems": 20 }
```

New York to London round trip over the holidays:

```json
{ "routes": [{ "from": "JFK", "to": "LHR", "date": "2026-12-19", "returnDate": "2027-01-03" }] }
```

Nonstop business class London to Dubai, in pounds:

```json
{ "routes": [{ "from": "LHR", "to": "DXB", "date": "2027-01-15" }], "cabin": "business", "stops": "nonstop", "currency": "GBP", "country": "gb" }
```

Daily price tracker for Los Angeles to Tokyo (schedule it; after the first run only new flights and price changes are output):

```json
{
  "routes": [
    { "from": "LAX", "to": "HND", "date": "2027-03-20", "returnDate": "2027-03-30" },
    { "from": "LAX", "to": "NRT", "date": "2027-03-20", "returnDate": "2027-03-30" }
  ],
  "monitorMode": "changes",
  "stateKey": "lax-tokyo-spring"
}
```

A Google Flights URL copied from your browser (the search in the URL is used as is):

```json
{ "searchUrls": ["https://www.google.com/travel/flights?tfs=GhoSCjIwMjYtMTItMThqBRIDSkZLcgUSA0xIUkABSAGYAQI&hl=en&curr=USD"] }
```

### Output example

One flight (real run, JFK to LHR round trip, legs shortened):

```json
{
  "type": "flight",
  "route": "JFK-LHR",
  "date": "2026-12-19",
  "returnDate": "2027-01-03",
  "tripType": "round-trip",
  "cabin": "economy",
  "adults": 1,
  "currency": "USD",
  "departureAirport": "JFK",
  "arrivalAirport": "LHR",
  "departureTime": "2026-12-19T09:40",
  "arrivalTime": "2026-12-20T09:20",
  "durationMinutes": 1120,
  "stops": 1,
  "layovers": [{ "airport": "RDU", "airportName": "Raleigh-Durham International Airport", "city": "Raleigh", "durationMinutes": 511 }],
  "airlines": ["American"],
  "flightNumbers": ["AA4378", "AA174"],
  "aircraft": ["Embraer 175", "Boeing 777"],
  "price": 1863,
  "isBest": false,
  "emissionsKg": 624,
  "typicalEmissionsKg": 435,
  "emissionsVsTypicalPercent": 43,
  "legs": [{ "flightNumber": "AA4378", "airline": "American", "operatedBy": "Republic Airways as American Eagle", "departureAirport": "JFK", "arrivalAirport": "RDU", "departureTime": "2026-12-19T09:40", "arrivalTime": "2026-12-19T11:59", "durationMinutes": 139, "aircraft": "Embraer 175", "legroom": "30 in" }],
  "changeType": null,
  "previousPrice": null,
  "url": "https://www.google.com/travel/flights?tfs=GhoSCjIwMjYtMTItMTlqBRIDSkZLcgUSA0xIUhoaEgoyMDI3LTAxLTAzagUSA0xIUnIFEgNKRktAAUgBmAEB&hl=en&gl=us&curr=USD"
}
```

The free summary row of the same search:

```json
{
  "type": "summary",
  "route": "JFK-LHR",
  "date": "2026-12-19",
  "returnDate": "2027-01-03",
  "optionsOnPage": 21,
  "cheapestPrice": 1863,
  "usualPrice": 765,
  "typicalPriceLow": 620,
  "typicalPriceHigh": 1400,
  "priceLevel": "high",
  "priceHistory": [{ "date": "2026-09-19", "price": 950 }, { "date": "2026-09-20", "price": 949 }],
  "previousCheapestPrice": null
}
```

### Pricing

Pay per event, **no run fee**:

| Event | Price | When |
|---|---|---|
| `flight` | $0.0003 | per flight option output ($0.30 per 1,000) |
| `monitor-check` | $0.0045 | price-tracker mode only: per route checked, even when nothing changed |

The summary row per route is free.

Worked examples:

- 1 route with ~20 options = 20 flights = **$0.006**.
- 1,000 flights (about 50 routes) = **$0.30**.
- Daily tracker on 10 routes for 30 days: 300 monitor checks ($0.45) plus only the flights that changed.

Set **Maximum cost per run** on the run and the Actor stops cleanly when it is reached. Runs on the **free Apify plan
are limited to 5 page requests per run** (usually 3-5 routes, as a route sometimes needs a quick retry); any paid
Apify plan removes the limit.

### Tips and limits

- **One route = one Google Flights results page**, usually 10-30 flight options: Google's "Best" flights plus the other
  departing flights it shows. Long-haul and nonstop-only searches often have fewer than 10. More options hidden behind
  "View more flights" are not loaded.
- **Round trips:** every row is an **outbound** flight priced for the whole round trip, exactly as Google shows the
  first step. Return-flight choices are not included.
- **Airport codes are exact.** City names ("London") work for economy, business and first, with any stops or nonstop.
  Premium economy and "1 stop or fewer" need codes (LHR or the city code LON). If Google reads a search differently
  from what you asked (another date, cabin or route), that route is skipped with a clear message instead of returning the wrong flights.
- **Times are local** at each airport (no time-zone offset), as Google shows them.
- **Price level** compares the cheapest fare with Google's typical range: `low` below it, `high` above it, else `typical`.
  The range, usual price and history appear only when Google has them for the route.
- **Price tracker:** use fixed dates (a route without a date moves every day) and a separate `stateKey` per tracker.
  Google's list shifts between loads: in testing, a second run minutes after the first returned 5 rows for an 8-option
  route (3 "new" flights that had simply not been shown before, 2 real re-pricings). Expect some of this noise.
- Prices come from Google Flights and can differ from the airline's final price (baggage, seat fees, availability).
- Booking links are not included.

### FAQ

**Is it legal to scrape Google Flights?** This Actor reads public flight search results only: no login, no personal
data. You are responsible for how you use the data and for complying with Google's terms and the laws that apply to
you. If in doubt, ask a lawyer.

**Do I need a proxy?** No. Page fetching is built in, no proxy setup needed.

**Why is a route marked "invalid"?** Google could not run it (an unknown place, or a date more than about 11 months
ahead), or it searched something else than requested. Use 3-letter airport codes. Invalid routes produce no rows.

**Is there a free-plan limit?** Yes: runs on the free Apify plan fetch at most 5 pages per run (usually 3-5 routes). Any paid
Apify plan has no such limit.

**What does "Max page requests per run" do?** It is a safety cap on page fetches (one per route, plus a few automatic
retries). Leave it at 0 for automatic.

**Can it find the cheapest dates?** Each route is one date (or date pair). The summary row's `priceHistory` shows how
the fare moved recently; to compare dates, add one route per date.

### Integrations

Use the dataset from the [Apify API](https://docs.apify.com/api/v2), the Apify JavaScript and Python clients, or connect it to
Make, Zapier, n8n, Google Sheets, Slack or webhooks. AI agents can call it through the
[Apify MCP server](https://mcp.apify.com). Schedule it in Apify Console for daily price tracking.

### Changelog

- **0.1** (2026-11-18): first release: one-way and round trips, cabins, stops, adults, currency and country, free route
  summary with typical price range, price level and history, price-tracker mode.

### Ready-to-run examples

- [Cheapest New York to London round-trip flights for the holidays](https://apify.com/rjmacarthy/google-flights-scraper/examples/new-york-london-holiday-round-trip-flights)

### More scrapers by the same developer

- [Airbnb Search Scraper & Price Monitor](https://apify.com/rjmacarthy/airbnb-search-scraper)
- [Tripadvisor Scraper - Hotels, Restaurants, Attractions, Reviews](https://apify.com/rjmacarthy/tripadvisor-scraper)
- [AI Visibility Tracker: ChatGPT, Perplexity, Gemini, Claude](https://apify.com/rjmacarthy/ai-search-visibility-tracker)
- [Apple App Store Scraper: Apps, Search & Reviews](https://apify.com/rjmacarthy/app-store-scraper)
- [AutoScout24 Scraper - Used Car Listings & Prices (Europe)](https://apify.com/rjmacarthy/autoscout24-scraper)
- [Bilibili Scraper - Videos, Search, Popular & Uploader Stats](https://apify.com/rjmacarthy/bilibili-scraper)

Browse all my Actors on [my Apify Store profile](https://apify.com/rjmacarthy).

### Support

Found a bug or need a field? Open an issue on the Actor's Issues tab and include the run ID.

# Actor input Schema

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

Flights to search, one object per route: {"from": "JFK", "to": "LHR", "date": "2026-12-15", "returnDate": "2026-12-22"}. "from" and "to" take 3-letter airport codes (JFK, LHR) or city codes (LON, PAR); well-known city names ("London") also work for economy, business and first class. "date" is YYYY-MM-DD; leave it out to search 30 days from today (up to about 11 months ahead). Add "returnDate" for a round trip. One route = one Google Flights results page.

## `searchUrls` (type: `array`):

Paste Google Flights search URLs (https://www.google.com/travel/flights?tfs=... or ?q=...). The search in the URL is used as is; the passenger, cabin and stops settings below do not apply to it.

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

Number of adult passengers (1-9). Prices are the total for all passengers.

## `cabin` (type: `string`):

Cabin to search.

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

Limit the number of stops.

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

3-letter currency code for prices, e.g. USD, EUR, GBP, INR.

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

2-letter country code Google Flights searches from (gl), e.g. us, gb, de. Fares can differ by point of sale.

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

Language code for airline and airport names (hl), e.g. en, de, fr.

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

Stop each route after this many flight options. 0 = every option on the page. One Google Flights results page usually holds 10-30 options.

## `monitorMode` (type: `string`):

"all" outputs every flight option. "changes" is a price tracker for scheduled runs: it outputs only flights that are new or whose price changed since the last run (with the previous price), plus the route summary with the previous cheapest fare. The first run outputs everything and sets the baseline. Use fixed dates in your routes.

## `stateKey` (type: `string`):

Monitor mode remembers prices under this name. Use a different name for each separate tracker.

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

How many routes are searched at the same time.

## `maxZyteRequests` (type: `integer`):

Safety cap on page fetches per run (one per route, plus retries). 0 = automatic (one per route plus room for retries, at most 2,000). Runs on the free Apify plan are limited to 5 pages per run.

## Actor input object example

```json
{
  "routes": [
    {
      "from": "JFK",
      "to": "LHR"
    }
  ],
  "adults": 1,
  "cabin": "economy",
  "stops": "any",
  "currency": "USD",
  "country": "us",
  "language": "en",
  "maxItems": 20,
  "monitorMode": "all",
  "stateKey": "default",
  "maxConcurrency": 5,
  "maxZyteRequests": 0
}
```

# Actor output Schema

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

No description

## `summary` (type: `string`):

No description

## `runSummary` (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": [
        {
            "from": "JFK",
            "to": "LHR"
        }
    ],
    "maxItems": 20
};

// Run the Actor and wait for it to finish
const run = await client.actor("rjmacarthy/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": [{
            "from": "JFK",
            "to": "LHR",
        }],
    "maxItems": 20,
}

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

```

## MCP server setup

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