# Google Flights Scraper — Flight Prices, Times, Stops & Airlines (`innolabs/google-flights-scraper`) Actor

Google Flights scraper and API: one-way and round-trip flight prices, airlines, times, duration, stops, layovers and emissions for any route and date. Price insights included.

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

## Pricing

from $0.05 / 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 — Flight Prices, Times, Stops & Airlines

Get Google Flights results as clean data: every flight option for a route and date with its
price, airlines, flight numbers, departure and arrival times (with time zone), duration,
stops, layovers, aircraft, legroom and CO₂ emissions, plus Google's price insight ("prices
are currently low / typical / high", the typical price range and about 60 days of price
history). One-way and round trip, many routes per run, any cabin class and passenger mix.
No Google account and no API key needed. Export as JSON, CSV or Excel, or use it as a
Google Flights API.

### What does Google Flights Scraper do?

Enter routes such as **JFK → LAX on 2026-12-15** or **LHR → CDG, 2026-12-18 to 2026-12-22**
and the scraper returns the flight options Google Flights lists for each search, in Google's
order:

- **Price** for the whole booking (all passengers; round trips: both directions), currency
  and a formatted price such as `$164`.
- **Best flights** — Google's "Top flights" picks are flagged with `isBest`, and every option
  has its `rank` on the page.
- **Schedule** — departure and arrival time in local time with UTC offset
  (`2026-12-20T14:45:00-08:00`), total duration in minutes, number of stops.
- **Airlines and flights** — airline names and codes, flight numbers (`AA 171`), the
  operating carrier when another airline flies it, codeshare numbers.
- **Every leg** — airports with names, times, duration, aircraft (`Airbus A321neo`),
  legroom (`31 in`) and CO₂ per leg.
- **Layovers** — airport, city, duration, overnight flag and change-of-airport flag.
- **Emissions** — CO₂ in kg, the typical CO₂ for the route and the difference in percent.
- **Price insights** — `low`, `typical` or `high`, the lowest price right now, the typical
  price range for the route and the daily price history Google shows.
- **Google Flights link** — opens the same search in the browser.

Searches can use any cabin class (economy, premium economy, business, first), up to 9
passengers (adults, children, infants in seat or on lap), a stops filter (nonstop, up to 1
or 2 stops), any currency, language and country market.

### Use cases

- **Fare tracking and price alerts** — schedule daily runs for your routes and get notified
  when the price level turns `low` or the cheapest fare drops.
- **Travel agencies and travel startups** — quote real flight options with flight numbers,
  times, layovers and cabin class without copying from a browser.
- **Corporate travel and procurement** — compare carriers, durations and prices on the
  routes your team flies, and report CO₂ per trip.
- **Airline and airport analysts** — see who serves a route, how often, nonstop or with
  connections, and at what price per market and currency.
- **Content and affiliate sites** — build "cheapest flights from X to Y" pages from fresh
  data.
- **AI agents and assistants** — answer "is this a good price?" with Google's own price
  level and typical range.

### How much does it cost?

You pay only for the flight options you get (pay-per-event). Duplicates and options above
your limits are never charged; failed searches cost nothing.

| Event | What you pay for | Free plan | Paid plans (from) |
| --- | --- | --- | --- |
| `flight` | One flight option (itinerary with price, times, airlines, stops, legs and price insight) | $0.054 per 1,000 | $0.045 per 1,000 |

"Paid plans (from)" is the Gold-and-above price; Bronze ($0.051) and Silver ($0.048) sit in
between. Apify also charges a tiny actor-start fee per run.

Worked examples (Free plan prices):

1. **Quick check** — the prefilled input (JFK → LAX one-way and London → Paris round trip)
   returned 50 flight options: 50 × $0.054 / 1,000 = **$0.0027**.
2. **Daily fare monitoring** — 20 routes every day for 30 days at about 25 options per
   route = 15,000 flight options: 15,000 × $0.054 / 1,000 = **$0.81 per month**
   ($0.68 on Gold+). Set **Max flights per route** to 5 to track only the top options and
   pay a fifth of that.

Apify Free plan includes $5 monthly credit, enough for about 90,000 flight options every
month.

### How to use Google Flights Scraper

1. Open the actor in Apify Console and click **Try for free**.
2. In **Routes**, enter one object per search: `from` and `to` (IATA airport codes like
   `JFK` or city codes like `LON`), `departureDate`, and `returnDate` for a round trip. The
   form is prefilled with one one-way and one round-trip route using relative dates
   (`"+40 days"`, `"+33 days"` → `"+36 days"`); replace them with fixed dates such as
   `2026-12-15` if you prefer.
