# Google Flights Search Scraper (`apt_marble/google-flights-search-scraper`) Actor

Get the full Google Flights fare table for any route and date: fare, airline, flight number, aircraft, times, stops, layovers and carbon. One-way or return, any cabin, up to nine travellers, in the market you sell into. A search the source refuses is reported as failed, never as "no flights".

- **URL**: https://apify.com/apt\_marble/google-flights-search-scraper.md
- **Developed by:** [Hamza](https://apify.com/apt_marble) (community)
- **Categories:** Travel
- **Stats:** 2 total users, 1 monthly users, 66.7% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.00 / 1,000 flight founds

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/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## Google Flights Search Scraper

Give it a route and a date and it hands back the whole fare table Google Flights
shows for that search — every flight, with its fare, airlines, flight numbers,
aircraft, departure and arrival times, stop count, layover airports and layover
lengths, cabin, legroom and carbon figure. One-way or return, any cabin, up to
nine travellers, priced for the market you sell into. Search one route on one
day, or dozens of routes across dozens of dates in a single run. No account and
no login are needed — just run it.

### What you can do with it

- **Track a route's price** — run it daily on the routes you care about and keep
  a clean history of the cheapest fare, the airline holding it and the flight
  behind it.
- **Watch competitors** — see who is flying a route, at what times, on what
  aircraft, and where their fares sit against yours.
- **Fill a travel site or app** — a ready-made fare table per route and date,
  with airlines, times, stops and layovers already separated into columns.
- **Plan a trip programme** — compare thirty departure days at once and see how
  the fare moves through the month.
- **Study a market** — the same route in the United States, the United Kingdom,
  Germany or India, each priced the way travellers there see it.
- **Report on emissions** — every flight carries its own carbon figure, the
  typical figure for that route, and how far above or below typical it sits.

### What you get

One row per flight. Abridged real example:

```json
{
  "searchId": "JFK-LAX-2026-09-15",
  "source": "google-flights",
  "market": "US",
  "collectedAt": "2026-09-01T09:14:22.187Z",
  "origin": "JFK",
  "destination": "LAX",
  "departureDate": "2026-09-15",
  "returnDate": null,
  "tripType": "one_way",
  "cabinClass": "economy",
  "passengers": { "adults": 1, "children": 0, "infantsInSeat": 0, "infantsOnLap": 0 },
  "price": 169,
  "priceExact": 168.4,
  "isPriceExact": false,
  "currency": "USD",
  "currencyFromSource": true,
  "priceCovers": "one_way",
  "isCheapestInSearch": true,
  "rank": 1,
  "listing": "best",
  "itineraryId": "F0bbN",
  "departureAirport": "JFK",
  "departureAirportName": "John F. Kennedy International Airport",
  "arrivalAirport": "LAX",
  "arrivalAirportName": "Los Angeles International Airport",
  "departureLocal": "2026-09-15T08:00",
  "arrivalLocal": "2026-09-15T10:59",
  "totalDurationMin": 359,
  "stops": 0,
  "airlineCodes": ["DL"],
  "airlineNames": ["Delta"],
  "flightNumbers": ["DL713"],
  "aircraftTypes": ["Boeing 767"],
  "layoverAirports": [],
  "layoverDurationsMin": [],
  "legroom": "31 in",
  "co2eKg": 241,
  "routeTypicalCo2eKg": 337,
  "co2ePercentVsTypical": -28,
  "legs": [
    {
      "from": "JFK",
      "to": "LAX",
      "airlineCode": "DL",
      "airlineName": "Delta",
      "flightNumber": "DL713",
      "aircraft": "Boeing 767",
      "cabin": "economy",
      "legroom": "31 in",
      "departureLocal": "2026-09-15T08:00",
      "arrivalLocal": "2026-09-15T10:59",
      "durationMin": 359,
      "co2eKg": 241.3
    }
  ]
}
```

Alongside the table, each run writes a summary that separates flights collected,
searches that returned flights, searches that genuinely had none, and searches
that could not be completed. Those three are never mixed together.

### Input reference

| Field | Type | Default | What it does |
| --- | --- | --- | --- |
| `origins` | list of text | `["JFK"]` | Where the trip starts. Three-letter airport codes (`JFK`, `LHR`) or city codes covering every airport in a city (`NYC`, `LON`, `PAR`). |
| `destinations` | list of text | `["LAX"]` | Where the trip ends, in the same format. Every departure point is searched against every arrival point. |
| `departureDates` | list of text | `["+30"]` | Outbound dates. An exact day (`2026-09-15`) or a number of days ahead (`+30`), which keeps a scheduled run looking the same distance into the future every time. |
| `tripLengthDays` | number | empty | Empty means one-way. A number of nights turns the search into a return trip: leaving on the 15th with 7 nights comes back on the 22nd. |
| `cabinClass` | text | `economy` | `economy`, `premium_economy`, `business` or `first`. |
| `stops` | text | `any` | `any`, `nonstop`, `one_stop_or_fewer` or `two_stops_or_fewer`. |
| `adults` | number | `1` | Adults (12+). Nine travellers in total at most. |
| `children` | number | `0` | Children aged 2–11. |
| `infantsInSeat` | number | `0` | Infants in their own seat. See the limits below before using it. |
| `infantsOnLap` | number | `0` | Infants on an adult's lap; one adult each. See the limits below before using it. |
| `market` | text | `US` | The country you are selling into. Fares and availability differ by market. |
| `currency` | text | `USD` | The currency to ask for. Every row also states the currency that actually came back. |
| `maxResultsPerSearch` | number | `100` | How many flights to keep per route and date, cheapest first. |
| `maxSearches` | number | `100` | Safety cap on the total number of route-and-date combinations in one run. |
| `cheapestOnly` | true/false | `false` | Keep only the cheapest flight of each search — one row per route and date. |
| `maxPrice` | number | empty | Drop flights above this fare, in the currency that comes back. |
| `maxJourneyMinutes` | number | empty | Ask for flights no longer than this, layovers included. |
| `includeAirlines` | list of text | empty | Keep only flights on these airlines (`BA`, `AA`, `LH`). |
| `parallelSearches` | number | `4` | How many searches to run at the same time, 1 to 6. |

### Output fields

| Field | What it is |
| --- | --- |
| `searchId` | The route and date this row answers, e.g. `JFK-LAX-2026-09-15`. |
| `origin`, `destination` | What you asked for (an airport or a city code). |
| `departureDate`, `returnDate` | The dates searched. `returnDate` is empty for one-way. |
| `tripType` | `one_way` or `round_trip`. |
| `cabinClass`, `passengers` | The cabin and traveller mix the fare applies to. |
| `price` | The fare as the source lists it, in whole units. |
| `priceExact` | The fare to the cent where the source publishes it, otherwise empty. |
| `isPriceExact` | Whether the listed fare is the exact one. |
| `currency` | The currency the fare actually came back in — read this, not the one you asked for. |
| `currencyFromSource` | True when the source stated the currency itself. |
| `priceCovers` | `one_way`, or `round_trip_total` when the fare covers the whole return trip. |
| `isCheapestInSearch` | True when this fare is the lowest found for that route and date. |
| `rank` | Position within the search, cheapest first. |
| `listing` | `best` when the source picked this flight out, `other` for the rest of the list. |
| `itineraryId` | The source's own identifier for this flight combination. |
| `departureAirport`, `arrivalAirport` | The actual airports flown, with their full names. |
| `departureLocal`, `arrivalLocal` | Local clock times at each airport. |
| `totalDurationMin` | Door-to-door journey length in minutes. |
| `stops` | Number of stops. |
| `airlineCodes`, `airlineNames` | The airlines on the itinerary. |
| `flightNumbers` | Every flight number, in order. |
| `aircraftTypes` | Aircraft flown. |
| `layoverAirports`, `layoverDurationsMin` | Where the flight stops and for how long. |
| `legroom` | Legroom on the first flight, as published. |
| `co2eKg` | Carbon for this flight. |
| `routeTypicalCo2eKg` | Carbon for a typical flight on this route — a figure about the route, not about this flight, and the same on every row of a search. |
| `co2ePercentVsTypical` | How this flight compares with that typical figure, in whole percent. `-28` means 28% cleaner than typical; a positive number means dirtier. Published by the source, not calculated here. |
| `legs` | Each flight in the itinerary: airports, airline, flight number, aircraft, cabin, legroom, times, length and carbon. |
| `bookingToken` | The source's own reference for this itinerary. |
| `market`, `collectedAt`, `source` | Which market the fare was collected for, and when. |

### Pricing

You pay for what you get, in two parts:

- **$0.003 per flight** added to your results — $3.00 per 1,000 flights.
- **$0.015 per route and date searched**, charged once each search is complete.
  A route that genuinely has no flights on the day you searched is still a
  completed search and is charged. A search that could not be completed is
  **not** charged.

**Worked example.** Ten routes across seven dates is 70 searches — $1.05. If
those routes return about 25 flights each, that is roughly 1,750 flights —
$5.25. Total for the run: about **$6.30**.

Tracking prices instead? Turn on `cheapestOnly` and the same 70 searches produce
70 rows: $1.05 for the searches plus $0.21 for the rows, about **$1.26**.

### Limits & what this actor cannot do

- **Fares are a snapshot.** Airline pricing changes continuously; a fare seen now
  may be gone minutes later.
- **It cannot book, hold or reserve anything.** It reports what the source
  publishes and cannot guarantee a fare is still available.
- **The fare is the one shown for the search you asked for.** Taxes, carrier
  fees and baggage rules vary by airline and fare type, and extras appear only
  where the source publishes them.
- **The listed fare is rounded up to a whole unit** (169 where the true fare is
  168.40). Where the exact figure is published it is given in `priceExact`.
- **Fares and availability differ by market and currency.** Results reflect the
  market you choose, and each row carries the currency that actually came back —
  which is not always the one you asked for, and is never assumed.
- **Dates run to 330 days ahead.** A date in the past or beyond that window is
  reported as out of range rather than searched, because the source answers such
  a date with a normal-looking page that has no fares on it.
- **Routes and schedules are seasonal.** A real route with nothing flying on the
  dates you searched is reported as having no flights, not as an error.
- **A search the source refuses to complete is reported as a failed search,
  never as "no flights found".** Failed searches are listed individually in the
  run summary, and a run where nothing could be completed ends as a failed run
  rather than as an empty success.
- **Return trips list the outbound flights**, and the fare on each row is the
  full return fare, marked as `round_trip_total`.
- **Trips with three or more separate legs are not supported.** Search them as
  separate one-way legs instead.
- **Searches that include an infant come back with no flights**, whatever the
  route — the source does not publish results for them. The run warns you rather
  than leaving you to read an empty result as "nothing flies this route".
- **The airline and maximum-fare filters are applied to the flights that come
  back**, not to the search itself, so they narrow your results rather than
  making the search cheaper.
- **The route's carbon figure** (`routeTypicalCo2eKg`) describes the route, not
  the individual flight; it is the same on every row of a search by design, and
  it is a **typical** flight, not the cleanest one. Plenty of flights come in
  below it — that is what `co2ePercentVsTypical` being negative means, and it is
  normal rather than a sign of a bad figure.
- **There is no "lowest carbon on this route" column**, because the source does
  not publish one. Comparing a flight against the cleanest option on its route
  can only be done across the flights the run actually collected.
- **The source publishes a limited number of flights for any one search**, so a
  very broad search returns what it makes available rather than an unlimited
  list. Vary the dates to widen coverage.
- **Speed depends on the size of the job** and on the source's own response
  times; no fixed rate is promised.
- **The source's terms govern automated access.** You are responsible for using
  the data lawfully and in line with those terms.

### FAQ

**Do I need an account on Google Flights?**
No. Nothing is signed in and nothing is stored on your behalf.

**Does it need my login or password?**
No. There is no credential of any kind to supply.

**Can I schedule it?**
Yes. Schedule it like any other Actor. Writing dates as `+30` rather than as a
fixed day keeps a daily run looking the same distance ahead every morning, which
is what you want for price tracking.

**Are these fares bookable?**
They are the fares published for that search at the moment it was collected.
Airline pricing moves constantly, and nothing here holds a seat, so treat a fare
as an observation rather than a guarantee.

**A search came back with no flights — is that a mistake?**
No. Routes are seasonal, and some airport pairs simply have nothing flying on a
given day. That is reported as a completed search with no flights, and it is
kept strictly separate from a search that could not be completed — you will
never be shown a refusal dressed up as "no flights found".

**Can I cover a whole month?**
Yes. Put up to sixty dates in `departureDates` (or a range such as `+1`, `+2`,
`+3` …) and each one becomes its own search, subject to `maxSearches`.

**Why do the same route and date give different fares in different markets?**
Because they genuinely differ. Airlines file different fares by point of sale,
so pick the market you sell into and compare within it rather than converting
between markets.

# Actor input Schema

## `origins` (type: `array`):

Where the trip starts. Use three-letter airport codes (JFK, LHR, CDG) or city codes that cover every airport in a city (NYC, LON, PAR). Add several to search several starting points in one run.

## `destinations` (type: `array`):

Where the trip ends. Same format as the departure list: airport codes (LAX, DXB, NRT) or city codes (NYC, LON, TYO). Every departure point is searched against every arrival point.

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

One or more outbound dates. Write an exact day as 2026-09-15, or a number of days from the day the run starts as +30 — handy for a scheduled run that should always look, say, one month ahead. Fares are published for today and the following 330 days.

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

Leave empty for one-way flights. Set a number of nights to search return trips instead: a departure on 15 September with 7 nights comes back on 22 September. Return results list the outbound flights and the price on each row is the full return fare.

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

Which cabin to price.

## `stops` (type: `string`):

Limit how many stops a flight may have. Choosing "Nonstop only" is checked against the results, so a run can never quietly hand you connecting flights.

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

Adult passengers (12+). At most nine passengers in total.

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

Child passengers (2-11).

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

Infants under 2 travelling in their own seat. Note: this source publishes no flights at all for searches that include an infant, so such a run is expected to come back empty.

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

Infants under 2 travelling on an adult's lap; each one needs its own adult. Note: this source publishes no flights at all for searches that include an infant, so such a run is expected to come back empty.

## `market` (type: `string`):

Fares and availability differ by country. Pick the market you care about and results come back the way travellers there see them.

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

The currency the fares should be quoted in. Every row also states the currency that actually came back, which is what you should read — a source that will not quote your choice for a market answers in its own currency instead.

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

How many flights to keep for each route and date, cheapest first. A busy route publishes roughly 15-60 flights per day.

## `maxSearches` (type: `integer`):

A safety cap on the total number of route-and-date combinations. Three departure airports, two arrival airports and five dates is thirty searches.

## `cheapestOnly` (type: `boolean`):

Useful for price tracking: one row per route and date, carrying the lowest fare found.

## `maxPrice` (type: `integer`):

Optional. Drop any flight priced above this figure, in the currency that comes back. Leave empty to keep every fare.

## `maxJourneyMinutes` (type: `integer`):

Optional. Ask for flights no longer than this from take-off to landing, layovers included. Leave empty for no limit.

## `includeAirlines` (type: `array`):

Optional. Two-character airline codes such as BA, AA, LH. A flight is kept when any of its airlines is on the list. Leave empty to keep every airline.

## `parallelSearches` (type: `integer`):

Higher finishes a large job sooner; lower is gentler on the source. Four suits almost every run.

## Actor input object example

```json
{
  "origins": [
    "JFK",
    "EWR"
  ],
  "destinations": [
    "LAX"
  ],
  "departureDates": [
    "2026-09-15",
    "+45"
  ],
  "cabinClass": "economy",
  "stops": "any",
  "adults": 1,
  "children": 0,
  "infantsInSeat": 0,
  "infantsOnLap": 0,
  "market": "US",
  "currency": "USD",
  "maxResultsPerSearch": 100,
  "maxSearches": 100,
  "cheapestOnly": false,
  "includeAirlines": [
    "BA",
    "AA"
  ],
  "parallelSearches": 4
}
```

# Actor output Schema

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

Every flight found, one row per itinerary, cheapest first within each route and date.

## `flightsCsv` (type: `string`):

The same table as a CSV download.

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

Counts of flights collected, searches read, searches with no flights and searches that could not be completed.

# 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 = {
    "origins": [
        "JFK"
    ],
    "destinations": [
        "LAX"
    ],
    "departureDates": [
        "+30"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("apt_marble/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 = {
    "origins": ["JFK"],
    "destinations": ["LAX"],
    "departureDates": ["+30"],
}

# Run the Actor and wait for it to finish
run = client.actor("apt_marble/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 '{
  "origins": [
    "JFK"
  ],
  "destinations": [
    "LAX"
  ],
  "departureDates": [
    "+30"
  ]
}' |
apify call apt_marble/google-flights-search-scraper --silent --output-dataset

```

## MCP server setup

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