# Google Flights Scraper - Fares, Times, CO2, Price History (`mochiboo/google-flights-search-scraper`) Actor

All flights on Google's results page for a route and date: airline, times, stops, CO2, price, plus price insight and up to about 61 daily price points of history. $1 per 1,000 flights.

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

## Pricing

from $1.00 / 1,000 results

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 - fares, flight times, CO2 and Google's price history for your routes and dates

Pay per result, at the rate shown in the pricing panel of this page, plus a very small per-run start fee. You are charged only for the results delivered.

Give this actor routes such as `SFO-JFK` or `LON-NYC` and departure dates, and it returns all flights on Google's results page for that route and date (9 to 55 per search in our runs, 2-4 November 2026), best flights first: airline, flight numbers, departure and arrival times, duration, stops and layovers, aircraft, legroom, CO2 compared with a typical flight, and the price. For every search it also returns Google's own price insight: whether prices are currently low, typical or high, the typical price range, and Google's price history for the route and date: up to about 61 daily price points (fewer for dates far ahead: 32 at 300 days). No login and no API key: it reads the public Google Flights results page, the same page you see in a browser.

### What you get

- **All flights on Google's results page for that route and date (9 to 55 per search in our runs, 2-4 November 2026), best flights first, one row each.** For example, on dates in December 2026 LAX-SFO listed 35 to 40 flights and TYO-SEL 50 to 55, thin routes such as SIN-LAX 11 to 17 and SIN-HND 9 to 14, and a date 330 days ahead fewer (TYO-SEL 22); all read on 2-4 November 2026. `maxResultsPerSearch` (default 100) is high enough to return the whole page. Google's "best" flights come first (`isBest`), then the others, in the order Google shows them (`rank`). A flight Google lists without a price is a row too, with `price` set to `null`.
- **Per flight:** airline names and code, flight numbers, departure and arrival date and local time, duration in minutes, number of stops, the layovers (airport, city, minutes), every leg with its aircraft and legroom, price and currency, CO2 in grams and how it compares with the typical flight on that route.
- **Google's price insight on every row of a search:** `priceLevel` (`low`, `typical` or `high`, when Google shows the sentence), `lowestPrice`, and the typical range `typicalPriceLow` to `typicalPriceHigh`. The first row of each search (rank 1) also carries `priceHistory`, Google's price history for the route and date: up to about 61 daily price points (fewer for dates far ahead: 32 at 300 days), so a fare monitor can read the trend without a second request.
- **Routes x dates in one run:** 20 routes and 10 dates give 200 searches, each flight one row. Built for daily fare monitoring.
- **Pay per flight**, with a very small per-run start fee. You pay only for the rows delivered.

### Input

| field | what it does |
|---|---|
| `routes` | One route per line as `FROM-TO` with 3-letter airport or city codes (`SFO-JFK`, `LON-NYC`). Up to 50 routes per run. Default `SFO-JFK`. |
| `departureDates` | Dates as `YYYY-MM-DD`, one per line, from today to 330 days ahead, up to 30. Every route is searched on every date. Leave empty for one search 30 days from today. |
| `tripType` | `one_way` (default) or `round_trip`. |
| `tripLengthDays` | Round trips only: the return date is the departure date plus this many days (1-60, default 7). |
| `maxResultsPerSearch` | 1-100, default 100: the default returns all flights on Google's results page. A lower number keeps only the first (best) ones. |
| `includePriceHistory` | Add the price history to the first row of each search (default on). |
| `proxyConfiguration` | Apify Proxy is on by default. |

A run does at most 200 searches (routes x dates). Searches beyond that, and routes beyond 50, are not run and are listed in the run summary (`skippedOverLimit`). A bad route, date or trip type stops the run at once with a plain message and nothing is charged.

Example input:

```json
{
  "routes": ["SFO-JFK", "LHR-JFK", "SIN-HND"],
  "departureDates": ["2026-12-02", "2026-12-09"],
  "tripType": "one_way"
}
```

### Output

