# Google Flights Scraper & API - Airfare Price Tracker, No Login (`headply/google-flights-scraper`) Actor

Get every flight Google Flights shows for any route and date: fares, airlines, flight numbers, times, layovers, aircraft and CO2, plus Google's typical price range and 60-day price history. Round trips with return options. Track fare changes on a schedule. No login, no API key.

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

## Pricing

from $2.10 / 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 & API: fares, schedules and a flight price tracker, no login

Get **every flight Google Flights shows** for any route and date, with the fare, airline, flight numbers, departure and arrival times, layovers, aircraft and CO₂ emissions. You also get **Google's typical price range** and a **60-day price history** for the route. Search one-way or round trip, any cabin and any number of passengers. Export to JSON, CSV or Excel, call it as an API, or schedule it as a **flight price tracker** that tells you only when a fare changes.

No Google account, no API key, no cookies.

### What can you do with this Google Flights scraper?

- ✈️ **Find every flight on a route**: all itineraries Google lists for the date, typically 20–60, with Google's "best" flights marked.
- 💰 **Get exact fares for your trip**: one-way or round trip, economy to first class, adults, children and infants, in any currency. Prices are totals for all passengers.
- 🔁 **Build full round trips**: outbound options plus the matching return flights with the round-trip total, ready to compare.
- 📉 **Track flight prices automatically**: schedule a daily run and receive only the flights whose fare went up or down, with the old fare, the new fare and the difference.
- 📊 **See if a fare is a good deal**: Google's typical price range for the route, a low / typical / high verdict, and the lowest fare per day for about the last 60 days.
- 🌱 **Compare emissions**: CO₂ per itinerary and how it compares with typical flights on the route.

**Who uses it:** travel startups and AI travel agents that need live fares, fare-alert and deal newsletters, corporate travel teams watching routes, and analysts studying airline pricing.

### Why use this instead of the Google Flights website or the QPX API?

Google shut down its **QPX Express flight API** years ago, and there is **no official Google Flights API**. Copying fares by hand doesn't scale, and many scrapers drive a full browser, which is slow and breaks when Google changes the page.

This Actor reads the same data the Google Flights results page loads, with plain web requests:

- **Fast:** a route with 40+ flights in about 3 seconds; a round trip with return options in about 6 seconds.
- **Reliable:** in our tests every request succeeded, with no blocks or captchas. A self-test runs daily, so changes on Google's side are caught before they reach you.
- **Accurate:** the search is encoded exactly the way Google Flights encodes it, so passengers, cabin, stops and currency match what you see on google.com/travel/flights.
- **Stable output:** the same fields in every record, `null` when Google shows nothing. Fields are never renamed.

### How to scrape Google Flights fares (3 steps)

1. Click **Try for free** and enter one or more routes as airport or city codes, such as `JFK-LAX` or `NYC-LON`.
2. Set the **departure date**, an optional **return date** or **trip length**, the **passengers**, **cabin class** and **currency**.
3. Click **Start**. Download the flights as Excel, CSV or JSON, or open the **Flights and fares** table.

### Input examples

**One-way, 30 days from today (the default):**

```json
{ "routes": ["JFK-LAX"], "departureDate": "30" }
```

**Round trip London ↔ Lisbon for 2 adults, with return options for the 3 cheapest outbound flights, in euros:**

```json
{ "routes": ["LON-LIS"], "departureDate": "2026-12-05", "returnDate": "2026-12-09", "adults": 2, "currency": "EUR", "returnFlightsFor": 3 }
```

**Business class, nonstop only, several routes:**

```json
{ "routes": ["JFK-LHR", "SFO-NRT", "LAX-SYD"], "departureDate": "45", "cabinClass": "business", "maxStops": "0" }
```

**Daily fare alert (use with a schedule):**

```json
{ "routes": ["NYC-MIA"], "departureDate": "30", "tripLength": 4, "mode": "priceChanges", "monitorName": "miami-weekend" }
```

Dates take `YYYY-MM-DD` or a number of days from the day of the run (`30`). With a number, a daily schedule always checks the same distance ahead.

### What data do you get? (output example)

A real record, London → Lisbon, round trip for 2 adults (shortened):

