# Google Flights Scraper: Prices, Airlines, Stops (`earlytern/google-flights-scraper`) Actor

Scrape Google Flights by route and date: price, airlines, flight numbers, times, stops, layovers and CO2. One-way or round trip, any cabin. No login.

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

## Pricing

from $0.70 / 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: Prices, Airlines, Stops

Google Flights Scraper returns flight prices and schedules from Google Flights for any route and date: price, airlines,
flight numbers, departure and arrival times, travel time, stops, layovers, aircraft and CO2 estimate. One-way or round
trip, any cabin and up to 9 passengers. No login, no browser, and you pay per flight saved plus a small fee per search.

### What does Google Flights Scraper do?

- Searches Google Flights for every route you give (several departure and destination airports at once).
- Searches one day or a range of departure days, so you can compare prices across a week or a month.
- Returns one row per flight option with the **total price**, currency, airlines and flight numbers.
- Gives local departure and arrival times, total travel time, number of stops and each layover with its length.
- Lists each flight of a connection with its aircraft and seat pitch, plus the CO2 estimate Google shows.
- Marks the flights Google lists as **best** and the **cheapest** flight of each search.

### Why use Google Flights Scraper?

- **Fare tracking:** schedule a daily run and get told when a route drops in price.
- **Travel agencies and price comparison sites:** fill your pages with fresh schedules and fares.
- **Market research:** see which airlines fly a route, how often, with how many stops and at what price.
- **Data teams:** build fare history for forecasting, one row per flight with stable, typed fields.

Every field is read from the data Google sends with the page, not from screen text. If Google changes its page, the
run stops with a clear message instead of saving wrong prices.

### How to use Google Flights Scraper

1. Click **Try for free**.
2. Fill **From** and **To** with 3-letter airport or city codes, for example `JFK`, `LHR` or `NYC` for all New York
   airports.
3. Pick a **Departure date**: a date, or a time from today such as `+30 days` for scheduled runs. Add a **Return date**
   for round trips.
4. Optional: passengers, cabin class, stops, currency, extra departure days.
5. Click **Start**. Most searches finish in a few seconds.
6. Download the flights as JSON, CSV or Excel, or read them through the API.

### Input

```json
{
  "from": ["JFK"],
  "to": ["LAX"],
  "departureDate": "+30 days",
  "maxFlightsPerSearch": 10
}
```

- **From / To:** airport or city codes. Every departure airport is searched with every destination.
- **Departure date / Return date:** leave the return date empty for one-way flights.
- **Extra departure days:** also searches the following days; the return date moves along, so the trip length stays
  the same.
- **Adults, Children, Infants:** prices are totals for all passengers.
- **Cabin class:** economy, premium economy, business or first.
- **Stops:** any, nonstop only, 1 stop or fewer, 2 stops or fewer.
- **Currency:** 71 currencies.
- **Maximum flights per search:** best flights come first; a busy route has 30 to 150 flights a day.

### Output

One row per flight. A round trip in business class for 2 adults, London to New York:

```json
{
  "type": "flight",
  "searchFrom": "LHR",
  "searchTo": "JFK",
  "departureDate": "2027-01-06",
  "returnDate": "2027-01-13",
  "tripType": "round-trip",
  "cabinClass": "business",
  "passengers": 2,
  "position": 1,
  "isBest": true,
  "isCheapest": false,
  "price": 4873,
  "currency": "EUR",
  "airlines": ["Icelandair"],
  "flightNumbers": ["FI 451", "FI 615"],
  "departureAirport": "LHR",
  "departureAirportName": "Heathrow Airport",
  "departureTime": "2027-01-06T12:15",
  "arrivalAirport": "JFK",
  "arrivalAirportName": "John F. Kennedy International Airport",
  "arrivalTime": "2027-01-06T18:00",
  "durationMinutes": 645,
  "stops": 1,
  "layovers": [
    { "airport": "KEF", "airportName": "Keflavík International Airport", "city": "Reykjavík", "durationMinutes": 80 }
  ],
  "legs": [
    {
      "flightNumber": "FI 451",
      "airline": "Icelandair",
      "departureAirport": "LHR",
      "departureAirportName": "Heathrow Airport",
      "departureTime": "2027-01-06T12:15",
      "arrivalAirport": "KEF",
      "arrivalAirportName": "Keflavík International Airport",
      "arrivalTime": "2027-01-06T15:30",
      "durationMinutes": 195,
      "aircraft": "Airbus A321neo",
      "legroom": null
    },
    {
      "flightNumber": "FI 615",
      "airline": "Icelandair",
      "departureAirport": "KEF",
      "departureAirportName": "Keflavík International Airport",
      "departureTime": "2027-01-06T16:50",
      "arrivalAirport": "JFK",
      "arrivalAirportName": "John F. Kennedy International Airport",
      "arrivalTime": "2027-01-06T18:00",
      "durationMinutes": 370,
      "aircraft": "Boeing 737MAX 9 Passenger",
      "legroom": null
    }
  ],
  "emissionsKg": 1267,
  "emissionsVsTypicalPercent": -45,
  "googleFlightsUrl": "https://www.google.com/travel/flights/search?tfs=GhoSCjIwMjctMDEtMDZqBRIDTEhScgUSA0pGSxoaEgoyMDI3LTAxLTEzagUSA0pGS3IFEgNMSFJAAUABSAOYAQE&hl=en&gl=US&curr=EUR",
  "message": null,
  "scrapedAt": "2026-11-22T00:51:43.287Z"
}
```

