# Google Flights Scraper & API — $0.01/Search (`datafabrik/google-flights-scraper`) Actor

Google Flights API for cheap flights and airfare tracking: every flight for a route and date (100–300), one-way, round trip or multi-city, with price, airlines, flight numbers, stops, CO₂, price level and 60-day history, plus a cheapest-dates calendar. $0.01 per search; failed searches free.

- **URL**: https://apify.com/datafabrik/google-flights-scraper.md
- **Developed by:** [Data Fabrik](https://apify.com/datafabrik) (community)
- **Categories:** Travel, Agents, MCP servers
- **Features:** Limited permissions
- **Stats:** 5 total users, 3 monthly users, 99.5% runs succeeded, 1 bookmarks
- **User rating**: No ratings yet

## Pricing

from $6.00 / 1,000 flight searches

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

Get **every flight Google Flights has** for a route and date — usually 100 to 300 options, not only the 10–15 shown before you click "View more flights" — with price, airlines, flight numbers, times, stops, layovers, aircraft, legroom and CO₂ emissions.

Each search also returns **Google's price insights**: whether today's price is *low*, *typical* or *high*, the typical price range, and the **price history of the last 60 days**. A second mode builds a **cheapest-dates calendar**: the lowest price for every departure day over up to a year.

- ✈️ One-way, round trip and **multi-city** (2 to 6 flights), any cabin, up to 9 passengers
- 🗺️ Many routes and dates in one run (every origin × every destination × every date)
- 🏙️ City codes (PAR, LON, NYC…) and multi-airport searches (`CDG+ORY`)
- 🔁 Round trips: optional return options for the cheapest or best outbound
- 📉 Price level, typical range and 60-day price history for every search
- 📅 Cheapest dates over a range, one-way or with a fixed trip length
- ⚡ HTTP only, no browser: a search takes 1–3 seconds
- 💸 **Pay per search, not per flight** — **$0.01 per search** with all its flights (about $0.03–$0.10 per 1,000 flights), less on paid plans; failed, empty and invalid searches are never charged
- 🔌 Works as a **Google Flights API**: call it over HTTP, from Python or JavaScript, or from Make, Zapier, n8n and MCP clients

### How it works

The Google Flights website shows about 15 flights first and loads the rest when you click "View more flights". Both come from the same internal request. This Actor sends that request directly, over plain HTTP, and reads the **complete list** in one go: no browser, no clicking, no scrolling.

- One search = one request to Google (plus one per extra leg for return flights or multi-city trips).
- Google often answers the first request of a session with a temporary error: the Actor retries automatically, from a new IP when needed. You do not pay for retries.
- Results are parsed into flat, documented JSON (see **Output fields** below), with the same prices, times and flight numbers as the website.
- Each row has a `googleFlightsUrl` that opens the same search on Google Flights, so any result can be checked by hand.

### Quick start

1. Click **Try for free** (or **Start**) on this page.
2. In **From (airports)** and **To (airports)**, type airport codes such as `CDG` and `JFK`, or city codes such as `PAR` and `NYC`.
3. Add one or more **Departure dates** (`YYYY-MM-DD`). Leave it empty to search 30 days from today.
4. Click **Start**. A search takes a few seconds; the flights appear in the **Output** tab and can be downloaded as JSON, CSV, Excel or HTML.

The Free plan of Apify includes monthly credit, enough for hundreds of searches.

### What you can do with it: cheap flights, airfare tracking, price alerts

- **Fare monitoring**: run it on a schedule for your routes and get alerted when `searchPriceLevel` turns `low`.
- **Travel apps and agencies**: full result lists with flight numbers and segments, ready for your own filters.
- **Market research**: compare airlines, prices and emissions across hundreds of routes.
- **Flexible trips**: find the cheapest week to fly with the cheapest-dates mode.
- **Corporate travel**: check business-class fares and nonstop options on the routes your team flies, with times that fit meetings (`departureTimeRange`).
- **Airline and airport analysis**: which carriers serve a route, how often, with which aircraft, and how many flights are nonstop (`stops`, `segments[].aircraft`, `nonstopAvailable`).
- **Sustainability reporting**: CO₂ estimates per flight and per segment (`emissionsKg`), and how each flight compares with the typical one on the route (`emissionsVsTypicalPercent`).
- **AI agents and chatbots**: give an assistant live flight options through the Apify MCP server or the HTTP API, instead of letting it guess.

### How it compares (public Apify Store data, October 2026)

| | This Actor | Leader | Cheapest competitor |
|---|---|---|---|
| Price for one search returning ~130 flights | **$0.008** (Bronze), $0.01 (Free) | ≈ $0.018 ($0.017 per page + setup) | ≈ $0.0078 (per flight) |
| Start fee | $0.00005 | $0.00001 + $0.001 setup | $0.00005 |
| Flights returned | all 100–300, not just the top 15 | per page | all |
| Runs that fail or time out (30 days) | 0 % | 1 % | 7 % |
| Multi-city, price history, cheapest-dates calendar | yes, yes, yes ($0.005 per 60-day window) | yes, partial, no | yes, no, no |
| Failed, empty or filtered-out searches | free | — | — |

Source: Store API, `publicActorRunStats30Days` and pricing pages, 8 Oct 2026. Figures change.

### Input

![Google Flights Scraper input form: what to get, from and to airports, departure dates and trip type](https://raw.githubusercontent.com/data-fabrik/apify-examples/main/images/google-flights-input.png)

| Field | What it does |
|---|---|
| **What to get** · `mode` | `flights` (every flight for given dates) or `cheapest-dates` (lowest price per day over a range). |
| **From (airports)** · `origins` | Airports: IATA codes (`CDG`), city codes (`PAR` = CDG+ORY+BVA), lists (`CDG+ORY`) or Google place ids (`/m/05qtj`). |
| **To (airports)** · `destinations` | Same format. Every origin is combined with every destination. |
| **Departure dates** · `departureDates` | `YYYY-MM-DD` dates (flights mode). One search per route and date. Empty = 30 days from today. |
| **Trip type** · `tripType` | `one_way`, `round_trip` or `multi_city`. Empty = one-way (round trip when `returnDates` or `tripLengthDays` is given, multi-city when `multiCityTrips` is given). |
| **Multi-city trips** · `multiCityTrips` | Multi-city: one trip per line, flights separated by `;` — `CDG JFK 2027-06-15; JFK LAX 2027-06-20; LAX CDG 2027-06-27` (2 to 6 flights, airport or city codes). Leave `origins`, `destinations` and `departureDates` empty. |
| **Return dates (round trip)** · `returnDates` | Round trip: one return date per departure date, same order. |
| **Trip length in days (round trip)** · `tripLengthDays` | Round trip: return = departure + N days (required for round trips in cheapest-dates mode). |
| **Also get return flights (round trip)** · `returnFlightsFor` | Round trip: also fetch the return options for the `cheapest` or `best` outbound (`none` by default). Multi-city: the flight of each leg that leads to the next leg's options (`cheapest` by default, or `best`). No extra charge. |
| **Cheapest dates: from**, **Cheapest dates: to** · `dateRangeStart` / `dateRangeEnd` | Cheapest-dates mode: first and last departure day (up to 366 days). |
| **Cabin class** · `cabinClass` | `economy`, `premium_economy`, `business`, `first`. |
| **Adults**, **Children (2–11)**, **Infants in seat**, **Infants on lap** · `adults`, `children`, `infantsInSeat`, `infantsOnLap` | Passengers (max 9 in total). Prices are the total for all passengers. |
| **Stops** · `maxStops` | `any`, `nonstop`, `one_stop_or_fewer`, `two_stops_or_fewer`. |
| **Airlines** · `airlines` | Only these airlines: IATA codes (`AF`, `DL`) or `STAR_ALLIANCE`, `SKYTEAM`, `ONEWORLD`. |
| **Max price** · `maxPrice` | Only flights at or under this price (currency of the run, all passengers; whole-trip price for round trips and multi-city). Cheapest-dates mode: only days at or under it. |
| **Departure time**, **Arrival time** · `departureTimeRange` / `arrivalTimeRange` | Only flights leaving / arriving in this local time range, e.g. `06:00-12:00` (or `22:00-06:00` overnight). Applies to every flight listed. Flights mode. |
| **Max flights per search** · `maxFlightsPerSearch` | Cap per search (0 = all). Google's top flights come first. |
| **Include flights without a price** · `includeUnpricedFlights` | Keep flights Google lists as "price unavailable". Off by default. |
| **Output format** · `outputFormat` | `flights`: one row per flight (best for spreadsheets). `searches`: one item per search with a `flights` array. |
| **Currency**, **Language**, **Country** · `currency`, `language`, `country` | Currency of prices, language of names, and point of sale. |
| **Parallel searches** · `maxConcurrency` | Searches run in parallel (default 5). |
| **Retries per request** · `maxRetries` | Retries per request (default 6). Google often needs one retry; it is automatic. |
| **Proxy** · `proxy` | Apify datacenter proxy by default — cheap and enough for Google Flights. |

Dates must be in the future; omit `departureDates` to search 30 days from today.

#### Example: every flight Paris → New York on two dates

```json
{
  "origins": ["PAR"],
  "destinations": ["NYC"],
  "departureDates": ["2027-06-15", "2027-06-22"]
}
```

#### Example: cheapest week-long trips Lyon ⇄ Lisbon this winter

```json
{
  "mode": "cheapest-dates",
  "origins": ["LYS"],
  "destinations": ["LIS"],
  "tripType": "round_trip",
  "tripLengthDays": 7,
  "dateRangeStart": "2027-12-01",
  "dateRangeEnd": "2028-02-28",
  "currency": "EUR"
}
```

#### Example: multi-city Paris → New York → Los Angeles → Paris

```json
{
  "multiCityTrips": ["PAR NYC 2027-06-15; NYC LAX 2027-06-20; LAX PAR 2027-06-27"],
  "currency": "EUR"
}
```

Google Flights builds a multi-city trip one flight at a time: the Actor lists every option for the first flight, then the options of the second flight after the cheapest first one (or Google's best one with `returnFlightsFor: "best"`), and so on. Prices are for the **whole trip**.

#### Example: business class, nonstop, morning departures

```json
{
  "origins": ["LON"],
  "destinations": ["NYC"],
  "departureDates": ["2027-01-12"],
  "cabinClass": "business",
  "maxStops": "nonstop",
  "departureTimeRange": "07:00-12:00",
  "currency": "GBP",
  "country": "gb"
}
```

#### Example: a family of four, one airline alliance, price cap

```json
{
  "origins": ["MAD"],
  "destinations": ["CUN"],
  "departureDates": ["2027-07-10"],
  "tripType": "round_trip",
  "tripLengthDays": 14,
  "adults": 2,
  "children": 2,
  "airlines": ["ONEWORLD"],
  "maxPrice": 4000,
  "currency": "EUR"
}
```

`maxPrice` is compared with the price Google shows: the total for all four passengers, round trip included.

#### Example: many routes in one run

```json
{
  "origins": ["BER", "MUC", "FRA"],
  "destinations": ["BCN", "LIS", "ATH"],
  "departureDates": ["2027-05-14", "2027-05-21"],
  "maxFlightsPerSearch": 20
}
```

Every origin is combined with every destination and every date: 3 × 3 × 2 = 18 searches, each with its 20 first flights.

### Output

![Google Flights Scraper output: one row per flight with price, price level, airlines, departure, arrival, duration, stops and CO2](https://raw.githubusercontent.com/data-fabrik/apify-examples/main/images/google-flights-output.png)

One row per flight (`outputFormat: "flights"`):

```json
{
  "type": "flight",
  "origin": "CDG", "destination": "JFK", "departureDate": "2026-11-15",
  "leg": "outbound", "rank": 1, "category": "top",
  "price": 391, "currency": "USD",
  "airlines": ["American"], "flightNumbers": ["AA 43"],
  "departure": "2026-11-15T11:25", "arrival": "2026-11-15T13:50",
  "durationMinutes": 505, "stops": 0, "layovers": [],
  "emissionsKg": 359, "typicalEmissionsKg": 370, "emissionsVsTypicalPercent": -3,
  "segments": [{ "flightNumber": "AA 43", "from": "CDG", "to": "JFK", "aircraft": "Boeing 787", "legroom": "31 inches", "...": "..." }],
  "searchCheapestPrice": 383, "searchPriceLevel": "low", "typicalPriceRange": [390, 560],
  "googleFlightsUrl": "https://www.google.com/travel/flights/search?tfs=…"
}
```

Times are **local airport times**. Round-trip prices are the total round-trip price, as on Google Flights.

A summary of each search — status, number of flights, cheapest price, price level, typical range, usual price and the 60-day `priceHistory` — is saved in the key-value store record `SEARCHES` (and inside each item with `outputFormat: "searches"`). Searches that fail or that Google rejects (unknown airport, date too far ahead) also appear in the dataset with their `status` and `errors`, free of charge. With `maxPrice` or a time range, the summary also has `flightsMatchingFilters` (`flightsFound` and `cheapestPrice` stay Google's figures for the whole search).

Multi-city rows also have `itinerary` (`CDG→JFK 2026-11-15 | JFK→LAX 2026-11-20 | …`), `leg` (`leg1`, `leg2`…), `legIndex` and, from the second flight on, `afterFlights` (the flights chosen before). The search summary has `multiCity`: each leg with its number of options and the flight followed, and `tripPrice`, the price of the whole trip. A trip where one flight has no option, or cannot be fetched, is returned free with its `status`.

Cheapest-dates mode returns one row per departure day: `departureDate`, `returnDate`, `price`, `isCheapestInWindow`.

### Output fields

#### Flight rows (`type: "flight"`)

| Field | Meaning |
|---|---|
| `searchId` | Identifies the search the flight belongs to (route, dates, cabin). |
| `origin`, `destination`, `departureDate`, `returnDate`, `tripType`, `cabinClass`, `passengers` | The search, as you asked for it. |
| `leg` | `outbound`, `return`, or `leg1`, `leg2`… for multi-city trips. |
| `rank` | Position in Google's order (1 = first). |
| `category` | `top` (Google's "Top flights"), `other` (the rest), or `return`. |
| `price`, `currency` | Price for all passengers, in your currency. Round trip and multi-city: price of the whole trip. |
| `airlines`, `flightNumbers`, `operatedBy` | Airlines of the itinerary, flight numbers (`AF 22`), and Google's "operated by" mentions when there are any. |
| `from`, `to`, `departure`, `arrival` | Airports and local date-times (`2026-11-15T11:25`). |
| `durationMinutes`, `stops` | Total travel time and number of stops. |
| `layovers` | Each stop: `airport`, `airportName`, `city`, `durationMinutes`, `changeOfAirport` (true when you must change airport, e.g. LGW → LHR). |
| `segments` | Each flight of the itinerary: `flightNumber`, `airline`, `airlineCode`, `from`, `fromName`, `to`, `toName`, `departure`, `arrival`, `durationMinutes`, `aircraft`, `legroom`, `overnight`, `alsoSoldAs` (codeshare numbers), `emissionsKg`. |
| `emissionsKg`, `typicalEmissionsKg`, `emissionsVsTypicalPercent` | Google's CO₂ estimate for the itinerary, the typical value on the route, and the difference in %. |
| `bookingToken` | Google's identifier of this itinerary (used to ask for its return or next flights). |
| `withOutbound` | Return rows only: the outbound flight numbers the return options go with. |
| `searchCheapestPrice`, `searchPriceLevel`, `typicalPriceRange`, `priceNote` | Context of the whole search, repeated on every row so a CSV stays self-explanatory. |
| `googleFlightsUrl`, `scrapedAt` | Link to the same search on Google Flights, and time of the run. |

#### Search summary (`SEARCHES` record, `outputFormat: "searches"`, and dataset rows of searches without flights)

| Field | Meaning |
|---|---|
| `status` | `ok`, `no-results` (Google has no flight, or none matches your filters), `invalid` (Google rejected the search), `failed`, or `skipped-cost-limit`. Only `ok` is charged. |
| `flightsFound`, `flightsReturned`, `flightsMatchingFilters` | Flights Google has, flights returned, and (with filters) flights that match them. `flightsMatchingFilters` is present only when a filter is set. |
| `cheapestPrice`, `cheapestFlight`, `fastestDurationMinutes`, `nonstopAvailable` | Quick answers for the whole search. |
| `priceLevel`, `typicalPriceRange`, `usualPrice`, `priceHistory` | Google's price insights: `low`, `typical` or `high`, the usual range, and one price per day over the last 60 days. |
| `returnFlightsFor`, `multiCity` | Which outbound the return options follow; for multi-city, each leg with its options, the flight followed and `tripPrice`. |
| `notes`, `errors` | Plain-English explanation when something is missing. |

A round trip whose return request fails keeps `status: "ok"`: the outbound flights are delivered, `errors` lists the return failure, and the search is charged once (return flights are never an extra charge).

#### Cheapest-dates rows (`type: "calendarDay"`)

`origin`, `destination`, `tripType`, `tripLengthDays`, `cabinClass`, `passengers`, `currency`, `departureDate`, `returnDate`, `price` (cheapest price that day), `isCheapestInWindow`, `window`.

Windows without a price are one row of `type: "calendarWindow"` per 60-day window, with `status` (`no-results`, `invalid` or `failed`) and `notes` or `errors`; only windows with prices are charged.

### Pricing

Pay per event — price per 1,000 events:

| Event | What you get | Free plan | Bronze | Silver | Gold+ |
|---|---|---|---|---|---|
| `flight-search` | One route + date with at least one flight, **all flights included** (often 100–300 rows) — or one complete multi-city trip with the options of every flight | $10 | $8 | $7 | $6 |
| `price-calendar` | Cheapest price for up to 60 consecutive departure days on one route | $6 | $5 | $4.50 | $4 |

So a search that returns 200 flights costs $0.01 on the Free plan — **$0.05 per 1,000 flights**. A full year of cheapest dates for one route is 7 calendar windows: about $0.04.

Empty, invalid and failed searches are never charged. Set a maximum cost per run in Apify and the scraper stops cleanly when it is reached.

### Use it as an API

Run the Actor and get the flights in one HTTP call (token from **Apify Console → Settings → API & Integrations**):

```bash
curl -X POST "https://api.apify.com/v2/acts/datafabrik~google-flights-scraper/run-sync-get-dataset-items?token=<YOUR_API_TOKEN>" \
  -H "Content-Type: application/json" \
  -d '{"origins": ["JFK"], "destinations": ["LHR"], "departureDates": ["2027-06-10"], "maxStops": "nonstop"}'
```

Python, with the official `apify-client` package:

```python
from apify_client import ApifyClient

client = ApifyClient("<YOUR_API_TOKEN>")
run = client.actor("datafabrik/google-flights-scraper").call(run_input={
    "origins": ["BCN"],
    "destinations": ["LON"],
    "departureDates": ["2027-06-18"],
    "tripType": "round_trip",
    "returnDates": ["2027-06-27"],
    "currency": "EUR",
})
flights = list(client.dataset(run.default_dataset_id).iterate_items())
flights = [f for f in flights if f.get("type") == "flight"]
print(min(f["price"] for f in flights if f.get("price")))
```

**Fare alerts without code:** schedule the Actor daily in Apify Console and send the dataset to Google Sheets, Slack, a webhook, Make, Zapier or n8n. Filter on `searchPriceLevel = "low"` to be told when a route is cheap.

JavaScript / Node.js, with `apify-client`:

```js
import { ApifyClient } from 'apify-client';

const client = new ApifyClient({ token: '<YOUR_API_TOKEN>' });
const run = await client.actor('datafabrik/google-flights-scraper').call({
    origins: ['LAX'],
    destinations: ['TYO'],
    departureDates: ['2027-03-10'],
    cabinClass: 'business',
    maxStops: 'nonstop',
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
const flights = items.filter((i) => i.type === 'flight');
console.log(flights.length, 'flights, cheapest', Math.min(...flights.map((f) => f.price)));
```

### Use it from an AI agent (MCP)

`https://mcp.apify.com?tools=datafabrik/google-flights-scraper`

Ask your agent: "Cheapest one-way CDG to JFK in the first week of June, economy, max 1 stop." The agent fills `origins`, `destinations`, `departureDates`, `maxStops` and reads the dataset. One search ≈ 3 s. For price alerts, let the agent schedule the Actor daily and compare `priceLevel` in the search summary.

### Recipes

#### Compare airlines on a route (Python + pandas)

```python
import pandas as pd

rows = list(client.dataset(run.default_dataset_id).iterate_items())
df = pd.DataFrame([r for r in rows if r["type"] == "flight"])
df["airline"] = df["airlines"].str[0]
print(df.groupby("airline")["price"].agg(["count", "min", "median"]).sort_values("min"))
print("nonstop share:", (df["stops"] == 0).mean())
```

#### Find the cheapest day, then every flight that day

1. Run `cheapest-dates` mode on the route over the months you are flexible on.
2. Keep the rows where `isCheapestInWindow` is `true` (or sort by `price`).
3. Run `flights` mode with those dates in `departureDates` to get every flight, with times, airlines and emissions.

Two small runs: about $0.04 for a year of daily prices, then $0.01 per date.

#### Daily fare tracking in Google Sheets

1. Save your input as a **Task** in Apify Console (routes, dates, `maxPrice` if you have a budget).
2. Add a **Schedule** (for example every morning at 7:00).
3. In the task's **Integrations** tab, connect Google Sheets so each run's rows land in your spreadsheet.
4. In the sheet, chart `price` by `scrapedAt` per `flightNumbers`, or filter on `searchPriceLevel = "low"`.

More ready-to-run scripts (Python and Node, CSV export, price tracking): [github.com/data-fabrik/apify-examples](https://github.com/data-fabrik/apify-examples).

### Tips for large runs

- **City codes save searches**: `PAR` searches CDG, ORY and BVA at once (one search, one charge) instead of three.
- **Cap rows, not searches**: `maxFlightsPerSearch: 20` keeps the 20 first flights in Google's order, which keeps datasets small for dashboards. The price is the same.
- **Budget**: set **Maximum cost per run** in the run options. The Actor stops cleanly before going over and tells you in the status message.
- **Parallel searches**: the default of 5 is a good balance; up to 20 works for big batches, the Actor retries Google's temporary errors on its own.
- **Dates**: Google Flights covers about 11 months ahead. Searches outside that range are returned as `invalid` and free.

### Limitations

- **No booking**: the Actor reads search results; it cannot buy tickets or give airline booking links. `googleFlightsUrl` opens the search on Google Flights.
- **Prices move**: they are the prices Google shows at the time of the run, for the `country` (point of sale) and `currency` you choose.
- **Fare details**: fare names, baggage allowances and seat maps are not part of the result list and are not returned.
- **Multi-city**: Google builds those trips one flight at a time, so the options of a leg are those that follow the flight chosen on the previous leg (cheapest or best), as on the website.
- **Run timeout**: each search is given 120 s. With 2,000 searches and `maxConcurrency: 5`, allow up to 13 hours in the worst case: raise the run timeout in Console or split the input.

### FAQ

**Are these the prices Google Flights shows?** Yes — the same data the Google Flights website loads, in the currency and country you choose. Prices change often; the scraper returns them at the time of the run.

**Why do some flights have no price?** Google lists some itineraries as "price unavailable". They are skipped unless you enable `includeUnpricedFlights`.

**Can I book or get airline booking links?** No, the scraper reads search results only. Each row has a `googleFlightsUrl` that opens the same search on Google Flights.

**Multi-city trips?** Yes, 2 to 6 flights per trip with `multiCityTrips`: one search (charged once) gives the options of every flight and the price of the whole trip.

**Can I filter by price or time?** Yes: `maxPrice`, `departureTimeRange` and `arrivalTimeRange`. A search where no flight matches is returned free, with Google's total in `flightsFound` and `flightsMatchingFilters: 0`.

**How far ahead can I search?** Google Flights covers about 11 months. Dates beyond that come back as `invalid` (not charged).

**Is this an official Google Flights API?** Google offers no public flights API (the old QPX Express API closed in 2018). This Actor returns the data the Google Flights website shows, as JSON.

**Does it find cheap flights for flexible dates?** Yes: `cheapest-dates` mode returns the cheapest price for every departure day over up to a year, so you spot the cheapest week before searching the flights of that day.

**Can I track airfare over time?** Schedule the Actor (daily or hourly) on your routes: every run stores `priceLevel`, `typicalPriceRange` and `priceHistory` (one price per day over the last 60 days), so you see when a fare is low and how it moves.

**Can I search a whole month?** Use `cheapest-dates` mode to find the cheapest days, then run `flights` mode on those days for the full list of flights.

**Several routes at once?** Yes: every origin is combined with every destination and every date, in one run.

**Why is a price different from what I see on Google Flights?** Google adapts prices to the point of sale and currency. Set `country` and `currency` to the ones of the site you compare with (`fr` and `EUR` for google.fr, for example). Prices can also change between two searches.

**Does it work for any airport in the world?** Yes, any airport Google Flights knows, with its IATA code. City codes (`LON`, `NYC`, `TYO`…) expand to all their airports. An unknown code returns an `invalid` row, free.

**Can I get prices for several passengers?** Yes, up to 9 (adults, children, infants in seat or on lap). Prices are the total for everyone, like on the website.

**How do I get only nonstop flights?** `maxStops: "nonstop"`. Combine with `airlines` to keep one airline or an alliance.

**Can I use it from an AI assistant?** Yes. Add the Apify MCP server to Claude, ChatGPT, Cursor or another MCP client and ask for flights in plain language; the assistant fills the input and reads the result.

**Is it legal?** The scraper only collects public flight and price information shown to any visitor, no personal data. You are responsible for using the data in line with applicable laws and Google's terms.

### More from Data Fabrik

| Actor | What you get |
|---|---|
| [Google Trends Scraper & API](https://apify.com/datafabrik/google-trends-scraper) | Interest over time, by country or region, and related queries for your own keywords |
| [Google Trends Trending Now Scraper](https://apify.com/datafabrik/google-trends-trending-now) | What a country is searching right now, with search volume and related queries |
| [Google Hotels Scraper & API](https://apify.com/datafabrik/google-hotels-scraper) | Hotel prices, ratings and every booking site's offer for any city or hotel |
| [YouTube Transcript Scraper](https://apify.com/datafabrik/youtube-transcripts) | Full text and timed captions of videos, Shorts, playlists and whole channels |
| [YouTube Search Scraper](https://apify.com/datafabrik/youtube-search) | YouTube search results by keyword, with views, channel, duration and filters |
| [YouTube Channel Videos & Shorts Scraper](https://apify.com/datafabrik/youtube-channel-videos) | Every video, Short and live stream of a channel, newest or most popular first |

### Support

Found a problem or need a field? Open an issue on the Actor page — issues are answered quickly.

If this Actor saves you time, a short review on its Store page helps other users find it. If something is not right, open an issue first so it can be fixed.

# Actor input Schema

## `mode` (type: `string`):

<b>Flights</b>: every flight for each route and date. <b>Cheapest dates</b>: the lowest price for each departure day over a date range (Google's price calendar).

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

IATA airport codes (CDG, JFK…), city codes (PAR, LON, NYC… = all airports of the city), several airports joined with + (CDG+ORY), or a Google place id (/m/05qtj). Every origin is combined with every destination.

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

Same format as origins.

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

Dates as YYYY-MM-DD. One search per route and date. Used in <b>Flights</b> mode. Leave empty for a trip 30 days from today (handy for schedules).

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

One way, or round trip (then give return dates or a trip length). Multi-city: describe the trips in "Multi-city trips" below and leave origins, destinations and dates empty. Empty = one-way (multi-city when trips are given).

## `multiCityTrips` (type: `array`):

One trip per line, its flights separated by ";": ORIGIN DESTINATION YYYY-MM-DD, e.g. "CDG JFK 2027-06-15; JFK LAX 2027-06-20; LAX CDG 2027-06-27" (2 to 6 flights, airport or city codes). Each trip is one search, charged once, with the options of every leg. Leave Origins, Destinations and Departure dates empty.

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

One return date per departure date, in the same order. Or leave empty and set a trip length.

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

Return date = departure date + this many days. Required for round trips in <b>Cheapest dates</b> mode.

## `returnFlightsFor` (type: `string`):

Round trip: also fetch the return options for the cheapest or best outbound (none by default, no extra charge). Multi-city: the flight of each leg that leads to the options of the next leg (cheapest by default, or best).

## `dateRangeStart` (type: `string`):

First departure day to check (YYYY-MM-DD). Default: today. Used in <b>Cheapest dates</b> mode.

## `dateRangeEnd` (type: `string`):

Last departure day to check (YYYY-MM-DD), up to 366 days after the start. Default: 60 days.

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

Cabin class to search.

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

Number of adults (12+).

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

Number of children aged 2–11.

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

Infants under 2 with their own seat.

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

Infants under 2 on an adult's lap.

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

Maximum number of stops.

## `airlines` (type: `array`):

Only these airlines: 2-character IATA codes (AF, DL…) or STAR_ALLIANCE, SKYTEAM, ONEWORLD. Empty = all.

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

Only flights at or under this price, in the chosen currency, for all passengers (round trip and multi-city: price of the whole trip). Flights without a price are left out. In <b>Cheapest dates</b> mode: only days at or under this price. Empty = no limit.

## `departureTimeRange` (type: `string`):

Only flights leaving in this time range, local time of the airport: "06:00-12:00", or "22:00-06:00" overnight. Applies to every flight listed (outbound, return, each multi-city leg). <b>Flights</b> mode only. Empty = any time.

## `arrivalTimeRange` (type: `string`):

Only flights arriving in this time range, local time of the airport, e.g. "08:00-20:00". Same rules as the departure time.

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

0 = all flights Google has (often 100–300). Google's top flights come first.

## `includeUnpricedFlights` (type: `boolean`):

Google lists some flights as "price unavailable". Off by default.

## `outputFormat` (type: `string`):

<b>One row per flight</b> (plus one summary row per search) is best for spreadsheets. <b>One item per search</b> nests the flights.

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

3-letter code: USD, EUR, GBP…

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

Language of airport and airline names (en, fr, de…).

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

Point of sale (us, fr, gb…). Prices can differ by country.

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

How many searches run at the same time.

## `maxRetries` (type: `integer`):

How many times a failed request is retried (Google often needs one retry).

## `proxy` (type: `object`):

Apify datacenter proxy works well for Google Flights and is the cheapest.

## Actor input object example

```json
{
  "mode": "flights",
  "origins": [
    "CDG"
  ],
  "destinations": [
    "JFK"
  ],
  "cabinClass": "economy",
  "adults": 1,
  "children": 0,
  "infantsInSeat": 0,
  "infantsOnLap": 0,
  "maxStops": "any",
  "maxFlightsPerSearch": 0,
  "includeUnpricedFlights": false,
  "outputFormat": "flights",
  "currency": "USD",
  "language": "en",
  "country": "us",
  "maxConcurrency": 5,
  "maxRetries": 6,
  "proxy": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

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

No description

## `searches` (type: `string`):

No description

## `calendar` (type: `string`):

No description

## `summary` (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 = {
    "origins": [
        "CDG"
    ],
    "destinations": [
        "JFK"
    ],
    "proxy": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("datafabrik/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 = {
    "origins": ["CDG"],
    "destinations": ["JFK"],
    "proxy": { "useApifyProxy": True },
}

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

```

## MCP server setup

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