```json
{
  "flightKey": "2026-11-13T12:50_FR1080",
  "direction": "outbound",
  "tripType": "round-trip",
  "route": "LON-LIS",
  "origin": "STN",
  "originName": "London Stansted Airport",
  "destination": "LIS",
  "destinationName": "Humberto Delgado Airport",
  "departure": "2026-11-13T12:50",
  "arrival": "2026-11-13T15:40",
  "durationMinutes": 170,
  "stops": 0,
  "layovers": [],
  "airlines": ["Ryanair"],
  "flightNumbers": ["FR1080"],
  "segments": [{ "flightNumber": "FR1080", "from": "STN", "to": "LIS", "departure": "2026-11-13T12:50", "arrival": "2026-11-13T15:40", "aircraft": "Boeing 737" }],
  "price": 207,
  "currency": "USD",
  "isBest": true,
  "cabinClass": "economy",
  "adults": 2,
  "co2Grams": 274000,
  "co2DifferencePercent": 5,
  "lowestPrice": 207,
  "typicalPriceLow": 115,
  "typicalPriceHigh": 280,
  "priceLevel": "typical",
  "googleFlightsUrl": "https://www.google.com/travel/flights/search?tfs=…",
  "scrapedAt": "2026-10-04T23:14:26.954Z"
}
```

| Field group | Fields |
|---|---|
| Fare | `price` (total for all passengers; round-trip total on round trips), `currency`, `cabinClass`, `adults`, `children`, `infants` |
| Schedule | `departure`, `arrival` (local airport time), `durationMinutes`, `stops`, `layovers[]` (airport, city, minutes) |
| Flights | `airlines`, `flightNumbers`, `segments[]` (flight number, airports, times, aircraft, legroom) |
| Round trips | `direction` (`outbound` / `return`), `outboundFlightKey` links each return option to its outbound |
| Price context | `lowestPrice`, `typicalPriceLow`, `typicalPriceHigh`, `priceLevel` (`low` / `typical` / `high`) |
| Emissions | `co2Grams`, `co2TypicalGrams`, `co2DifferencePercent` |
| Fare tracking | `changeType`, `previousPrice`, `priceChange` |

The **60-day price history** per route (lowest fare per day) is saved in the `PRICE_INSIGHTS` record of each run, and a `SUMMARY` record lists counts and anything that was skipped.

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

You pay only per flight returned, with no monthly fee:

| Plan | Price per 1,000 flights |
|---|---|
| Free | **$3.00** |
| Bronze | $2.70 |
| Silver | $2.40 |
| Gold and above | $2.10 |

**Examples on the free plan:** one route search (about 40 flights) costs about $0.12. A round trip with return options for the 3 cheapest outbound flights (about 70 flights) costs about $0.21. Apify's free $5 monthly credit covers about 1,650 flights.

In fare-tracking mode you pay only for flights whose fare changed; unchanged flights are free. You can cap any run with **Max cost per run** in the run options.

### How to track flight prices automatically

1. Set **Mode** to **Only fare changes**, give the run a **Monitor name**, and use a relative departure date such as `30`.
2. In Apify Console, click **Schedule** and choose daily or every few hours.
3. The first run gives you every flight as a starting point. After that, each run returns only flights whose fare changed, with `previousPrice` and `priceChange`. Send them to Slack, email or Google Sheets with Apify's integrations, n8n or Make.

### Google Flights API: use it from your code, n8n, Make or AI agents

**One API call that returns the flights:**

```bash
curl -X POST "https://api.apify.com/v2/acts/headply~google-flights-scraper/run-sync-get-dataset-items?token=YOUR_APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"routes":["SFO-JFK"],"departureDate":"21","tripLength":5,"returnFlightsFor":2}'
```

**Python:**

```python
from apify_client import ApifyClient

client = ApifyClient("YOUR_APIFY_TOKEN")
run = client.actor("headply/google-flights-scraper").call(run_input={
    "routes": ["LHR-JFK"], "departureDate": "45", "cabinClass": "business", "currency": "GBP",
})
for f in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(f["flightNumbers"], f["departure"], f["price"], f["priceLevel"])
```

**n8n and Make:** add the Apify node or module, choose **Run an Actor and get dataset items**, select `headply/google-flights-scraper` and paste the JSON input.

**AI agents and MCP:** input fields are described for tool use. Give airport codes, a date and passengers; read `price`, `departure`, `flightNumbers` and `priceLevel`. Searches finish in seconds.

### FAQ

**Is there an official Google Flights API?**
No. Google closed its QPX Express API, and Google Flights data is not available through any public Google API. This Actor is the practical Google Flights API: send a route and dates, get structured fares back.