3. Set passengers, cabin class and stops, and optionally currency, language and country.
4. Click **Start**. Each route takes a second or two.
5. Open the **Output** tab (Flights and Price insights views) and export as JSON, CSV,
   Excel or HTML.

Through the API:

1. Get your API token in Apify Console → Settings → Integrations.
2. Call the actor with your input JSON (see [Integrations and API](#integrations-and-api)).
3. Read the dataset items from the run.

### Input

| Field | Type | Default | Description |
| --- | --- | --- | --- |
| `routes` | array | – | Required. One object per search: `{"from": "JFK", "to": "LAX", "departureDate": "2026-12-15"}`; add `"returnDate"` for a round trip. Dates are `YYYY-MM-DD` or relative to the run day (`"+30 days"`), never in the past. |
| `adults` | integer | `1` | Passengers aged 12+. |
| `children` | integer | `0` | Children aged 2–11. |
| `infantsInSeat` | integer | `0` | Infants under 2 with their own seat. |
| `infantsOnLap` | integer | `0` | Infants under 2 on a lap, at most one per adult. |
| `cabinClass` | string | `economy` | `economy`, `premium-economy`, `business` or `first`. |
| `maxStops` | string | `any` | `any`, `0` (nonstop only), `1` or `2` (stops per direction). |
| `currency` | string | `USD` | Currency of the prices, e.g. `EUR`, `GBP`, `JPY`. |
| `language` | string | `en` | Language of airport and airline names, e.g. `de`, `fr`. |
| `country` | string | `us` | Market (point of sale), e.g. `gb`, `de`. Fares can differ by market. |
| `maxFlightsPerRoute` | integer | `100` | Keep at most this many options per route, best first. |
| `maxItems` | integer | `1000` | Hard cap on flight options for the whole run. |
| `proxyConfiguration` | object | Apify Proxy | Proxy settings. The default works; blocked requests are retried on a new IP. |
| `debug` | boolean | `false` | Log every retry. |

Example — three routes with fixed dates, one of them a round trip:

```json
{
    "routes": [
        { "from": "JFK", "to": "LAX", "departureDate": "2026-12-15" },
        { "from": "LHR", "to": "CDG", "departureDate": "2026-12-18", "returnDate": "2026-12-22" },
        { "from": "SFO", "to": "NRT", "departureDate": "2026-12-20" }
    ]
}
```

Example — nonstop business class for a family, prices in euros on the German market:

```json
{
    "routes": [{ "from": "FRA", "to": "JFK", "departureDate": "2026-12-16" }],
    "adults": 2,
    "children": 1,
    "cabinClass": "business",
    "maxStops": "0",
    "currency": "EUR",
    "language": "de",
    "country": "de"
}
```

Example — relative dates: a daily schedule that always looks 30 days ahead:

```json
{
    "routes": [{ "from": "BOS", "to": "ORD", "departureDate": "+30 days", "returnDate": "+34 days" }],
    "maxFlightsPerRoute": 5
}
```

### Output

One item per flight option. Example from a real run on 2026-11-12 (price history shortened):

```json
{
    "route": { "from": "SFO", "to": "NRT", "departureDate": "2026-12-20", "returnDate": null },
    "tripType": "one-way",
    "rank": 4,
    "isBest": false,
    "price": 1432,
    "currency": "USD",
    "priceText": "$1,432",
    "airlines": ["Air Canada"],
    "airlineCodes": ["AC"],
    "flightNumbers": ["AC 567", "AC 3"],
    "departureAirport": "SFO",
    "arrivalAirport": "NRT",
    "departureTime": "2026-12-20T14:45:00-08:00",
    "arrivalTime": "2026-12-22T16:40:00+09:00",
    "durationMinutes": 1975,
    "stops": 1,
    "layovers": [
        {
            "airport": "YVR",
            "airportName": "Vancouver International Airport",
            "city": "Vancouver",
            "durationMinutes": 1222,
            "overnight": true,
            "changeOfAirport": false
        }
    ],
    "segments": [
        {
            "airline": "Air Canada",
            "airlineCode": "AC",
            "flightNumber": "AC 567",
            "operatedBy": null,
            "from": "SFO",
            "fromName": "San Francisco International Airport",
            "to": "YVR",
            "toName": "Vancouver International Airport",
            "departureTime": "2026-12-20T14:45:00-08:00",
            "arrivalTime": "2026-12-20T18:08:00-07:00",
            "durationMinutes": 143,
            "aircraft": "Airbus A220-300 Passenger",
            "legroom": "30 in",
            "co2EmissionsKg": 142,
            "codeshares": []
        },
        {
            "airline": "Air Canada",
            "airlineCode": "AC",
            "flightNumber": "AC 3",
            "operatedBy": null,
            "from": "YVR",
            "fromName": "Vancouver International Airport",
            "to": "NRT",
            "toName": "Narita International Airport",
            "departureTime": "2026-12-21T14:30:00-07:00",
            "arrivalTime": "2026-12-22T16:40:00+09:00",
            "durationMinutes": 610,
            "aircraft": "Boeing 787",
            "legroom": "31 in",
            "co2EmissionsKg": 402,
            "codeshares": []
        }
    ],
    "co2EmissionsKg": 545,
    "typicalCo2EmissionsKg": 630,
    "emissionsVsTypicalPercent": -13,
    "cabinClass": "economy",
    "passengers": { "adults": 1, "children": 0, "infantsInSeat": 0, "infantsOnLap": 0 },
    "priceInsights": {
        "priceLevel": "high",
        "lowestPrice": 1432,
        "typicalPriceLow": 355,
        "typicalPriceHigh": 1300,
        "priceHistory": [
            { "date": "2026-09-12", "price": 1290 },
            { "date": "2026-11-12", "price": 1432 }
        ]
    },
    "bookingUrl": "https://www.google.com/travel/flights/search?tfs=GhoSCjIwMjYtMTItMjBqBRIDU0ZPcgUSA05SVEIBAUgBmAEC&hl=en&gl=us&curr=USD",
    "country": "us",
    "language": "en",
    "scrapedAt": "2026-11-12T09:19:48Z"
}
```

Field notes:

- `price` — total for all passengers in `currency`; for round trips the price of the whole
  trip. `null` when Google shows "price unavailable" for that option.
- `rank` / `isBest` — position on the Google Flights page and whether the option is one of
  Google's "Top flights".
- `departureTime` / `arrivalTime` — local time at the airport with its UTC offset (`Z` =
  UTC). Without an offset when Google does not provide one.
- `layovers[].overnight` — the connection crosses midnight at the layover airport;
  `changeOfAirport` — you must change airports (e.g. LGA → JFK).
- `priceInsights` — the same for every option of a search: Google's price level for the
  route and date, the lowest price now, the typical range and the daily price history
  (about 60 days).
- `emissionsVsTypicalPercent` — CO₂ compared with a typical flight on the route
  (`-13` = 13 % less).
- `bookingUrl` — opens this exact search on Google Flights.

### Integrations and API

Run the actor and get the flights back in one call:

```bash
curl -X POST "https://api.apify.com/v2/acts/innolabs~google-flights-scraper/run-sync-get-dataset-items?token=YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"routes": [{"from": "JFK", "to": "LAX", "departureDate": "2026-12-15"}]}'
```

Python with [apify-client](https://docs.apify.com/api/client/python):

```python
from apify_client import ApifyClient

client = ApifyClient("YOUR_TOKEN")
run = client.actor("innolabs/google-flights-scraper").call(run_input={
    "routes": [{"from": "LHR", "to": "CDG", "departureDate": "2026-12-18", "returnDate": "2026-12-22"}],
    "currency": "GBP",
})
for flight in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(flight["price"], flight["airlines"], flight["departureTime"], flight["stops"])
```

- **Make, Zapier, n8n** — use the Apify app or node to start the actor and send flights to
  Google Sheets, Airtable, Slack or a database.
- **Scheduling** — create a schedule in Apify Console with relative dates (`"+30 days"`) to
  track the same routes every day.
- **Webhooks** — trigger your pipeline or a price alert when a run finishes.
- **AI agents (MCP)** — connect Claude, Cursor or other MCP clients through the Apify MCP
  server at https://mcp.apify.com and let your agent search flights on demand.

### FAQ

#### Is the price for one person or for everyone?

It is the total Google Flights shows for the whole search: all passengers together, and for
round trips both directions. Divide by the number of passengers for a per-person figure.

#### How do round trips work?

A route with `returnDate` is searched as a round trip. You get the departing flight options
with their round-trip price, exactly like the first page of a round-trip search on Google
Flights. The return flights you can combine with each option are not listed separately.

#### How many flights do I get per route?

All options on Google's results page: usually 10–35 per route, depending on how many
airlines serve it. Use **Max flights per route** to keep only the top ones and pay less.

#### Should I use fixed or relative dates?

Both work and can be mixed in one run. Fixed dates (`"2026-12-15"`) search exactly that
day. Relative dates (`"+30 days"`, also `"+30d"`) are counted from the day the run starts
(UTC), so a saved task or schedule never searches a date in the past. A return date can be
relative too, e.g. departure `"+33 days"` and return `"+36 days"`.

#### Can I track prices over time?

Yes. Schedule the actor with relative dates like `"+30 days"` and store the results, or use
the `priceInsights` field: it carries Google's price level, typical range and about 60 days
of price history for each search.

#### Do I need a proxy?

No setup needed. The default Apify Proxy works; if Google blocks or throttles a request, the
scraper retries it automatically on a new IP.

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

The scraper collects public flight information that anyone can see on Google Flights
without logging in, and no personal data. Check that your use complies with Google's terms
and the laws that apply to you.

#### What happens with wrong airport codes or past dates?

Invalid routes (codes that are not 3 letters, past dates, a return before the departure)
are skipped and listed in the run's `SUMMARY` record; the other routes still run. A code
Google does not know returns no results and is reported the same way. You are not charged
for routes without results.

### Limits

- One page of results per route (usually 10–35 options), not Google's "more flights"
  expansion.
- Round trips list departing options with the total round-trip price; return-flight
  choices and multi-city trips are not supported yet.
- Booking sites and their individual prices (airline vs travel agencies) are not included;
  `bookingUrl` opens the search on Google Flights.
- Dates must be today or later and at most 365 days ahead; Google rarely has fares beyond
  about 11 months.
- At most 9 passengers per search, as on Google Flights.
- Fares change constantly and depend on market, currency and time of the search.

# Changelog

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

# Actor input Schema

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

One object per search: {"from": "JFK", "to": "LAX", "departureDate": "2026-12-15"}. Add "returnDate" for a round trip. Codes are 3-letter IATA airport codes (JFK) or city codes (LON, NYC). Dates are YYYY-MM-DD or relative to the run day, e.g. "+30 days" (handy for schedules). Dates in the past are rejected.

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

Passengers aged 12+. Prices are the total for all passengers.

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

Children aged 2 to 11.

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

Infants under 2 with their own seat.

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

Infants under 2 on an adult's lap (at most one per adult).

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

Seat class to price.

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

Maximum number of stops per direction.

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

ISO currency code for prices, e.g. USD, EUR, GBP, JPY.

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

Language of airport and airline names, e.g. en, de, fr, es.

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

Two-letter country whose Google Flights market is searched, e.g. us, gb, de. Fares can differ by market.

## `maxFlightsPerRoute` (type: `integer`):

Keep at most this many flight options per route, in Google's order (best flights first).

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

Hard cap on flight options for the whole run. The run stops cleanly when reached.

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

Apify Proxy settings. The default datacenter proxy works for Google Flights; blocked requests are retried on a new IP automatically.

## `debug` (type: `boolean`):

Log every retry.

## Actor input object example

```json
{
  "routes": [
    {
      "from": "JFK",
      "to": "LAX",
      "departureDate": "+40 days"
    },
    {
      "from": "LHR",
      "to": "CDG",
      "departureDate": "+33 days",
      "returnDate": "+36 days"
    }
  ],
  "adults": 1,
  "children": 0,
  "infantsInSeat": 0,
  "infantsOnLap": 0,
  "cabinClass": "economy",
  "maxStops": "any",
  "currency": "USD",
  "language": "en",
  "country": "us",
  "maxFlightsPerRoute": 100,
  "maxItems": 1000,
  "proxyConfiguration": {
    "useApifyProxy": true
  },
  "debug": false
}
```

# Actor output Schema

## `dataset` (type: `string`):

All items produced by the run, one JSON object per record.

# 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": "LAX",
            "departureDate": "+40 days"
        },
        {
            "from": "LHR",
            "to": "CDG",
            "departureDate": "+33 days",
            "returnDate": "+36 days"
        }
    ],
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("innolabs/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": "LAX",
            "departureDate": "+40 days",
        },
        {
            "from": "LHR",
            "to": "CDG",
            "departureDate": "+33 days",
            "returnDate": "+36 days",
        },
    ],
    "proxyConfiguration": { "useApifyProxy": True },
}

# Run the Actor and wait for it to finish
run = client.actor("innolabs/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": "LAX",
      "departureDate": "+40 days"
    },
    {
      "from": "LHR",
      "to": "CDG",
      "departureDate": "+33 days",
      "returnDate": "+36 days"
    }
  ],
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}' |
apify call innolabs/google-flights-scraper --silent --output-dataset

```

## MCP server setup

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