One row per flight option and search. Example (the first row of a one-way search; `priceHistory` is cut to three of its points here):

```json
{
  "route": "SFO-JFK",
  "tripType": "one_way",
  "searchDepartureDate": "2026-12-10",
  "searchReturnDate": null,
  "rank": 1,
  "isBest": true,
  "airlineCode": "AS",
  "airlines": ["Alaska"],
  "flightNumbers": ["AS 44"],
  "from": "SFO",
  "to": "JFK",
  "departureDate": "2026-12-10",
  "departureTime": "09:00",
  "arrivalDate": "2026-12-10",
  "arrivalTime": "17:31",
  "durationMinutes": 331,
  "stops": 0,
  "layovers": [],
  "segments": [
    {
      "flightNumber": "AS 44",
      "carrier": "Alaska",
      "from": "SFO",
      "fromName": "San Francisco International Airport",
      "to": "JFK",
      "toName": "John F. Kennedy International Airport",
      "departureDate": "2026-12-10",
      "departureTime": "09:00",
      "arrivalDate": "2026-12-10",
      "arrivalTime": "17:31",
      "durationMinutes": 331,
      "aircraft": "Boeing 737MAX 9 Passenger",
      "legroom": "31 inches"
    }
  ],
  "price": 174,
  "currency": "USD",
  "co2Grams": 284000,
  "co2TypicalGrams": 359000,
  "co2DiffPercent": -21,
  "priceLevel": "typical",
  "lowestPrice": 174,
  "typicalPriceLow": 95,
  "typicalPriceHigh": 295,
  "priceHistory": [
    { "date": "2026-09-02", "price": 195 },
    { "date": "2026-09-03", "price": 195 },
    { "date": "2026-09-04", "price": 195 }
  ],
  "searchUrl": "https://www.google.com/travel/flights/search?q=one%20way%20flights%20from%20SFO%20to%20JFK%20on%202026-12-10&hl=en&gl=us&curr=USD",
  "scrapedAt": "2026-11-01T15:07:00.000Z"
}
```

| field | meaning |
|---|---|
| `route`, `tripType`, `searchDepartureDate`, `searchReturnDate` | The search this flight belongs to. `searchReturnDate` is `null` for one way. |
| `rank`, `isBest` | Position on Google's page (1, 2, 3 ... without gaps) and whether Google lists it among its best flights. |
| `airlineCode`, `airlines`, `flightNumbers` | The airline code (`multi` when several airlines sell one ticket), the airline names and the flight number of every leg. |
| `from`, `to` | Airport codes of the whole itinerary. For a city code such as `LON` these are the airports Google picked. |
| `departureDate`, `departureTime`, `arrivalDate`, `arrivalTime` | Local date and `HH:MM` time at the departure and arrival airports. |
| `durationMinutes`, `stops`, `layovers` | Total duration, number of stops and one entry per layover (`airport`, `airportName`, `city`, `durationMinutes`). |
| `segments` | One entry per leg: flight number, carrier, airports and their names, dates and times, minutes, `aircraft` and `legroom` (`null` when Google does not give them). |
| `price`, `currency` | The price as a number and its ISO currency code, exactly as Google shows it. Nothing is converted. `price` is `null` for a flight Google lists without a price (one such flight on a TYO-SEL page, 4 November 2026); the row is still delivered, at Google's rank, with its `currency`. |
| `co2Grams`, `co2TypicalGrams`, `co2DiffPercent` | Emissions of this flight, of a typical flight on the route and the difference in percent. `null` when Google gives none. |
| `priceLevel`, `lowestPrice`, `typicalPriceLow`, `typicalPriceHigh` | Google's price insight for the search (the same on every row of it). `priceLevel` is `null` when Google does not show the sentence for that search. |
| `priceHistory` | `[{date, price}]`: up to about 61 daily price points (fewer for dates far ahead: 32 at 300 days), on rank 1 only, `null` on the other rows, when `includePriceHistory` is off, and on the few searches (about 1 in 40 in our runs) for which Google's page has no history. |
| `searchUrl`, `scrapedAt` | The Google Flights page that was read and when. |