**Do I need a Google account or proxies?**
No. It reads public Google Flights pages without logging in, and Apify Proxy is included and set up for you.

**Which market are the fares for?**
Google prices for the visitor's country. By default the Actor searches from the United States, so fares are US-market fares in the currency you choose. Change the proxy country to see fares as travellers elsewhere do.

**Can I search by city instead of airport?**
Yes. City codes such as `NYC`, `LON`, `PAR` or `TYO` include all airports of that city.

**How do round trips work?**
Google prices round trips as a pair. You get the outbound options with the round-trip total, and, for the cheapest outbound flights you choose with **Return options for the N cheapest outbound flights**, every matching return flight with its round-trip total.

**Can I book through it?**
No. It collects fares; `googleFlightsUrl` opens the same search on Google Flights, where you can pick a booking site.

### Limits

- Fares are what Google shows at the moment of the run; airlines change them often.
- Airport and city codes only (`JFK`, `NYC`); place names are not looked up.
- Up to 9 adults, 8 children and 4 infants, 1–330 days between departure and return.

### More travel data from the same developer

- [Google Hotels Scraper & API](https://apify.com/headply/google-hotels-scraper): hotel prices for any city and dates, and every booking site's price (Booking.com, Expedia, Agoda…), with a hotel price tracker.

### Help and feedback

Something missing or not working? Open an issue on the **Issues** tab. Issues are usually answered within a day.

# Changelog

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

# Actor input Schema

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

One route per line as two 3-letter airport or city codes: "JFK-LAX", "LHR-LIS", or city codes like "NYC-LON" (all airports of both cities).

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

YYYY-MM-DD, or a number of days from the run date ("30" = 30 days ahead, so scheduled runs keep the same lead time). Default: 30 days ahead.

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

YYYY-MM-DD or days from the run date. Leave empty (and "Trip length" empty) for one-way.

## `tripLength` (type: `integer`):

Alternative to a return date: return this many days after departure. Leave empty for one-way.

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

Adult passengers. Prices are totals for all passengers.

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

Children aged 2–11.

## `infants` (type: `integer`):

Infants under 2 travelling on a lap.

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

Cabin to price.

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

Limit the number of stops.

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

Three-letter currency code for all fares (USD, EUR, GBP, INR, JPY…).

## `returnFlightsFor` (type: `integer`):

Round trips only. For each of the N cheapest outbound flights, also return the matching return flights with the round-trip total (one extra page each). 0 returns outbound options only.

## `maxFlightsPerSearch` (type: `integer`):

Cap on itineraries per route (Google shows 20–60 for most routes).

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

"All flights" returns everything found. "Only fare changes" remembers each itinerary's price per search and, after the first (baseline) run, returns and bills only itineraries whose price changed since the previous run with the same monitor name. Use it with a schedule for fare alerts.

## `includeNewFlights` (type: `boolean`):

Only in "fare changes" mode: also return itineraries that were not in the previous run's results.

## `monitorName` (type: `string`):

Only in "fare changes" mode. Separate schedules with different names keep separate memories.

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

How many searches to load at once.

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

Apify datacenter proxy with US exits works well. The exit country sets the market Google prices for.

## `selfTest` (type: `boolean`):

Fail the run if the output looks broken. Used by the daily health check.

## Actor input object example

```json
{
  "routes": [
    "JFK-LAX"
  ],
  "departureDate": "30",
  "returnDate": "",
  "adults": 1,
  "children": 0,
  "infants": 0,
  "cabinClass": "economy",
  "maxStops": "any",
  "currency": "USD",
  "returnFlightsFor": 1,
  "maxFlightsPerSearch": 100,
  "mode": "all",
  "includeNewFlights": false,
  "monitorName": "default",
  "maxConcurrency": 6,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyCountry": "US"
  },
  "selfTest": false
}
```

# Actor output Schema

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

No description

## `priceInsights` (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 = {
    "routes": [
        "JFK-LAX"
    ],
    "departureDate": "30",
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyCountry": "US"
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("headply/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-LAX"],
    "departureDate": "30",
    "proxyConfiguration": {
        "useApifyProxy": True,
        "apifyProxyCountry": "US",
    },
}

# Run the Actor and wait for it to finish
run = client.actor("headply/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-LAX"
  ],
  "departureDate": "30",
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyCountry": "US"
  }
}' |
apify call headply/google-flights-scraper --silent --output-dataset

```

## MCP server setup

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