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

Google Flights scraper: flight prices, airlines, flight numbers, times, stops, layovers and CO2 for one-way and round-trip searches. Batch many routes and dates. Fast HTTP, no browser.

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

## Pricing

from $0.15 / 1,000 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

## Google Flights Scraper: Prices, Times, Airlines & Stops

Scrape Google Flights search results: **flight prices, airlines, flight numbers, departure and
arrival times, duration, stops, layovers, aircraft, legroom and CO2**, plus Google's price insight
(low / typical / high and the typical price range). One-way and round-trip searches for many
routes and dates in one run. Fast plain-HTTP scraper with no browser, so a search takes about a
second. Export to JSON, CSV or Excel, or call it from your code, Make, Zapier, n8n, or an AI agent
via MCP.

### What data can you get?

One result per itinerary (Google returns up to ~160 per search). Examples are from a real run for
JFK → LAX on 2026-12-10:

| Field | Example |
|---|---|
| `price`, `currency` | 184, USD (total for all passengers) |
| `airlines`, `flightNumbers` | JetBlue; B6 418, B6 487 |
| `departureTime`, `arrivalTime` (local) | 2026-12-10T12:35 → 2026-12-10T18:37 |
| `durationMinutes`, `stops` | 542, 1 |
| `layovers` | BOS, Boston Logan International Airport, 72 min |
| `legs` | per flight: airports, times, `aircraft` "Airbus A220-300 Passenger", `legroom` "32 in" |
| `co2Kg`, `typicalCo2Kg`, `co2DiffPct` | 495, 347, +43% |
| `isBest`, `rank` | true, 1 (Google's "Best" flights first, then the rest by price) |
| `priceLevel`, `typicalPriceLow`/`High`, `lowestPrice` | typical, 70-320, 184 |
| `cheaperNearbyDate`, `cheaperNearbyDatePrice` | Google's cheaper-day tip, when shown |
| `returnFlight` | round trips: the return flight with the same fields |
| `googleFlightsUrl` | the same search on Google Flights |

<details><summary>Sample output (1 item from a real run)</summary>

```json
{
    "tripType": "one-way",
    "origin": "JFK",
    "destination": "LAX",
    "departureDate": "2026-12-10",
    "returnDate": null,
    "rank": 1,
    "price": 184,
    "currency": "USD",
    "isBest": true,
    "airlines": ["JetBlue"],
    "flightNumbers": ["B6 418", "B6 487"],
    "departureTime": "2026-12-10T12:35",
    "arrivalTime": "2026-12-10T18:37",
    "durationMinutes": 542,
    "stops": 1,
    "layovers": [
        {
            "airport": "BOS",
            "airportName": "Boston Logan International Airport",
            "city": "Boston",
            "durationMinutes": 72
        }
    ],
    "legs": [
        {
            "airline": "JetBlue",
            "airlineCode": "B6",
            "flightNumber": "B6 418",
            "from": "JFK",
            "fromName": "John F. Kennedy International Airport",
            "to": "BOS",
            "toName": "Boston Logan International Airport",
            "departureTime": "2026-12-10T12:35",
            "arrivalTime": "2026-12-10T13:48",
            "durationMinutes": 73,
            "aircraft": "Airbus A220-300 Passenger",
            "legroom": "32 in"
        },
        {
            "airline": "JetBlue",
            "airlineCode": "B6",
            "flightNumber": "B6 487",
            "from": "BOS",
            "fromName": "Boston Logan International Airport",
            "to": "LAX",
            "toName": "Los Angeles International Airport",
            "departureTime": "2026-12-10T15:00",
            "arrivalTime": "2026-12-10T18:37",
            "durationMinutes": 397,
            "aircraft": "Airbus A320",
            "legroom": "33 in"
        }
    ],
    "co2Kg": 495,
    "typicalCo2Kg": 347,
    "co2DiffPct": 43,
    "returnFlight": null,
    "lowestPrice": 184,
    "typicalPriceLow": 70,
    "typicalPriceHigh": 320,
    "priceLevel": "typical",
    "cheaperNearbyDate": null,
    "cheaperNearbyDatePrice": null,
    "adults": 1,
    "children": 0,
    "infantsInSeat": 0,
    "infantsOnLap": 0,
    "cabinClass": "economy",
    "maxStops": null,
    "googleFlightsUrl": "https://www.google.com/travel/flights?tfs=GhoSCjIwMjYtMTItMTBqBRIDSkZLcgUSA0xBWEABSAGYAQI%3D&tfu=EgQIABABIgA&hl=en&curr=USD",
    "scrapedAt": "2026-09-29T17:31:23.687Z"
}
```

</details>

**Round trips:** each result is a full round trip. The outbound flight is at the top level, the
return flight is in `returnFlight`, and `price` is the round-trip total. For the top outbound
options (**Round trips: outbound flights to list returns for**, default 3) the Actor lists every
return flight Google offers. The remaining outbound options come with Google's cheapest
round-trip total and `returnFlight: null`.

### How much does it cost?

**$0.30 per 1,000 itineraries** (cheaper on paid Apify plans) plus $0.003 per run. There are no
search, proxy or compute fees on top. Examples:

- One route and date, all ~110 itineraries: about **$0.036**.
- 5 routes × 30 dates, top 10 itineraries each (1,500 results): about **$0.45**.

Use **Max itineraries per search** to pay only for the top options you need.

### How to use it

1. Enter **Routes** as airport codes, e.g. `JFK-LAX`, `LHR-JFK`.
2. Enter **Departure dates** (`2026-12-18`), or leave them empty for 30 days from today.
3. For round trips, add **Return dates**.
4. Optional: passengers, **Cabin class**, **Stops**, **Currency** and **Language**.
5. Run, then download the dataset. The **Overview**, **Round trips** and **Price insights** views
   show the main columns.

**API:** `POST https://api.apify.com/v2/acts/tidyscrape~google-flights-scraper/run-sync-get-dataset-items`

```json
{
    "routes": ["JFK-LAX", "SFO-ORD"],
    "departureDates": ["2026-12-18", "2026-12-19"],
    "returnDates": ["2026-12-27"],
    "cabinClass": "economy",
    "maxStops": "1",
    "maxItemsPerSearch": 10
}
```

**AI agents:** available through the Apify MCP server with fully described inputs and outputs. For
a quick answer, set `maxItemsPerSearch` to 5-10: you get Google's Best flights and the cheapest
options for a fraction of a cent.

### Use cases

- **Fare monitoring:** schedule daily runs and alert when `price` or `priceLevel` drops.
- **Flexible dates:** list many departure dates and compare `lowestPrice` per day.
- **Travel apps and agents:** real itineraries with flight numbers and local times, ready to show.
- **Market and airline research:** carriers, frequencies, aircraft and prices per route.
- **Sustainability reporting:** CO2 per itinerary against the route's typical emissions.

### FAQ

**Is it legal to scrape Google Flights?** This Actor collects publicly available fare listings
without logging in, and it contains no personal data. You are responsible for how you use the data.
This Actor is not affiliated with or endorsed by Google, and it does not book flights: follow
`googleFlightsUrl` to book.

**Are prices per person?** No, `price` is the total for all passengers you entered, in the chosen
currency. `co2Kg` is also for the whole party. Prices can differ by the country of the proxy IP,
as they do on Google Flights.

**What about the price calendar, Explore ("anywhere") and multi-city trips?** Google loads those
through internal requests that only a real browser can make, so this fast HTTP scraper does not
offer them. For flexible dates, list several departure dates: each date is one quick search.
Search multi-city trips one leg at a time.

**Why do some searches return nothing?** Some routes have no flights on that date or with that
stop limit. Google also rejects dates more than about 11 months ahead and unknown airport codes.
The run still succeeds, and the log says which searches were empty.

**Why fewer results with children or infants?** Google prices those parties differently and lists
fewer itineraries for them.

**Something broke or a field is missing?** Open an Issue. We usually respond within a day.

### Changelog

- 2026-09-29: first release. One-way and round-trip searches, price insight, CO2.

# Actor input Schema

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

Origin and destination as 3-letter IATA airport codes, e.g. "JFK-LAX" or "LHR-JFK". Each route is searched for every departure date.

## `departureDates` (type: `array`):

Outbound dates as YYYY-MM-DD, e.g. "2026-12-18". Add several to compare days. Leave empty to search 30 days from today. Past dates are skipped.

## `returnDates` (type: `array`):

Leave empty for one-way searches. For round trips, add return dates as YYYY-MM-DD; every departure date is paired with every return date on or after it.

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

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

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

Number of children (2-11 years). Google often returns fewer itineraries for searches with children or infants.

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

Number of infants (under 2) with their own seat.

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

Number of infants (under 2) on an adult's lap. At most one per adult.

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

Travel class to search.

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

Maximum number of stops per direction: "any", "0" (nonstop only), "1" (one stop or fewer) or "2" (two stops or fewer).

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

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

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

Google language code, e.g. "en", "de", "fr", "pt-BR". Affects airport and airline names.

## `maxItemsPerSearch` (type: `integer`):

Keep only the first N itineraries of each search: Google's "Best" flights first, then the rest from cheapest. 0 = all (Google returns up to ~160 per search). Use a small number such as 10 when you only need the top options.

## `maxReturnSearches` (type: `integer`):

For round trips, list the actual return flights (with the round-trip total price) for this many of the top outbound options. Each costs one extra request. The other outbound options are still returned, with Google's cheapest round-trip total and returnFlight = null. 0 = outbound options only.

## `maxResults` (type: `integer`):

Stop after this many itineraries in total. You pay per itinerary, so this also caps the cost of a run.

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

How many searches run at once. Higher is faster for many routes and dates but more likely to be rate-limited by Google.

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

Proxy servers used for requests. The default Apify datacenter proxy works for Google Flights; switch to residential if you see BLOCKED errors. The proxy's country can change which market's fares Google shows.

## Actor input object example

```json
{
  "routes": [
    "JFK-LAX"
  ],
  "adults": 1,
  "children": 0,
  "infantsInSeat": 0,
  "infantsOnLap": 0,
  "cabinClass": "economy",
  "maxStops": "any",
  "currency": "USD",
  "language": "en",
  "maxItemsPerSearch": 0,
  "maxReturnSearches": 3,
  "maxResults": 10000,
  "maxConcurrency": 2,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# 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 = {
    "routes": [
        "JFK-LAX"
    ],
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

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

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

```

## MCP server setup

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