#### Round trips

With `tripType` set to `round_trip` the actor asks Google for the trip with the return date `departureDate + tripLengthDays`. **`price` is Google's price for the whole round trip**, and the rows list the **outbound** flights (Google shows the return flights only after you pick an outbound one). `searchReturnDate` tells you the return date.

#### Currency

Prices are in the currency Google shows for the request. **USD on every run, 2-4 November 2026**, from the Apify platform with the default proxy. The `currency` column names it on every row and nothing is converted; if you need another currency, convert in your own pipeline.

### Run summary

Every run writes a `RUN_SUMMARY` record to the key-value store (linked from the run's output tab):

- `complete` and `terminationReason`: `finished`, `time_budget`, `charge_limit`, `blocked`, `request_failed` or `page_shape_changed`. `complete` is `true` only for `finished`.
- `rowsPushed`, `currency`, `departureDates` (the dates used, including the default one), `requests`, `retries`.
- `searches`: one entry per search with `route`, `departureDate`, `returnDate`, `state`, `rows`, `flightsOnPage` (the flights on Google's results page, before `maxResultsPerSearch`; equal to `rows` when nothing was cut), `unpricedFlights` (delivered rows whose `price` is `null`), `skippedItineraries` (entries on the page whose layout the actor could not read, left out), `priceLevel`, `lowestPrice`. The state is `ok`, `noFlights` (Google lists no flight), `notApplied` (Google searched something else than asked, for example an unknown airport code: no rows, no charge), `requestFailed`, `pageShapeChanged` (Google's page for that search could not be read, twice: no rows for it, the run goes on), `blocked` or `notRun`. The counts are `null` where no page was read, and `flightsOnPage` / `skippedItineraries` are `null` for a search that was delivered just before a platform restart.
- `skippedOverLimit`, `warnings` (plain-text notes: searches that failed, searches Google did not apply, itineraries left out, clamped inputs), `blockEvidence` and `error`.

A very large run stops cleanly before the run timeout instead of being killed: the searches not reached are `notRun`, the summary says `time_budget`, and the rows already fetched are kept. Split the routes over several runs or raise the run timeout.

### How it behaves, honestly

- **One public results page per search**, one request at a time, at least 3 seconds apart. Plan about 15 seconds per search: on the platform on 4 November 2026 the median was 15 s per search between 13:38 and 13:58 UTC (23 searches, 2 s to 45 s, when Google often answered with errors) and 4.9 s between 15:13 and 15:25 UTC (25 searches, the longest 18 s plus one 30-second timeout, when Google was calm). So 200 searches take about 25 minutes when Google is calm and about 50 when it is not (extrapolated from per-search times: our largest run had 16 searches): set the run timeout to 7,200 seconds for a full run. It lists the flights Google shows on that page, not every fare Google can find: no booking links, no per-airline fare classes, no baggage fees.
- **Google sometimes answers a search with an error page** instead of the flights (on 2 November 2026 that was roughly a quarter to a third of our test requests, most often on routes such as SIN-HND; on 4 November 2026 29 of 62 requests, 47%, got no usable answer: error pages and some 30-second timeouts). The actor asks again up to five times, each time from a new proxy address, after 2, 4, 8, 16 and 30 seconds. A search that still has no answer is reported as `requestFailed` in the summary and the run goes on; the run then ends as `request_failed` (partial). Run it again for those routes and dates. How often a search ended as `requestFailed`: 3 of 28 searches (about 1 in 9) on 4 November 2026, with 3 retries (13:38-13:58 UTC, when 47% of requests got no usable answer); 0 of 26 searches on the same day with 5 retries (14:28-14:35 UTC, when about 1 request in 6 needed a retry). Google's error rate changes through the day, so read both as samples.
- **A refusal ends the run.** If Google answers with a block (HTTP 403, a redirect to a "sorry" page, or a consent, captcha or "unusual traffic" page), the actor stops, keeps what it has and says so in `blockEvidence`. It never tries to get around a block.
- **A page the actor cannot read is not a refusal.** A flight Google lists without a price is a row with `price` `null`. An entry on the page whose layout the actor does not know is left out (counted in `skippedItineraries`, the first one named in `warnings`) and the rest of the page is kept. If more than half of a page cannot be read, or the page has no readable data and no challenge on it, the search is asked once more and then ends as `pageShapeChanged`: no rows for it, the run goes on to the next search (three in a row stop the run as `page_shape_changed`).
- The price insight sentence ("prices are currently low / typical / high") is not shown by Google for every search; `priceLevel` is `null` then, while the typical range and the history are still given.
- `departureTime` and `arrivalTime` are local clock times at the departure and the arrival airport; a flight that lands after midnight has an `arrivalDate` one day later.
- Only public data: no login, no cookies, nothing personal.

### FAQ

**How many flights do I get per search?** All flights on Google's results page for that route and date (9 to 55 per search in our runs, 2-4 November 2026), best flights first. `maxResultsPerSearch` (1-100, default 100) caps it; `flightsOnPage` in the run summary shows how many flights the page had.

**Can I use city codes?** Yes. `LON-NYC` searches the airports of both cities: in our test the rows ran from LHR, LGW and STN to JFK, EWR and LGA, and `from` / `to` show the airports of each itinerary.

**What does a run cost?** The rate in the pricing panel per flight row plus the small start fee. In our runs (2-4 November 2026) a search listed 9 to 55 flights, so it cost 9 to 55 times the per-result rate (34 times on average over 24 test searches); at that average 10 routes x 7 dates is 70 searches and roughly 2,400 rows.

**Why did my search return nothing?** See `searches[].state` in the run summary: `noFlights`, `notApplied` (check the airport codes and the dates), `requestFailed` (Google errored; run again) or `pageShapeChanged` (the page could not be read; see `warnings`).

Keywords: google flights scraper, flight prices api, airfare tracker, cheap flights data, flight price history, google flights api alternative, flight schedule scraper.

# Actor input Schema

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

One route per line as FROM-TO with 3-letter airport or city codes, e.g. SFO-JFK or LON-NYC. Up to 50 routes per run.

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

Dates as YYYY-MM-DD, one per line, up to 30. Every route is searched on every date. Leave empty for one search 30 days from today.

## `tripType` (type: `string`):

One way, or round trip (the return date is the departure date plus the trip length). Round-trip prices are Google's price for the whole trip.

## `tripLengthDays` (type: `integer`):

Return date = departure date + this many days. Used only for round trips.

## `maxResultsPerSearch` (type: `integer`):

1-100, default 100. The default returns all flights on Google's results page for that route and date (9 to 55 per search in our runs, 2-4 November 2026), best flights first; a lower number keeps only the first ones.

## `includePriceHistory` (type: `boolean`):

Add Google's daily price history (up to about 61 price points, fewer for dates far ahead) to the first row of each search.

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

Apify Proxy is on by default.

## Actor input object example

```json
{
  "routes": [
    "SFO-JFK"
  ],
  "tripType": "one_way",
  "tripLengthDays": 7,
  "maxResultsPerSearch": 100,
  "includePriceHistory": true,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

## `results` (type: `string`):

One row per flight option and search: airline, flight numbers, times, duration, stops, layovers, aircraft, legroom, CO2, price and currency, plus Google's price insight and, on the first row of each search, the daily price history (up to about 61 points).

## `runSummary` (type: `string`):

What the run wrote and how it ended: one entry per search (ok, noFlights, notApplied, requestFailed, pageShapeChanged, blocked, notRun) with the rows written and the flights on Google's page, the currency seen and the termination reason (the RUN_SUMMARY record in the default key-value store).

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

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

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

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,mochiboo/google-flights-search-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/5bGfj8Zy1AQMLt94r/builds/q1QkEnSWOh555dCSj/openapi.json