Times are local to each airport. For round trips the rows are the outbound flights and `price` is the lowest
round-trip total Google shows with that outbound flight.

A search that finds no flights adds one free row with `type` set to `no_flights`, the search details and a `message`;
its flight fields are empty. Flight rows have `type` set to `flight`.

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

You pay for flights saved and for each search:

| Event | Free plan | Bronze | Silver | Gold and higher |
|---|---|---|---|---|
| Flight saved | $1.00 per 1,000 | $0.90 per 1,000 | $0.80 per 1,000 | $0.70 per 1,000 |
| Search (one route on one date) | $0.005 | $0.005 | $0.005 | $0.005 |

A search is charged once Google Flights answers it, also when it finds no flights; searches that cannot be read are
free. There is no start fee. For example, tracking one route every day with 20 flights per run costs about $0.75 a
month on the Free plan. You can set a maximum cost per run; the run stops when it is reached.

### Tips

- Use **Maximum flights per search** to keep only the top flights when you track many routes or days.
- Use a time from today (`+30 days`) in scheduled runs so the search always looks the same distance ahead.
- City codes such as `NYC`, `LON` or `TYO` search every airport of the city at once.
- Up to 200 searches per run (routes × days). Split larger jobs into several runs.
- Connect the results to Make, Zapier, n8n, Google Sheets or an AI agent through the API.

### FAQ

**Is it legal to scrape Google Flights?** The Actor reads only public Google Flights result pages, without login, and
collects no personal data. You are responsible for how you use the data and for following the terms that apply to
you.

**Why is `price` empty for some flights?** Google sometimes lists a flight without a price. The row is still saved.

**Can I get the return flights of a round trip?** Not yet: round-trip rows are the outbound options with the
round-trip total. To list return flights with their own prices, run a one-way search the other way.

**Why do prices differ from what I see in my browser?** Prices change often and depend on the country you search
from. The Actor searches as a visitor from the United States.

### Questions and feedback

Open an issue on the **Issues** tab; we answer within 2 working days.

# Actor input Schema

## `from` (type: `array`):

3-letter codes of the airports or cities to fly from, one per line, for example JFK, LHR or NYC (all New York airports).

## `to` (type: `array`):

3-letter codes of the airports or cities to fly to, one per line. Every departure airport is searched with every destination.

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

Day of the outbound flight: a date such as 2026-12-15 or a time from today such as +30 days.

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

Leave empty for one-way flights. With a return date, prices are round-trip totals and the outbound flights are listed.

## `extraDays` (type: `integer`):

Also search this many following days. The return date moves with the departure date, so the trip length stays the same.

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

Passengers aged 12 or older.

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

Passengers 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.

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

Cabin to price.

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

Most stops allowed per flight.

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

Currency of the prices.

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

Flights saved for each route and date, best flights first. A busy route has 30 to 150 flights a day.

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

Connection used to open Google Flights. The default US residential proxy works best; each search uses a new IP address.

## Actor input object example

```json
{
  "from": [
    "JFK"
  ],
  "to": [
    "LAX"
  ],
  "departureDate": "+30 days",
  "extraDays": 0,
  "adults": 1,
  "children": 0,
  "infantsInSeat": 0,
  "infantsOnLap": 0,
  "cabinClass": "economy",
  "maxStops": "any",
  "currency": "USD",
  "maxFlightsPerSearch": 10,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ],
    "apifyProxyCountry": "US"
  }
}
```

# 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 = {
    "from": [
        "JFK"
    ],
    "to": [
        "LAX"
    ],
    "departureDate": "+30 days",
    "maxFlightsPerSearch": 10,
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ],
        "apifyProxyCountry": "US"
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("earlytern/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 = {
    "from": ["JFK"],
    "to": ["LAX"],
    "departureDate": "+30 days",
    "maxFlightsPerSearch": 10,
    "proxyConfiguration": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
        "apifyProxyCountry": "US",
    },
}

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

```

## MCP server setup

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