# Google Flights Scraper (`lergassy/google-flights-scraper`) Actor

Extract flights from Google Flights by route and dates: airline, flight numbers, price in any currency, price level and cheapest-dates calendar, stops and layovers, times, aircraft, CO₂, booking options with seller prices and links. Passengers, cabin, filters, batch routes. Run via API or schedule.

- **URL**: https://apify.com/lergassy/google-flights-scraper.md
- **Developed by:** [Matvey](https://apify.com/lergassy) (community)
- **Categories:** Travel
- **Stats:** 3 total users, 1 monthly users, 100.0% runs succeeded, 1 bookmarks
- **User rating**: 5.00 out of 5 stars

## Pricing

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-usage

## 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 Scraper** extracts flight offers from **Google Flights** by route and dates — the same itineraries, prices and price insights you see on the site, delivered as clean JSON: airline, **flight numbers**, price in any currency, stops and **layovers**, departure and arrival times, aircraft, legroom, **CO₂ emissions**, Google's **"prices are low / typical / high"** signal with a 60-day price history, and a booking token. One-way and round trip, up to 9 passengers with children and infants, any cabin class, and **many routes in one run**. No official Google Flights API is needed and no browser is used: the Actor talks to the JSON endpoint behind the page, so a search takes seconds and costs cents. Export the data, run it via API, schedule it, or plug it into n8n, Make, Zapier, Google Sheets or an AI agent through MCP.

### What is Google Flights Scraper?

Google Flights Scraper is a **Google Flights API** alternative for developers, travel businesses and price trackers. Give it an origin, a destination and a date (plus an optional return date), pick passengers and cabin class, and it returns up to ~150 itineraries per search with everything Google shows — including the "best flights" ranking, the price-level badge and the price history chart behind the *Price insights* panel.

- **Full result list**, not the first page: Google's own results endpoint returns 100–150 itineraries per route; the Actor returns them all (cap with `maxResults`).
- **Real flight data**: flight numbers, operating carrier, aircraft type, legroom, per-leg times and durations, layover airports and durations, CO₂ in kg and the deviation from the route's typical emissions.
- **Price insights**: `priceLevel` (low / typical / high), the typical price range for the route and 60 days of price history — the data behind fare-drop alerts.
- **Passengers and cabin**: adults, children, infants in seat or on lap; economy, premium economy, business, first.
- **Filters** Google applies server-side (max stops) and client-side (airlines to keep or drop, max price, max duration), plus sorting by price, duration or departure.
- **Multi-city trips**: any number of legs; the Actor follows Google's leg-by-leg pricing and returns complete itineraries with the total where Google can sell all legs as one ticket.
- **Explore "anywhere"**: the cheapest destinations from an origin — city, country, price, airline, stops, duration and suggested dates — Google's Explore map as data.
- **Round trips as complete combinations** (optional): for the top outbound itineraries, the list of return flights Google offers — each with the total price for both directions — so you get outbound + return pairs, not just one half.
- **Price calendar**: the lowest fare for every departure date over up to a year (Google's date grid as data), with the five cheapest dates flagged — for round trips a grid of departure × return dates. Use `calendarOnly` to sweep dates or routes for cents.
- **Booking options** (optional): for the top flights, who sells the ticket — the airline and travel agencies such as Trip.com, Expedia or Kiwi — at what price, with fees and a deep link to book.
- **Batch**: a list of routes in one run — a whole route map or a week of departure dates.
- **Pure HTTP**: no headless browser, no residential proxies required, runs in seconds.

### What data can Google Flights Scraper extract?

| Field | Example |
|---|---|
| `price` / `currency` / `priceLabel` | 92 / USD / "92 USD" (round trips: total for both directions) |
| `priceLevel` / `typicalPriceLow` / `typicalPriceHigh` | typical / 50 / 110 — Google's price insight for the route and date |
| `isBestFlight` / `rank` | true / 1 — Google's "Best flights" ranking |
| `airline` / `airlineCodes` / `flightNumbers` | Jetstar / \["JQ"] / \["JQ86"] |
| `stops` / `layovers` | 1 / \[{ "airport": "KUL", "city": "Kuala Lumpur", "durationMinutes": 235 }] |
| `departAt` / `arriveAt` / `duration` / `totalDurationMinutes` | 2026-10-15T15:05 / 2026-10-15T18:00 / "2 hr 55 min" / 175 |
| `legs[]` | flight number, airline, operated-by, airports, times, duration, aircraft (Airbus A321neo), legroom (29 in), CO₂ per leg |
| `emissionsKg` / `emissionsVsTypicalPercent` | 114 / -2 |
| `bookingToken` | Google's token for the selected itinerary |
| `returnOptions[]` / `cheapestReturn` / `totalPrice` (round trips with `resolveReturnFlights`) | \[{ "flightNumbers": \["JQ89"], "departAt": "2026-10-19T10:00", "stops": 0, "totalPrice": 178, "bookingToken": "…" }, …] / the cheapest of them / 178 |
| `bookingOptions[]` (with `resolveBookingOptions`) | \[{ "seller": "Jetstar", "isAirline": true, "price": 92, "fees": \[{ "currency": "IDR", "amount": 55000 }], "bookingUrl": "https://www.google.com/travel/clk/f?u=…" }, { "seller": "Trip.com", "price": 97, … }] |
| `bestBookingSeller` / `bestBookingPrice` / `airlineDirectPrice` / `bookingUrl` | Trip.com / 97 / 92 / deep link of the cheapest option |
| `googleFlightsUrl` | Link that opens the same search on Google Flights |
| `passengers` / `cabinClass` / `tripType` | { adults: 2, children: 1 } / business / round\_trip |

Every search also produces one **`search` summary item**: flights found, lowest price, price level, typical price range and the `priceHistory` array (date + price for the last 60 days) — ideal for trackers and dashboards.

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

The Actor is billed **pay per result**: you pay only for the flight records returned, with no subscription. The free monthly usage included with every Apify account covers regular price checks on a handful of routes. Because the Actor uses plain HTTP without a browser, platform compute is negligible — a search of 100 itineraries runs in a few seconds. See the **Pricing** tab for the current price per 1,000 flights.

### How to scrape Google Flights with Google Flights Scraper

1. Enter **origin** and **destination** as IATA codes (`DPS`, `SIN`, `LHR`) and a **departure date**; add a **return date** for a round trip.
2. Set **passengers**, **cabin class** and, if needed, **max stops**, airlines, max price or duration.
3. Click **Start**. Results appear in the **Flights** table; the **Search summary** table shows the price level and history per route.
4. To track fares, add a **Schedule** and a webhook — or use the n8n / Make recipe below.

### ⬇️ Input

[![Google Flights Scraper input form on Apify: route, dates, passengers, cabin class, filters](https://raw.githubusercontent.com/lergassy/apify-actor-assets/main/google-flights/google-flights-scraper-input-form.png)](https://console.apify.com/sign-up)

#### One-way search

```json
{
    "origin": "DPS",
    "destination": "SIN",
    "departureDate": "2026-10-15",
    "currency": "USD"
}
```

#### Round trip, business class, two adults, at most one stop, cheapest first

```json
{
    "origin": "DPS",
    "destination": "LHR",
    "departureDate": "2026-10-15",
    "returnDate": "2026-10-25",
    "adults": 2,
    "cabinClass": "business",
    "maxStops": "1",
    "sortBy": "price",
    "maxResults": 20
}
```

#### Family with a child and an infant on lap, nonstop only, in IDR

```json
{
    "origin": "CGK",
    "destination": "DPS",
    "departureDate": "2026-12-20",
    "returnDate": "2026-12-27",
    "adults": 2,
    "children": 1,
    "infantsOnLap": 1,
    "maxStops": "0",
    "currency": "IDR"
}
```

#### Only certain airlines, under a price cap

```json
{
    "origin": "SIN",
    "destination": "NRT",
    "departureDate": "2026-11-03",
    "airlines": ["SQ", "JL", "NH"],
    "maxPrice": 900,
    "maxDurationMinutes": 600
}
```

#### Round trip as complete combinations with booking links

```json
{
    "origin": "DPS",
    "destination": "SIN",
    "departureDate": "2026-10-15",
    "returnDate": "2026-10-19",
    "sortBy": "price",
    "maxResults": 10,
    "resolveReturnFlights": true,
    "maxReturnOptions": 10,
    "resolveBookingOptions": true,
    "maxBookingResolutions": 5
}
```

Each outbound item gets `returnOptions` (return flights with the round-trip total), `cheapestReturn`, `totalPrice`, and booking options for the outbound + cheapest return pair.

#### Morning departures with booking links for the 5 cheapest

```json
{
    "origin": "DPS",
    "destination": "SIN",
    "departureDate": "2026-10-15",
    "departureTimeFrom": "06:00",
    "departureTimeTo": "12:00",
    "sortBy": "price",
    "maxResults": 5,
    "resolveBookingOptions": true,
    "maxBookingResolutions": 5
}
```

#### Multi-city: Singapore → Bangkok → Phuket → Singapore

```json
{
    "multiCityLegs": [
        { "origin": "SIN", "destination": "BKK", "date": "2026-10-15" },
        { "origin": "BKK", "destination": "HKT", "date": "2026-10-19" },
        { "origin": "HKT", "destination": "SIN", "date": "2026-10-23" }
    ],
    "maxMultiCityResolutions": 5
}
```

Returns complete itineraries (`segments[]` with the flights of every leg) and the total `price` — e.g. *TG404 + PG271 + SQ725, 527 USD*. When Google cannot sell the legs as one ticket it shows no total; the item then has `priceUnavailable: true`, exactly like the site.

#### Explore: where can I fly cheaply from Bali?

```json
{
    "origin": "DPS",
    "exploreAnywhere": true,
    "maxDestinations": 30
}
```

Returns `destination` items sorted by price — e.g. *Komodo (LBJ) 113 USD, Yogyakarta 127 USD, Perth 191 USD* — with airline, stops, duration, travel dates and a link. Without dates Google suggests flexible one-week trips over the coming months; add `departureDate` and `returnDate` to price every destination for exactly those dates.

#### Cheapest dates in the next two months (calendar only)

```json
{
    "origin": "DPS",
    "destination": "SIN",
    "departureDate": "2026-10-01",
    "calendarDays": 60,
    "calendarOnly": true
}
```

Returns 60 `calendar_day` items (date, lowest price, link) and a `search` item whose `calendar.cheapestDates` lists the five cheapest days — e.g. *49 USD on 2026-11-12*. Add a `returnDate` to get a grid of departure × return dates with the trip length kept flexible around yours.

#### Many routes in one run (route map or date range)

```json
{
    "routes": [
        { "origin": "DPS", "destination": "SIN", "departureDate": "2026-10-15" },
        { "origin": "DPS", "destination": "SIN", "departureDate": "2026-10-16" },
        { "origin": "DPS", "destination": "SIN", "departureDate": "2026-10-17" },
        { "origin": "DPS", "destination": "BKK", "departureDate": "2026-10-15", "returnDate": "2026-10-22" }
    ],
    "maxResults": 10,
    "sortBy": "price"
}
```

| Field | Required | Description |
|---|---|---|
| `origin` / `destination` | yes (or `routes`) | IATA airport codes |
| `departureDate` / `returnDate` | yes / no | `YYYY-MM-DD`; leave `returnDate` empty for one-way |
| `routes` | no | Array of `{origin, destination, departureDate, returnDate}` searched in one run |
| `multiCityLegs` / `maxMultiCityResolutions` | no | Legs `{origin, destination, date}` of a multi-city trip; how many first-leg options to follow through (default 5) |
| `exploreAnywhere` / `maxDestinations` | no | Cheapest destinations from `origin` instead of a fixed route (default off / 60) |
| `adults`, `children`, `infantsInSeat`, `infantsOnLap` | no | Passengers (default 1 adult) |
| `cabinClass` | no | `economy` (default), `premium_economy`, `business`, `first` |
| `maxStops` | no | `any` (default), `0` nonstop, `1`, `2` |
| `airlines` / `excludeAirlines` | no | IATA airline codes to keep / drop |
| `maxPrice` / `maxDurationMinutes` / `maxLayoverMinutes` | no | Caps on price, total duration and the longest layover |
| `departureTimeFrom` / `departureTimeTo` / `arrivalTimeFrom` / `arrivalTimeTo` | no | Local time windows, `HH:MM` (e.g. depart between `06:00` and `12:00`) |
| `resolveReturnFlights` / `maxReturnResolutions` / `maxReturnOptions` | no | Round trips: fetch the return flights (with total prices) for the top N outbound itineraries (default off / 10 / 20) |
| `resolveBookingOptions` / `maxBookingResolutions` | no | Fetch sellers, prices and booking links for the top N flights (default off / 10); round trips need `resolveReturnFlights` |
| `calendarDays` / `calendarOnly` | no | Lowest fare per departure date for N days (up to 365); `calendarOnly` skips the flight list |
| `currency` / `language` | no | Price currency (`USD`, `IDR`, `EUR`…) and language of names |
| `sortBy` | no | `best` (Google ranking, default), `price`, `duration`, `departure` |
| `maxResults` | no | Per route, default 100 |
| `includePriceInsights` | no | Price level, typical range and history (default on) |

#### Track airfare over time

Schedule the same input daily with **monitor-style** naming (one Task per route). Each run adds a `search` item with `lowestPrice` and `priceLevel`; compare with the previous run in your sheet or workflow and alert when `priceLevel` turns `low` or the lowest price drops below your threshold.

### ⬆️ Output

[![Google Flights dataset preview: airline, flight numbers, price, price level, stops, times, duration, CO₂](https://raw.githubusercontent.com/lergassy/apify-actor-assets/main/google-flights/google-flights-scraper-output-table.png)](https://console.apify.com/sign-up)

#### Flight

```json
{
    "type": "flight",
    "rank": 1,
    "origin": "DPS",
    "destination": "SIN",
    "departureDate": "2026-10-15",
    "returnDate": null,
    "tripType": "one_way",
    "cabinClass": "economy",
    "passengers": { "adults": 1, "children": 0, "infantsOnLap": 0, "infantsInSeat": 0 },
    "currency": "USD",
    "price": 92,
    "priceLabel": "92 USD",
    "priceLevel": "typical",
    "typicalPriceLow": 50,
    "typicalPriceHigh": 110,
    "isBestFlight": true,
    "airline": "Jetstar",
    "airlineCodes": ["JQ"],
    "flightNumbers": ["JQ86"],
    "stops": 0,
    "layovers": [],
    "departAirport": "DPS",
    "departAt": "2026-10-15T15:05",
    "arriveAirport": "SIN",
    "arriveAt": "2026-10-15T18:00",
    "totalDurationMinutes": 175,
    "duration": "2 hr 55 min",
    "legs": [
        {
            "flightNumber": "JQ86",
            "airline": "Jetstar",
            "airlineCode": "JQ",
            "operatedBy": "Qantas QF5659",
            "from": "DPS",
            "fromName": "I Gusti Ngurah Rai International Airport",
            "to": "SIN",
            "toName": "Singapore Changi Airport",
            "departAt": "2026-10-15T15:05",
            "arriveAt": "2026-10-15T18:00",
            "durationMinutes": 175,
            "aircraft": "Airbus A321neo",
            "legroom": "29 in",
            "emissionsKg": 114
        }
    ],
    "emissionsKg": 114,
    "emissionsVsTypicalPercent": -2,
    "bookingToken": "CjRIN25qXy11ZmpVV29BQzRGelFCRy0t…",
    "googleFlightsUrl": "https://www.google.com/travel/flights?q=Flights%20from%20DPS%20to%20SIN%20on%202026-10-15%20one%20way&curr=USD&hl=en"
}
```

#### Price calendar day

```json
{
    "type": "calendar_day",
    "origin": "DPS",
    "destination": "SIN",
    "date": "2026-11-12",
    "returnDate": null,
    "tripLengthDays": null,
    "price": 49,
    "currency": "USD",
    "isCheapest": true,
    "cabinClass": "economy",
    "googleFlightsUrl": "https://www.google.com/travel/flights?q=Flights%20from%20DPS%20to%20SIN%20on%202026-11-12%20one%20way&curr=USD&hl=en"
}
```

#### Search summary

```json
{
    "type": "search",
    "origin": "DPS",
    "destination": "SIN",
    "departureDate": "2026-10-15",
    "tripType": "one_way",
    "cabinClass": "economy",
    "currency": "USD",
    "flightsFound": 135,
    "flightsReturned": 100,
    "lowestPrice": 92,
    "priceLevel": "typical",
    "typicalPrice": 66,
    "typicalPriceLow": 50,
    "typicalPriceHigh": 110,
    "priceHistory": [{ "date": "2026-07-04", "price": 54 }, { "date": "2026-07-05", "price": 54 }],
    "googleFlightsUrl": "https://www.google.com/travel/flights?q=Flights%20from%20DPS%20to%20SIN%20on%202026-10-15%20one%20way&curr=USD&hl=en"
}
```

Times are local to each airport (no time zone suffix), exactly as Google displays them. Round-trip prices are the total for both directions for the outbound itinerary shown. If a search fails after retries, an `error` item with the route and the reason is written instead of silently returning nothing.

### Use cases for Google Flights data

#### Airfare price tracking and fare-drop alerts

Schedule the routes you care about; when `priceLevel` becomes `low` or `lowestPrice` drops, push a Slack or Telegram message with the `googleFlightsUrl`.

#### Travel agencies and OTAs

Quote clients with real flight numbers, layovers and cabin classes; compare airlines across dates with one batch run.

#### Route and pricing research

Build fare matrices per route, airline, day of week and booking lead time; use `priceHistory` and `typicalPriceLow/High` for benchmarks.

#### Sustainability reporting

`emissionsKg` per itinerary and per leg, with the deviation from the route's typical emissions.

#### Travel content, affiliates and AI agents

Feed "cheapest flights from X" pages, or let an agent answer "what is the cheapest nonstop DPS–SIN next month?" through MCP.

### Integrations and Google Flights API

Run it as a **Google Flights API** through the [Apify API](https://docs.apify.com/api/v2) with the JavaScript or Python client, or without code from n8n, Make, Zapier, Google Sheets, Slack and webhooks. It also works with the Apify MCP server, so Claude, Cursor or any MCP-capable agent can search flights as a tool.

```python
from apify_client import ApifyClient

client = ApifyClient("<YOUR_API_TOKEN>")
run = client.actor("lergassy/google-flights-scraper").call(run_input={
    "origin": "DPS", "destination": "SIN", "departureDate": "2026-10-15",
    "adults": 2, "cabinClass": "economy", "maxStops": "0", "sortBy": "price", "maxResults": 20,
})
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    if item["type"] == "flight":
        print(item["price"], item["currency"], item["airline"], item["flightNumbers"], item["departAt"])
```

#### Use it from Claude, Cursor or any MCP agent

Add the Apify MCP server to your agent and allow the `lergassy/google-flights-scraper` tool. Claude Desktop / Cursor (`mcp.json`):

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": ["-y", "@apify/actors-mcp-server", "--actors", "lergassy/google-flights-scraper"],
            "env": { "APIFY_TOKEN": "<YOUR_API_TOKEN>" }
        }
    }
}
```

Example prompts once connected: *"Find the cheapest nonstop flights from Bali to Singapore on 15 October in USD"*, *"Compare business-class fares DPS–LHR for 15 and 16 October for two adults, one stop max"*, *"Are prices for CGK–KUL on 1 November low or high right now, and who sells the cheapest ticket?"*. The input schema is self-describing, so agents fill the fields without reading this page.

#### Fare-drop alert in n8n or Make

Schedule trigger (daily) → Apify "Run Actor" with your route → filter `type = search` → IF `priceLevel = low` or `lowestPrice < threshold` → Slack / Telegram / email with `googleFlightsUrl`. The `run-sync-get-dataset-items` endpoint returns the items directly, so one HTTP Request node is enough.

### 🤖 For AI Agents & LLM Apps

Compact reference for agents calling this Actor through the [Apify MCP server](https://mcp.apify.com) or the Apify API (`lergassy/google-flights-scraper`).

**Purpose:** returns live Google Flights itineraries for a route and dates —
airline, flight numbers, price, stops and layovers, times, aircraft, CO₂ and
booking options with seller prices — plus Google's own verdict on whether the fare
is low or high for that route. Use it to answer "what is the cheapest way from Bali
to Singapore next month", "is this fare a good deal" and "which dates are cheapest".

**Minimal input:**

```json
{ "origin": "DPS", "destination": "SIN", "departureDate": "2026-10-12", "adults": 1, "currency": "USD" }
```

**Output:** one row per itinerary — `type`, `rank`, `origin`, `destination`,
`departureDate`, `returnDate`, `tripType`, `cabinClass`, `passengers`, `airline`,
`flightNumbers`, `price`, `currency`, `priceLevel`, `typicalPrice`,
`typicalPriceLow`, `typicalPriceHigh`, `stops`, `layovers`, `departAt`, `arriveAt`,
`durationMinutes`, `aircraft`, `co2Grams`, `googleFlightsUrl`, `resultsSource`.
Each query also writes a `search` row with `flightsFound`, `flightsReturned`,
`lowestPrice` and the price band. Booking options, cheapest-date calendars and
explore destinations arrive as their own row types when enabled.

**Behaviors an agent should know:**

- Airports are IATA codes (`DPS`, `SIN`). City codes work where Google accepts them.
  Dates are ISO 8601, and a `returnDate` is what makes the search a round trip.
- **`priceLevel` is the field that answers "is this cheap".** Google compares the
  fare to what the route usually costs, and `typicalPriceLow`/`typicalPriceHigh`
  give the band. Quote these instead of guessing from the price alone.
- `currency` defaults to USD and is converted by Google, not by the Actor.
- `maxResults` (default 100) caps itineraries per query. `routes` runs several
  origin-destination pairs in one run, which is far cheaper than one run each.
- `resolveBookingOptions` and `resolveReturnFlights` each add fetches per itinerary;
  leave them off unless the user needs seller prices or matched return legs.
- `calendarDays` turns on the cheapest-dates scan around the requested date;
  `exploreAnywhere` switches to "where can I go for this budget" mode.
- `resultsSource` says whether the rows came from Google's internal API or from the
  rendered page. The API path returns far more itineraries; the page fallback runs
  automatically when the API refuses, so a smaller result set is expected there.
- Fares move constantly. A row is a quote at the moment of the run, not a bookable
  price, and Google itself excludes some carriers.

### ❓ FAQ

#### Is it legal to scrape Google Flights?

The Actor reads publicly displayed prices and schedules without logging in, bypassing access controls or collecting personal data. Google's terms restrict automated access, and the legality of scraping public data depends on your jurisdiction and use; review the terms and consult a lawyer for commercial use.

#### Does Google Flights have a public API?

No. The old QPX Express API was shut down in 2018. This Actor is the practical Google Flights API replacement: the data comes from the same endpoint the Google Flights page uses.

#### Can I use Google Flights Scraper with the Apify API?

Yes — see the **API** tab for ready-made snippets in JavaScript, Python and curl. Use `run-sync-get-dataset-items` to get flights back in one call.

#### Can I use it through an MCP server?

Yes. Connect the Apify MCP server to Claude, Cursor or another agent and call the Actor as a tool; the input schema is self-explanatory, so agents fill it correctly.

#### Can I integrate it with other apps?

n8n, Make, Zapier, Google Sheets, Slack, HubSpot and generic webhooks through Apify integrations, or the API from any language.

#### Which airports work?

Any IATA airport code Google Flights accepts (`DPS`, `CGK`, `SIN`, `KUL`, `BKK`, `NRT`, `LHR`, `JFK`…). City codes with several airports also work where Google supports them (e.g. `LON`, `TYO`).

#### How is this different from other Google Flights actors?

Most Google Flights scrapers parse the results page and return the first 15–50 itineraries with airline, price, stops and times. This Actor reads Google's results endpoint, so a search returns the full list (100–150 itineraries) with flight numbers, operating carrier, aircraft, legroom, layover airports, CO₂, Google's price-level badge and 60-day price history, plus an optional booking-options layer with sellers, fees and deep links. It separates infants on lap from infants in seat, ships a `search` summary item per route for trackers, and falls back to the results page automatically when Google refuses the endpoint — every item carries `resultsSource` so you know what you got.

#### Can I find the cheapest dates to fly?

Yes — set `calendarDays` (e.g. `60` or `365`). The Actor returns the lowest fare for every departure date in that window as `calendar_day` items, flags the five cheapest, and puts `calendar.cheapestDates` on the search summary. For round trips it returns Google's departure × return grid, so you also see whether leaving a day earlier or staying a night longer is cheaper. Combine with `calendarOnly` and `routes` to sweep a whole route map for the cost of a few requests.

#### Can I get booking links and seller prices?

Yes — turn on `resolveBookingOptions`. For the top `maxBookingResolutions` flights of each one-way search the Actor fetches Google's booking options: the airline and travel agencies, their prices in your currency and in the seller's local currency, any fees Google lists (e.g. credit-card surcharges), and a deep link. `bestBookingPrice` and `airlineDirectPrice` let you spot when an agency undercuts the airline. For round trips turn on `resolveReturnFlights` as well: booking options are then fetched for each outbound itinerary paired with its cheapest return (`bookingOptionsFor` says which pair).

#### Are round-trip prices per direction or total?

Total for both directions. By default each item is an outbound itinerary with the round-trip total Google shows for it. Turn on `resolveReturnFlights` to get, for the top outbound itineraries, Google's list of return flights with the total for each combination (`returnOptions`), the cheapest one (`cheapestReturn`, `totalPrice`) and — with `resolveBookingOptions` — the sellers and booking links for that outbound + return pair.

#### What do priceLevel and the typical range mean?

Google compares the current lowest fare with what this route usually costs for similar dates: `low` is below the typical range, `typical` inside it, `high` above. `priceHistory` gives the lowest fare seen on each of the last 60 days.

#### Why did a run return fewer flights than expected?

Google returns what it shows on the page: rare routes, far-out dates or strict filters (nonstop, a single airline) have few or no itineraries. Try `maxStops: "any"` or a different date.

#### How do multi-city trips work?

Google prices a multi-city trip leg by leg: you pick a flight for leg 1, then it shows leg 2 with running totals, and so on. The Actor automates that chain for the top `maxMultiCityResolutions` first-leg options, choosing the cheapest priced option on each later leg, and returns complete itineraries with `segments[]` and the total `price`. Mixed carriers that cannot be ticketed together have no total on Google either — those items carry `priceUnavailable: true`.

#### Can I search "anywhere" from my airport?

Yes — set `origin` and `exploreAnywhere: true`. You get Google's Explore results: destinations sorted by price with city, country, coordinates, airline, stops, duration and dates. Leave the dates empty for Google's flexible suggestions (one-week trips in the coming months), or set `departureDate` and `returnDate` to see what every destination costs on your dates.

#### Do I need proxies?

Yes for the full list. Google serves its results API (100–150 itineraries per search) only to residential IPs, so the default proxy setting is Apify **Residential** — a search transfers about 250 KB, a fraction of a cent. With datacenter proxies or no proxy the Actor falls back automatically to the server-rendered results page, which contains the first ~15 itineraries ("best flights" plus the top of the list). The `resultsSource` field on every item tells you which path was used (`api` or `page`), and the Actor retries with a fresh IP when Google returns a block or consent page instead of results.

#### Can I scrape multiple routes in one run?

Yes — put them in `routes`. Passengers, cabin class, filters and sorting apply to every route; each route gets its own `search` summary item.

### Your feedback

Need another field (booking links, baggage, fare classes) or a feature (price calendar, "anywhere" search)? Open an issue in the **Issues** tab. If the scraper saved you money on a fare, a review helps other travelers find it.

### You might also like

| Actor | What it does |
|---|---|
| [Airbnb Scraper](https://apify.com/lergassy/airbnb-scraper) | Airbnb listings for any place and dates: nightly price, rating, beds, amenities, host |
| [Agoda Reviews Scraper](https://apify.com/lergassy/agoda-reviews-scraper) | Hotel reviews from Agoda, including the Booking.com reviews shown on Agoda |
| [Tokopedia Reviews Scraper](https://apify.com/lergassy/tokopedia-reviews-scraper) | Product reviews from any shop on Indonesia's largest marketplace |
| [New Business Leads Monitor](https://apify.com/lergassy/us-business-filings) | Daily feed of newly registered US businesses and funded startups, with phone, email and lead score |
| [Email & Phone Verifier](https://apify.com/lergassy/email-phone-verifier) | Checks e-mails and phone numbers in bulk: deliverability, throwaway and role flags, numbering plan, US state and time zone |

# Actor input Schema

## `origin` (type: `string`):

Departure airport code, e.g. <code>DPS</code> (Bali), <code>CGK</code> (Jakarta), <code>SIN</code> (Singapore), <code>LHR</code> (London)

## `destination` (type: `string`):

Arrival airport code, e.g. <code>SIN</code>

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

Format <code>YYYY-MM-DD</code> Leave the whole route empty and the Actor runs a demo search so a first run always returns rows.

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

Leave empty for one-way. Format <code>YYYY-MM-DD</code>. Round-trip prices are the total for both directions.

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

Search many routes in one run. Each item: <code>{"origin": "DPS", "destination": "BKK", "departureDate": "2026-10-15", "returnDate": "2026-10-22"}</code> (returnDate optional). Passengers, cabin and filters below apply to every route.

## `multiCityLegs` (type: `array`):

A multi-city trip as a list of legs: <code>{"origin": "SIN", "destination": "BKK", "date": "2026-10-15"}</code>, <code>{"origin": "BKK", "destination": "HKT", "date": "2026-10-19"}</code>, <code>{"origin": "HKT", "destination": "SIN", "date": "2026-10-23"}</code>. Google prices the trip leg by leg; the Actor resolves complete itineraries for the top first-leg options. The total is shown when Google can sell all legs as one ticket.

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

Passengers aged 12+

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

Passengers aged 2 to 11

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

Under 2, with their own seat

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

Under 2, on an adult's lap

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

Economy, premium economy, business or first

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

<code>any</code>, <code>0</code> nonstop only, <code>1</code> up to one stop, <code>2</code> up to two stops

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

ISO code for prices: <code>USD</code>, <code>IDR</code>, <code>EUR</code>, <code>SGD</code>, <code>AUD</code>…

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

Google returns up to ~150 itineraries per search

## `sortBy` (type: `string`):

Google's own ranking (best), or by price, duration or departure time

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

IATA airline codes to keep, e.g. <code>SQ</code>, <code>GA</code>, <code>QZ</code>. Leave empty for all.

## `excludeAirlines` (type: `array`):

IATA airline codes to drop, e.g. <code>TR</code> (Scoot)

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

Drop flights above this price (in the selected currency)

## `exploreAnywhere` (type: `boolean`):

Instead of a fixed route, list the cheapest destinations Google suggests from <b>Origin</b> — city, country, price, airline, stops, duration and suggested dates. Uses <b>Departure/Return date</b> when set, otherwise Google's flexible one-week trips over the coming months.

## `maxDestinations` (type: `integer`):

Cheapest first

## `maxMultiCityResolutions` (type: `integer`):

How many first-leg options to follow through all legs (one request per leg each)

## `maxDurationMinutes` (type: `integer`):

Drop itineraries longer than this, e.g. <code>720</code> for 12 hours

## `maxLayoverMinutes` (type: `integer`):

Drop itineraries with any layover longer than this, e.g. <code>180</code>

## `departureTimeFrom` (type: `string`):

Earliest departure time, local, e.g. <code>06:00</code>

## `departureTimeTo` (type: `string`):

Latest departure time, local, e.g. <code>12:00</code>

## `arrivalTimeFrom` (type: `string`):

Earliest arrival time, local

## `arrivalTimeTo` (type: `string`):

Latest arrival time, local, e.g. <code>22:00</code>

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

Language of airport and airline names, e.g. <code>en</code>, <code>id</code>, <code>de</code>

## `resolveReturnFlights` (type: `boolean`):

For the top outbound itineraries of a round trip, fetch Google's list of return flights — each with the total price for both directions — so you get complete outbound + return combinations. One extra request per outbound itinerary.

## `maxReturnResolutions` (type: `integer`):

Per round-trip search, counted from the top of the sorted list

## `maxReturnOptions` (type: `integer`):

Cheapest first

## `resolveBookingOptions` (type: `boolean`):

For the top flights of each search, fetch Google's booking options: airline and travel agencies (Trip.com, Expedia, Kiwi…), their prices, fees, and a deep link to book. Round trips need <b>Return flights</b> on — options are fetched for the outbound plus its cheapest return. One extra request per flight — cap it with the field below.

## `maxBookingResolutions` (type: `integer`):

Per search, counted from the top of the sorted list

## `calendarDays` (type: `integer`):

Lowest fare for each departure date over this many days starting at the departure date — Google's date grid as data. <code>0</code> = off, <code>60</code> = two months, up to <code>365</code>. One request per 90 days. Adds <code>calendar\_day</code> items and a <code>calendar.cheapestDates</code> summary to the search item. For round trips the trip length (return minus departure) is kept fixed.

## `calendarOnly` (type: `boolean`):

Return just the price calendar and the search summary — the cheapest way to sweep dates or routes.

## `includePriceInsights` (type: `boolean`):

Add Google's price level (low / typical / high), typical price range and 60-day price history to the search summary and to every flight

## `dataSource` (type: `string`):

<b>Auto</b>: Google's results API (full list of 100–150 itineraries, needs a residential proxy) with automatic fallback to the results page (first ~15 itineraries, works from any IP). Force one source for debugging.

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

Google serves the full results API only to residential IPs — keep <b>Residential</b> proxies for complete results (a search transfers ~250 KB, a fraction of a cent). Datacenter proxies still work through the page fallback with the first ~15 itineraries.

## Actor input object example

```json
{
  "origin": "DPS",
  "destination": "SIN",
  "departureDate": "2026-10-18",
  "routes": [],
  "multiCityLegs": [],
  "adults": 1,
  "children": 0,
  "infantsInSeat": 0,
  "infantsOnLap": 0,
  "cabinClass": "economy",
  "maxStops": "any",
  "currency": "USD",
  "maxResults": 100,
  "sortBy": "best",
  "exploreAnywhere": false,
  "maxDestinations": 60,
  "maxMultiCityResolutions": 5,
  "language": "en",
  "resolveReturnFlights": false,
  "maxReturnResolutions": 10,
  "maxReturnOptions": 20,
  "resolveBookingOptions": false,
  "maxBookingResolutions": 10,
  "calendarDays": 0,
  "calendarOnly": false,
  "includePriceInsights": true,
  "dataSource": "auto",
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

# Actor output Schema

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

One row per flight itinerary: airline, flight numbers, price in the requested currency, Google's price level against the route's usual band, stops and layovers, times, aircraft, CO₂ and booking options with seller prices. Search summaries, explore destinations and cheapest-date rows share the dataset.

# 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 = {
    "origin": "DPS",
    "destination": "SIN",
    "departureDate": "2026-10-18",
    "routes": [],
    "multiCityLegs": []
};

// Run the Actor and wait for it to finish
const run = await client.actor("lergassy/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 = {
    "origin": "DPS",
    "destination": "SIN",
    "departureDate": "2026-10-18",
    "routes": [],
    "multiCityLegs": [],
}

# Run the Actor and wait for it to finish
run = client.actor("lergassy/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 '{
  "origin": "DPS",
  "destination": "SIN",
  "departureDate": "2026-10-18",
  "routes": [],
  "multiCityLegs": []
}' |
apify call lergassy/google-flights-scraper --silent --output-dataset

```

## MCP server setup

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