# Google Flights Scraper - Most Comprehensive (`kaix/google-flights-scraper`) Actor

🔥 ~$0.05/1K flights 🔥 Search one-way, round-trip, and multi-city flights, compare flexible dates and destinations, and add optional booking choices.

- **URL**: https://apify.com/kaix/google-flights-scraper.md
- **Developed by:** [Kai](https://apify.com/kaix) (community)
- **Categories:** E-commerce, Lead generation, Travel
- **Features:** Limited permissions
- **Stats:** 967 total users, 239 monthly users, 96.8% runs succeeded, 4 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.05 / 1,000 flights

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Google Flights Scraper - Most Comprehensive

Search Google Flights for one-way, round-trip, and multi-city trips. Each flight
has the total price, duration, stops, airlines, and every segment with flight
number, aircraft, airports, local times, layovers, and CO2 emissions. Add
flexible-date prices, priced destinations, and booking choices from airlines and
travel sites. The Actor also keeps Google's original data with the results.

Search one route or a batch of 20. Search several airports together, such as
`JFK,EWR,LGA`, or paste a Google Flights link. Filter by stops, price, duration,
airline or alliance, and departure and arrival times. Choose the cabin, the
passengers, the currency, the country, and the language. A one-way search takes
about 3 seconds. A round trip with 28 booking lookups takes about 30 seconds.
Starting at $0.05 per 1,000 flights.

### What can you do with it?

- **Fare comparison.** Compare prices across airlines, stops, and times for one
  route, and sort by price, duration, or time.
- **Price monitoring.** Run your routes every day or week, and save the price
  with the run date. Match the same flight between runs with the flight numbers
  and the departure times.
- **Cheapest day to fly.** Add Calendar prices to see the price of every date
  around your travel dates, for one-way trips and for round trips with a fixed
  stay.
- **Flexible trip ideas.** Find priced destinations from an airport for a
  weekend, a week, or two weeks, in one month or in the next six months.
- **Booking links and provider prices.** Get the offers from airlines and travel
  sites for a flight, with the price, the booking form, and the baggage policy
  link.
- **Multi-city trips.** Price one ordered journey with up to 20 legs and one
  total price.
- **Metro-area searches.** Search all airports of a city together, such as
  `JFK,EWR,LGA` or `LHR,LGW,STN`.
- **Family and group trips.** Set adults, children, infants on a lap, and
  infants in a seat. The prices cover everyone.
- **Red-eye and time-window searches.** Keep only the flights that leave or land
  in your hours, also across midnight.
- **Nonstop and alliance searches.** Keep only nonstop flights, or only Star
  Alliance, Oneworld, or SkyTeam flights.
- **Market comparison.** Run the same route with another country, language, and
  currency to see how Google shows it in that market.
- **Travel-tech data feeds.** Load clean flight JSON into your own app, and keep
  Google's original data for your own parsing.
- **Import a search.** Paste a link from Google Flights and the Actor reads the
  route, dates, cabin, passengers, and market from it.
- **Cost control.** Limit the flights for each route and the booking lookups,
  and set a maximum cost for the run.

### What data does it extract?

| Data | When you get it |
|---|---|
| Route, departure date, return date, trip type, and cabin | Every flight |
| Total price and currency for all passengers | Every flight. The price is `null` when Google shows a schedule without a fare. |
| Total duration and stops for all legs | Every flight |
| Airlines and airline codes | Every flight |
| Legs with duration, stops, and segments | Every flight. Round trips and multi-city journeys also have `legs`. |
| Segment airline, flight number, aircraft, airports, local times with UTC offset, and duration | Every flight. The aircraft is `null` when Google gives none. |
| Layover airport and duration | Flights with a connection |
| CO2 emissions in grams | When Google gives them |
| Booking token | When Google gives one. You need it for booking details. |
| Calendar prices with the date, the return date, and the price | When **Include Calendar Prices** is on |
| Destination rows with city, country, airport, dates, price, airline, stops, and duration | When **Explore From (airport)** is set |
| Booking options with provider, airline-direct flag, flight numbers, price, and booking form | When **Include Booking Details** is on, the flight has a booking token, and Google has offers |
| Baggage policy links and booking links | With booking details |
| Google's original response data | On the first row of each operation. If no row can carry it, the Actor saves one response record. |

Google does not have every field for every flight. A field without data is
`null` or `[]`.

### Quick start

1. Enter the origin, the destination, and the departure date in **Flight
   Searches**. You can also paste a link in **Google Flights URL**.
2. Click **Start**. Replace the sample dates with future dates.
3. Download the results as JSON, CSV, Excel, or HTML.

The same input as JSON:

```json
{
  "searches": [
    {
      "origin": "SFO",
      "destination": "LAX",
      "departureDate": "2026-12-03"
    }
  ]
}
```

### Examples by use case

Replace the sample dates with future dates.

**The cheapest flights of a route.** Sort by price and keep the first 10:

```json
{
  "searches": [
    { "origin": "SFO", "destination": "JFK", "departureDate": "2026-12-03" }
  ],
  "sortBy": "cheapest",
  "maxResults": 10
}
```

**A round trip.** A `returnDate` makes the route a round trip. Each row has both
legs and one total price:

```json
{
  "searches": [
    {
      "origin": "SFO",
      "destination": "JFK",
      "departureDate": "2026-12-03",
      "returnDate": "2026-12-10"
    }
  ]
}
```

**Nonstop flights only:**

```json
{
  "searches": [
    { "origin": "SFO", "destination": "JFK", "departureDate": "2026-12-03" }
  ],
  "maxStops": "0"
}
```

**All airports of a city.** Use a list or an array. This example searches New
York to London in pounds:

```json
{
  "searches": [
    {
      "origin": ["JFK", "EWR", "LGA"],
      "destination": "LHR,LGW,STN",
      "departureDate": "2026-12-03"
    }
  ],
  "country": "GB",
  "language": "en-GB",
  "currency": "GBP",
  "maxResults": 20
}
```

**One alliance.** Star Alliance flights, up to one stop, under 900 dollars:

```json
{
  "searches": [
    { "origin": "SFO", "destination": "FRA", "departureDate": "2026-12-03" }
  ],
  "airlines": ["STAR_ALLIANCE"],
  "maxStops": "1",
  "maxPrice": 900
}
```

**A business-class trip.** One run uses one cabin. To compare cabins, start one
run for each cabin:

```json
{
  "searches": [
    {
      "origin": "SFO",
      "destination": "LHR",
      "departureDate": "2026-12-03",
      "returnDate": "2026-12-17"
    }
  ],
  "cabinClass": "business",
  "currency": "EUR"
}
```

**A family trip.** Two adults, two children, and one infant on a lap:

```json
{
  "searches": [
    { "origin": "LAX", "destination": "HNL", "departureDate": "2026-12-03" }
  ],
  "adults": 2,
  "children": 2,
  "infantsOnLap": 1
}
```

**Morning departures:**

```json
{
  "searches": [
    { "origin": "SFO", "destination": "LAX", "departureDate": "2026-12-03" }
  ],
  "departureTimeEarliest": "06:00",
  "departureTimeLatest": "09"
}
```

**Red-eye flights.** The earliest time is later than the latest time, so the
range crosses midnight. This keeps departures from 22:00 to 06:59:

```json
{
  "searches": [
    { "origin": "SFO", "destination": "JFK", "departureDate": "2026-12-03" }
  ],
  "departureTimeEarliest": "22",
  "departureTimeLatest": "6"
}
```

**A multi-city trip.** One ordered journey with one total price:

```json
{
  "tripType": "multi-city",
  "searches": [
    { "origin": "SFO", "destination": "LAX", "departureDate": "2026-12-03" },
    { "origin": "LAX", "destination": "LAS", "departureDate": "2026-12-06" },
    { "origin": "LAS", "destination": "SFO", "departureDate": "2026-12-09" }
  ]
}
```

**The cheapest day to fly.** Add the prices of the next 30 days, one-way:

```json
{
  "searches": [
    { "origin": "SFO", "destination": "LAX", "departureDate": "2026-12-03" }
  ],
  "includeCalendarPrices": true,
  "calendarMode": "graph",
  "calendarDays": 30
}
```

**The best days for a round trip with a fixed stay.** This round trip lasts 7
nights. Each Calendar price keeps the 7 nights:

```json
{
  "searches": [
    {
      "origin": "SFO",
      "destination": "LAX",
      "departureDate": "2026-12-03",
      "returnDate": "2026-12-10"
    }
  ],
  "includeCalendarPrices": true,
  "calendarMode": "picker",
  "calendarDays": 30
}
```

**Weekend trips from an airport.** Priced destinations for a weekend in
February. An empty `searches` list means no route search:

```json
{
  "searches": [],
  "exploreOrigin": "SFO",
  "tripDuration": "weekend",
  "exploreMonth": "february"
}
```

**Booking links for the cheapest flights.** Booking details for the three
cheapest nonstop flights:

```json
{
  "searches": [
    { "origin": "SFO", "destination": "LAX", "departureDate": "2026-12-03" }
  ],
  "maxStops": "0",
  "sortBy": "cheapest",
  "maxResults": 3,
  "includeBookingDetails": true
}
```

**Another market.** The same route with German settings and euro prices:

```json
{
  "searches": [
    { "origin": "FRA", "destination": "BCN", "departureDate": "2026-12-03" }
  ],
  "country": "DE",
  "language": "de",
  "currency": "EUR"
}
```

**Import a Google Flights link:**

```json
{
  "flightUrl": "https://www.google.com/travel/flights?q=Flights+from+JFK+to+LHR+on+2026-12-03&curr=GBP&hl=en-GB&gl=GB",
  "maxResults": 20
}
```

**Monitor several routes.** One run searches up to 20 routes. One-way and round
trips can share a run. Run it on a schedule:

```json
{
  "searches": [
    { "origin": "SFO", "destination": "LAX", "departureDate": "2026-12-03" },
    {
      "origin": "SFO",
      "destination": "SEA",
      "departureDate": "2026-12-04",
      "returnDate": "2026-12-08"
    },
    { "origin": "LAX", "destination": "LAS", "departureDate": "2026-12-06" }
  ],
  "sortBy": "cheapest",
  "maxResults": 5
}
```

**Flights, Calendar prices, destinations, and booking details in one run.**
Explore and route work share the run. The destination rows come first:

```json
{
  "searches": [
    { "origin": "DAD", "destination": "SGN", "departureDate": "2026-12-03" }
  ],
  "maxStops": "0",
  "airlines": ["VN"],
  "includeCalendarPrices": true,
  "calendarDays": 5,
  "includeBookingDetails": true,
  "maxBookingDetails": 5,
  "exploreOrigin": "SGN"
}
```

### Choose the routes

Put one or more routes in `searches`. Each route has an `origin`, a
`destination`, a `departureDate`, and an optional `returnDate`.

- **Airports.** Use three-letter IATA airport codes. Codes are trimmed, changed
  to uppercase, and deduplicated. The Actor does not accept city names or Google
  place IDs.
- **Airport groups.** An `origin` or a `destination` can be one code, a
  comma-separated list, or an array. The Actor searches all codes together in
  one search. Each flight row shows the airports that the flight really uses.
  Calendar rows and `requestContext` keep the groups that you asked for.
- **Dates.** Use real dates in `YYYY-MM-DD` format. The Actor skips a route with
  a departure date in the past, or with a return date before the departure date.
  The log names the skipped route. A run in which every route is skipped can end
  with no results.
- **One-way or round trip.** Each route is a round trip when it has a
  `returnDate`, and one-way when it has none. One run can mix both. An explicit
  `tripType` of `one-way` or `round-trip` does not override the dates.
- **A batch.** The Actor processes up to 20 routes in your order. It drops the
  routes after the first 20 with a warning. It skips an invalid route with a
  warning, and the other routes still run.
- **Multi-city.** Set `tripType` to `multi-city`. The list is then one ordered
  journey with up to 20 legs and one total price. One invalid leg, or more than
  20 legs, skips the whole journey. Each leg ignores `returnDate`.
- **No route.** An empty list, `"searches": []`, without **Explore From
  (airport)** means no work, and the run ends without results. If you leave
  `searches` out, the Actor runs a sample search for SFO to LAX on the first day
  of the next month.

#### Google Flights links

Set `flightUrl` to import a search. The Actor reads the settings from the link
and does not open it.

- **Accepted links.** HTTPS links on `google.com` or `www.google.com`, with the
  path `/travel/flights` or `/travel/flights/search`.
- **Two forms.** A link with a `tfs` value can hold a one-way, round-trip, or
  multi-city search, with airport groups, the cabin, and the passengers. A link
  with a `q` value must have this text: `Flights from SFO to LAX on 2026-12-03`.
  Add `returning 2026-12-10` for a round trip.
- **Market.** The `hl`, `gl`, and `curr` values set the language, the country,
  and the currency. The values `authuser`, `source`, and `utm_*` are ignored.
- **What replaces what.** The link replaces `searches` and `tripType`. Your own
  settings for the cabin, passengers, currency, country, and language win over
  the link. The input form sends preset values for these fields, so these values
  win too. Omit a field from the JSON input to use the value from the link.
  Limits and filters still apply.
- **Not accepted.** Google city and place IDs, links to a selected flight, and
  filters inside the link, such as `tfu` or `stops`. A link with more than 9
  passengers, or with more infants on a lap than adults, is also rejected. Set
  filters in the Actor input. An invalid or unsupported link stops the run with
  an input error. A blank or `null` link counts as not set.

### Filter the flights

Filters are combined. A flight must match every filter that you set. Inside the
`airlines` filter, a flight can match any of the values.

For round trips and multi-city journeys, the stop, duration, airline, and time
filters apply to every leg. The price filter applies to the whole itinerary.

- **`maxStops`.** `0` for nonstop only, `1` for up to one stop, or `2` for up to
  two stops.
- **`maxPrice`.** The highest total price for all passengers, in the selected
  currency. Use a positive whole number.
- **`maxDuration`.** The longest duration of each leg, in minutes. Use a
  positive whole number.
- **`airlines`.** Airline codes such as `UA` and `AA`, or the alliance names
  `ONEWORLD`, `STAR_ALLIANCE`, and `SKYTEAM`. Values are trimmed and changed to
  uppercase.
- **`departureTimeEarliest` and `departureTimeLatest`.** The local time of the
  departure airport.
- **`arrivalTimeEarliest` and `arrivalTimeLatest`.** The local time of the
  arrival airport.
- **`showAllResults`.** Ask Google for more flight choices before the filters
  run. Use it when narrow filters return too few rows.

Give each time bound as a whole hour (`6`, `18`) or as `HH:MM` (`06:30`). A
whole-hour latest time includes the complete hour, so `18` includes departures
through `18:59`. If the earliest time is later than the latest time, the range
crosses midnight. For example, `22` to `6` means 22:00 to 06:59. Flight time
filters use exact minutes.

This example keeps nonstop and one-stop Oneworld flights under 600 dollars that
take at most 8 hours for each leg and leave before noon:

```json
{
  "searches": [
    {
      "origin": "SFO",
      "destination": "JFK",
      "departureDate": "2026-12-03",
      "returnDate": "2026-12-10"
    }
  ],
  "maxStops": "1",
  "maxPrice": 600,
  "maxDuration": 480,
  "airlines": ["ONEWORLD"],
  "departureTimeLatest": "11",
  "showAllResults": true
}
```

A `maxPrice` or `maxDuration` that is not a positive whole number is ignored
with a warning. A blank or non-string entry in `airlines` is ignored with a
warning.

### Choose the flight order

`sortBy` sets the order. The default is `best`.

| Value | Order |
|---|---|
| `best` | Google's order. |
| `cheapest` | The lowest fare first. Schedules without a fare come last. |
| `fastest` | The shortest total duration first. |
| `departure-time` | The earliest departure first. |
| `arrival-time` | The earliest arrival first. |

For round trips and multi-city journeys, `cheapest` and `fastest` use the whole
itinerary. `departure-time` and `arrival-time` use the final leg.

The Actor sorts after it filters. `maxResults` then keeps the first flights of
the sorted list. It does not make the search faster. It limits the rows after
the search finishes. A round-trip row or a multi-city row counts as one flight.
Calendar and destination rows do not count.

### Compare travel dates

Set `includeCalendarPrices` to add the prices of nearby dates to a route.
Calendar prices use the same stop, price, duration, airline, passenger, cabin,
and time settings as the route. Airport groups work too.

| `calendarMode` | Dates | Default |
|---|---|---|
| `graph` | A forward series of departure dates that starts on the requested date. | 61 dates |
| `grid` | A window that is centered on the requested departure date. | 7 dates |
| `picker` | A forward series of departure and return pairs that keep the stay length of your round trip. It needs a `returnDate`. | 61 pairs |

`calendarDays` sets the number of dates or pairs. The Actor truncates decimals,
limits the value to 1 to 90, and makes a Grid window odd.

- **One-way routes** get one price for each date.

- **Round-trip routes** get a price for each pair of dates. Each pair keeps the
  stay length of your `departureDate` and `returnDate`, in every mode.
  `returnDate` is in each Calendar row.

- **Where the prices go.** The Actor adds `calendarPrices` to the first flight
  row of the route. `maxResults` does not change the Calendar window or the
  place of the prices. If no flight row exists, the Actor saves one Calendar
  record instead.

- **No prices.** `calendarPrices` is `null` when Calendar could not be checked.
  The flight rows stay.

- **Multi-city.** Calendar uses the first leg of a multi-city journey.

### Find destinations

Set `exploreOrigin` to get priced destinations for a flexible month and stay.
You do not need a destination or a date.

- **`tripDuration`.** `weekend` for stays of 1 to 4 days, `1-week` for 6 to 9
  days, or `2-weeks` for 13 to 16 days. The default is `1-week`.
- **`exploreMonth`.** `next-6-months`, or a month name from `january` to
  `december`. The default is `next-6-months`. Google covers about the next 10
  months. A month beyond that gives no destinations and a warning with the month
  name.
- **What applies.** The cabin, passengers, currency, country, and language
  apply. The stop, price, duration, airline, and time filters, the sort order,
  and `maxResults` do not apply to destinations. A destination row has no
  booking details.
- **With routes.** If `searches` has routes too, the Actor runs both. It saves
  the destination rows first.

Each destination is one row. A destination can have an `airport` that is empty
when it is a region, and `airlineCode` is `"multi"` when the trip uses more than
one airline.

### Add booking details

Set `includeBookingDetails` to get the offers for each flight that has a booking
token. Each offer has the provider, the price, a booking form, and the baggage
policy links.

- **Limit the lookups.** `maxBookingDetails` limits the lookups for each route
  or for the whole multi-city journey. Use `maxResults` to limit the flight rows
  first. A round trip uses one limit for the whole journey.
- **What counts.** Only flights with a booking token count. A lookup that fails
  counts toward the limit. `0` turns the lookups off. If you leave the field out
  or use `null`, the Actor looks up every flight that has a token.
- **Flights outside the limit** stay in the output with `bookingDetails: null`.
- **Book a flight.** Use the `bookingForm` of an option. Send all its `fields`
  together to its `action`. `displayUrl` is the text that Google shows for the
  provider. It is not always a link that you can open.

### Set passengers, cabin, and market

- **Cabin.** `cabinClass` is `economy`, `premium-economy`, `business`, or
  `first`. The default is `economy`.
- **Passengers.** `adults` (1 to 9), `children` (0 to 9), `infantsOnLap` (0 to
  9\), and `infantsInSeat` (0 to 9). The Actor does not add a combined limit and
  does not compare infants on a lap with adults. Google can return no flights
  for an unusual group. The prices cover all passengers.
- **Currency.** A three-letter code, such as `USD`, `EUR`, or `JPY`. The Actor
  asks Google for prices in that currency and does not convert them. A malformed
  code uses `USD` with a warning. The amount or currency at checkout can differ
  by provider.
- **Country and language.** `country` is a two-letter code, such as `US`, `GB`,
  or `SE`. `UK` becomes `GB`. `language` is a language tag, such as `en-US`,
  `sv`, or `de`. They apply to flights, Calendar prices, destinations, and
  booking details. An invalid country or language gives a warning and uses the
  default. The country setting does not change the proxy country.

### Connection settings

Apify Proxy is on by default, and no proxy group is selected. Keep Apify Proxy
on. Without it, most searches return no results.

```json
{
  "searches": [
    { "origin": "SFO", "destination": "LAX", "departureDate": "2026-12-03" }
  ],
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

In `proxyConfiguration`, an empty `apifyProxyGroups` or `proxyUrls` list counts
as not set. A `null` value turns the proxy off.

### Input reference

All fields are optional. Use `searches`, `flightUrl`, or `exploreOrigin` to say
what to search.

| Field | Type | Default | Description |
|---|---|---|---|
| `flightUrl` | string | none | A supported HTTPS Google Flights airport-search link. It replaces `searches` and `tripType`. Your own travel settings win over the link. |
| `searches` | object\[] | sample route | Up to 20 routes with `origin`, `destination`, `departureDate`, and an optional `returnDate`. Each endpoint accepts one code, a comma-separated list, or an array. `[]` means no route work. |
| `tripType` | string | from the dates | `one-way`, `round-trip`, or `multi-city`. Independent routes use their own dates. `multi-city` makes the list one ordered journey. |
| `exploreOrigin` | string | none | A three-letter IATA airport code for a destination search. |
| `tripDuration` | string | `1-week` | `weekend` (1 to 4 days), `1-week` (6 to 9 days), or `2-weeks` (13 to 16 days). |
| `exploreMonth` | string | `next-6-months` | `next-6-months`, or `january` to `december`. |
| `cabinClass` | string | `economy` | `economy`, `premium-economy`, `business`, or `first`. |
| `adults` | integer | `1` | Adults, from 1 to 9. |
| `children` | integer | `0` | Children, from 0 to 9. |
| `infantsOnLap` | integer | `0` | Infants on an adult's lap, from 0 to 9. |
| `infantsInSeat` | integer | `0` | Infants in their own seat, from 0 to 9. |
| `currency` | string | `USD` | A three-letter currency code. It also applies to destination runs. |
| `country` | string | `US` | A two-letter country code. `UK` becomes `GB`. |
| `language` | string | `en-US` | A language tag, such as `sv`, `de`, or `en-GB`. |
| `maxStops` | string | none | `0`, `1`, or `2`. |
| `maxPrice` | number | none | The highest total price, as a positive whole number in the selected currency. |
| `maxDuration` | number | none | The longest duration of each leg in minutes, as a positive whole number. |
| `airlines` | string\[] | none | Airline codes or the alliance names `ONEWORLD`, `STAR_ALLIANCE`, and `SKYTEAM`. |
| `departureTimeEarliest` | string | none | The earliest local departure time, as an hour or `HH:MM`. |
| `departureTimeLatest` | string | none | The latest local departure time, as an hour or `HH:MM`. |
| `arrivalTimeEarliest` | string | none | The earliest local arrival time, as an hour or `HH:MM`. |
| `arrivalTimeLatest` | string | none | The latest local arrival time, as an hour or `HH:MM`. |
| `sortBy` | string | `best` | `best`, `cheapest`, `fastest`, `departure-time`, or `arrival-time`. |
| `showAllResults` | boolean | `false` | Ask Google for more flight choices before the filters run. |
| `maxResults` | integer | all rows | The most flight rows for each route or each journey, after the filters and the sort. |
| `maxBookingDetails` | integer | all lookups | The most booking lookups for each route or each journey. `0` turns them off. |
| `includeCalendarPrices` | boolean | `false` | Add the prices of nearby dates to the first flight of each route. |
| `calendarMode` | string | `graph` | `graph`, `grid`, or `picker`. |
| `calendarDays` | number | by mode | The number of dates or pairs, from 1 to 90. The default is 61 for `graph` and `picker`, and 7 for `grid`. |
| `includeBookingDetails` | boolean | `false` | Add provider offers, booking forms, and baggage policy links. |
| `proxyConfiguration` | object | Apify Proxy on | Connection settings that Apify manages. |

#### Input rules

- Unknown input fields are ignored. Settings for work that is not active are
  ignored too.
- A blank or `null` optional field counts as not set.
- An invalid optional setting gives a warning and uses its default. An invalid
  `flightUrl`, `maxResults`, or `maxBookingDetails` stops the run.

<details>
<summary>Supported currency codes</summary>

`ALL`, `DZD`, `ARS`, `AMD`, `AWG`, `AUD`, `AZN`, `BSD`, `BHD`, `BYN`, `BMD`,
`BAM`, `BRL`, `GBP`, `CAD`, `XPF`, `CLP`, `CNY`, `COP`, `CRC`, `CUP`, `CZK`,
`DKK`, `DOP`, `EGP`, `EUR`, `GEL`, `HKD`, `HUF`, `ISK`, `INR`, `IDR`, `IRR`,
`ILS`, `JMD`, `JPY`, `JOD`, `KZT`, `KWD`, `LBP`, `MKD`, `MYR`, `MXN`, `MDL`,
`MAD`, `TWD`, `NZD`, `NGN`, `NOK`, `OMR`, `PKR`, `PAB`, `PEN`, `PHP`, `PLN`,
`QAR`, `RON`, `RUB`, `SAR`, `RSD`, `SGD`, `ZAR`, `KRW`, `SEK`, `CHF`, `THB`,
`TRY`, `UAH`, `AED`, `USD`, `VND`

The Actor also accepts other canonical three-letter currency codes. Google
decides whether it can return a price in the requested currency.

</details>

<details>
<summary>Complete input example</summary>

This valid input shows how the fields fit together. It runs both a destination
search and a round-trip route.

```json
{
  "flightUrl": null,
  "searches": [
    {
      "origin": "SFO",
      "destination": "LAX",
      "departureDate": "2026-12-03",
      "returnDate": "2026-12-10"
    }
  ],
  "tripType": "round-trip",
  "exploreOrigin": "SFO",
  "tripDuration": "1-week",
  "exploreMonth": "next-6-months",
  "cabinClass": "economy",
  "adults": 2,
  "children": 1,
  "infantsOnLap": 0,
  "infantsInSeat": 0,
  "currency": "EUR",
  "country": "US",
  "language": "en-US",
  "maxStops": "1",
  "maxPrice": 500,
  "maxDuration": 360,
  "airlines": ["UA", "STAR_ALLIANCE"],
  "departureTimeEarliest": "08:00",
  "departureTimeLatest": "18:00",
  "arrivalTimeEarliest": "09:00",
  "arrivalTimeLatest": "23:00",
  "sortBy": "cheapest",
  "showAllResults": true,
  "maxResults": 25,
  "maxBookingDetails": 5,
  "includeCalendarPrices": true,
  "calendarMode": "picker",
  "calendarDays": 30,
  "includeBookingDetails": true,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

</details>

### Output

Each item in the dataset is one of four records:

- A **flight** row has `outbound`.
- A **destination** row has `destinationId`.
- A **Calendar** record has `recordType: "calendar"`. The Actor saves it when
  Calendar work finishes and no flight row can carry the prices.
- A **response** record has `recordType: "google-response"`. It holds only
  Google's original data.

The **Overview** table shows the record type, the origin, the destination, the
city, the dates, the price, the currency, and the stops. When a run has
destination work and route work, the destination rows come first. Independent
routes follow your order.

Prices cover all passengers and use the selected currency. Durations and
layovers are in minutes. `co2Emissions` is in grams. Departure and arrival times
are local airport times with the UTC offset of that date. The Actor keeps
Google's `bookingToken` unchanged.

Most examples in this section are real records from runs of this Actor on 14
October 2026. Prices and schedules change. Booking tokens and form values are
shortened, and `googleResponses` is left out.

The output schema links to the dataset and the key-value store. It does not
check the fields inside the items. Allow `null`, missing, and extra fields,
because Google can change its results.

#### Fields by topic

- **Trip.** `origin`, `destination`, `departureDate`, `returnDate`, `tripType`,
  and `cabinClass`. For a multi-city journey, `origin` is the first departure
  airport and `destination` is the last arrival airport.
- **Price.** `price` for all passengers and `currency`.
- **Duration and stops.** `totalDuration` and `stops` for all legs.
- **Airlines.** `airlines` and `airlineCodes`.
- **Legs.** `outbound`, `return`, and `legs`. A leg has `duration`, `stops`, and
  `segments`.
- **Segments.** The airline, the code, the flight number, the aircraft, the
  airports, the local times, the duration, and the layover after the segment.
- **Emissions.** `co2Emissions`.
- **Booking.** `bookingToken` and `bookingDetails`.
- **Calendar.** `calendarPrices` on the first flight, or a Calendar record.
- **Google data.** `googleResponses`.

#### One-way flight example

This flight came from a one-way search with airport groups and a 3-day Graph
Calendar. `legs` is only in round trips and multi-city journeys.
`calendarPrices` is `null` when you do not ask for Calendar prices.

```json
{
  "origin": "SFO",
  "destination": "LAX",
  "departureDate": "2026-12-03",
  "returnDate": null,
  "tripType": "one-way",
  "cabinClass": "economy",
  "price": 24,
  "currency": "USD",
  "pricePerPassenger": null,
  "totalDuration": 87,
  "stops": 0,
  "airlines": ["Frontier"],
  "airlineCodes": ["F9"],
  "outbound": {
    "duration": 87,
    "stops": 0,
    "segments": [
      {
        "airline": "Frontier",
        "airlineCode": "F9",
        "flightNumber": "F92858",
        "aircraft": "Airbus A321neo",
        "departureAirport": "SFO",
        "arrivalAirport": "LAX",
        "departureTime": "2026-12-03T21:31:00-08:00",
        "arrivalTime": "2026-12-03T22:58:00-08:00",
        "duration": 87,
        "layover": null
      }
    ]
  },
  "return": null,
  "co2Emissions": 46940,
  "co2EmissionsLabel": null,
  "bookingToken": "CjRIN2hRVGJRbXBz…",
  "fareClass": null,
  "bookingDetails": null,
  "calendarPrices": [
    { "date": "2026-12-03", "price": 24 },
    { "date": "2026-12-04", "price": 29 },
    { "date": "2026-12-05", "price": 19 }
  ]
}
```

#### Round-trip example

A round trip has `outbound`, `return`, and `legs`. `legs` lists the same two
legs as `outbound` and `return`, so this example leaves it out. Its Calendar
prices come in date pairs that keep the 7-night stay.

<details>
<summary>Round-trip flight record</summary>

```json
{
  "origin": "SFO",
  "destination": "LAX",
  "departureDate": "2026-12-03",
  "returnDate": "2026-12-10",
  "tripType": "round-trip",
  "cabinClass": "economy",
  "price": 48,
  "currency": "USD",
  "pricePerPassenger": null,
  "totalDuration": 175,
  "stops": 0,
  "airlines": ["Frontier"],
  "airlineCodes": ["F9"],
  "outbound": {
    "duration": 87,
    "stops": 0,
    "segments": [
      {
        "airline": "Frontier",
        "airlineCode": "F9",
        "flightNumber": "F92858",
        "aircraft": "Airbus A321neo",
        "departureAirport": "SFO",
        "arrivalAirport": "LAX",
        "departureTime": "2026-12-03T21:31:00-08:00",
        "arrivalTime": "2026-12-03T22:58:00-08:00",
        "duration": 87,
        "layover": null
      }
    ]
  },
  "return": {
    "duration": 88,
    "stops": 0,
    "segments": [
      {
        "airline": "Frontier",
        "airlineCode": "F9",
        "flightNumber": "F94593",
        "aircraft": "Airbus A321neo",
        "departureAirport": "LAX",
        "arrivalAirport": "SFO",
        "departureTime": "2026-12-10T18:40:00-08:00",
        "arrivalTime": "2026-12-10T20:08:00-08:00",
        "duration": 88,
        "layover": null
      }
    ]
  },
  "co2Emissions": 92957,
  "co2EmissionsLabel": null,
  "bookingToken": "CjRIbENYcm43T0RW…",
  "fareClass": null,
  "bookingDetails": null,
  "calendarPrices": [
    { "date": "2026-12-03", "returnDate": "2026-12-10", "price": 48 },
    { "date": "2026-12-04", "returnDate": "2026-12-11", "price": 77 },
    { "date": "2026-12-05", "returnDate": "2026-12-12", "price": 38 }
  ]
}
```

</details>

A multi-city row has the same shape. `outbound` is the first leg, `return` is
`null`, and `legs` has every leg in travel order. `origin` is the first
departure airport and `destination` is the last arrival airport.

#### Flight fields

<details>
<summary>Flight field types</summary>

| Object | Field types |
|---|---|
| Flight strings | `origin`, `destination`, `departureDate`, `tripType`, `cabinClass`, and `currency`: string. `returnDate`, `co2EmissionsLabel`, `bookingToken`, and `fareClass`: string or `null`. |
| Flight numbers | `totalDuration` and `stops`: number. `price`, `pricePerPassenger`, and `co2Emissions`: number or `null`. |
| Flight arrays | `airlines` and `airlineCodes`: string\[]. Optional `legs`: Leg\[]. `calendarPrices`: Calendar price\[] or `null`. Optional `googleResponses`: Response\[]. |
| Flight objects | `outbound`: Leg. `return`: Leg or `null`. `bookingDetails`: object or `null`. |
| Leg | `duration` and `stops`: number. `segments`: Segment\[]. |
| Segment | `airline`, `airlineCode`, `flightNumber`, `departureAirport`, `arrivalAirport`, `departureTime`, and `arrivalTime`: string. `aircraft`: string or `null`. `duration`: number. `layover`: Layover or `null`. |
| Layover | `airport`: string. `duration`: number. |
| Calendar price | `date`: string. Optional `returnDate`: string. `price`: number. |

</details>

The fields `pricePerPassenger`, `co2EmissionsLabel`, and `fareClass` are always
`null`. They stay so that existing integrations keep working.

Google can show the same flight more than once. The Actor keeps the first row
for each booking token, in Google's order. A row without a token is a repeat
when its fare, currency, flight numbers, airports, and times match another row.
Rows with different tokens or different fares stay separate rows.
`googleResponses` keeps all repeated values.

#### Calendar prices

`calendarPrices` is in date order. Pairs with the same departure date are in
return-date order. The array is `[]` when the check finished without matching
prices. It is `null` when you did not ask for Calendar prices or the Actor could
not check them.

A one-way Graph window of 3 dates:

```json
[
  { "date": "2026-12-03", "price": 24 },
  { "date": "2026-12-04", "price": 29 },
  { "date": "2026-12-05", "price": 19 }
]
```

A round-trip Graph window of 3 date pairs. The stay length is the same in every
pair:

```json
[
  { "date": "2026-12-03", "returnDate": "2026-12-10", "price": 48 },
  { "date": "2026-12-04", "returnDate": "2026-12-11", "price": 77 },
  { "date": "2026-12-05", "returnDate": "2026-12-12", "price": 38 }
]
```

A Grid window of 7 dates around the requested date:

```json
[
  { "date": "2026-11-30", "price": 31 },
  { "date": "2026-12-01", "price": 31 },
  { "date": "2026-12-02", "price": 31 },
  { "date": "2026-12-03", "price": 31 },
  { "date": "2026-12-04", "price": 31 },
  { "date": "2026-12-05", "price": 31 },
  { "date": "2026-12-06", "price": 39 }
]
```

A Picker pair:

```json
[
  { "date": "2026-12-15", "returnDate": "2026-12-24", "price": 43 }
]
```

When Calendar work finishes and no flight row can carry the prices, the Actor
saves a Calendar record. This one came from a run with `maxPrice: 1`, so no
flight and no Calendar date matched:

```json
{
  "recordType": "calendar",
  "origin": "DAD",
  "destination": "SGN",
  "departureDate": "2026-12-03",
  "returnDate": null,
  "tripType": "one-way",
  "cabinClass": "economy",
  "adults": 1,
  "children": 0,
  "infantsOnLap": 0,
  "infantsInSeat": 0,
  "calendarMode": "graph",
  "calendarDays": 5,
  "currency": "USD",
  "calendarPrices": []
}
```

<details>
<summary>Calendar record field types</summary>

| Field | JSON type |
|---|---|
| `recordType` | string, always `"calendar"` |
| `origin`, `destination`, `departureDate`, `tripType`, `cabinClass`, `calendarMode`, `currency` | string |
| `returnDate` | string or `null` |
| `adults`, `children`, `infantsOnLap`, `infantsInSeat`, `calendarDays` | number |
| `calendarPrices` | Calendar price\[] |
| `googleResponses` | optional Response\[] |

</details>

#### Booking details

When a booking lookup returns data, the Actor adds it to `bookingDetails`. This
example came from a live run. The run returned 3 booking options for the flight.
Two are shown, and the form values are shortened.

<details>
<summary>Booking details object</summary>

```json
{
  "baggageAllowance": {
    "carryOn": null,
    "checked": "https://www.flyfrontier.com/travel/travel-info/bag-options/"
  },
  "fareRules": [],
  "bookingLinks": [
    { "airline": "Frontier", "url": "www.flyfrontier.com/..." },
    { "airline": "Frontier", "url": "www.flyfrontier.com/..." },
    { "airline": "FlightHub", "url": "www.flighthub.com/..." }
  ],
  "bookingOptions": [
    {
      "providerCode": "F9",
      "provider": "Frontier",
      "isAirlineDirect": true,
      "flightNumbers": ["F92858"],
      "price": 22,
      "currency": "EUR",
      "displayUrl": "www.flyfrontier.com/...",
      "bookingForm": {
        "action": "https://www.google.com/travel/clk/f",
        "fields": { "u": "ADowPOJPcZTaHoR4…" }
      }
    },
    {
      "providerCode": "F9",
      "provider": "Frontier",
      "isAirlineDirect": true,
      "flightNumbers": ["F92858"],
      "price": 50,
      "currency": "EUR",
      "displayUrl": "www.flyfrontier.com/...",
      "bookingForm": {
        "action": "https://www.google.com/travel/clk/f",
        "fields": { "u": "ADowPOJFTd2HwBwF…" }
      }
    }
  ],
  "baggagePolicies": [
    {
      "airlineCode": "F9",
      "airline": "Frontier",
      "url": "https://www.flyfrontier.com/travel/travel-info/bag-options/"
    }
  ],
  "googleFlightsUrl": null
}
```

</details>

<details>
<summary>Booking details field types</summary>

| Object | Field types |
|---|---|
| `bookingDetails` | `baggageAllowance`: object or `null`. `fareRules`: string\[]. `bookingLinks`: Booking link\[]. `bookingOptions`: Booking option\[]. `baggagePolicies`: Baggage policy\[]. `googleFlightsUrl`: string or `null`. |
| `baggageAllowance` | `carryOn` and `checked`: string or `null`. |
| Booking link | `airline` and `url`: string. |
| Booking option | `providerCode` and `displayUrl`: string or `null`. `provider` and `currency`: string. `isAirlineDirect`: boolean or `null`. `flightNumbers`: string\[]. `price`: number or `null`. `bookingForm`: object or `null`. |
| `bookingForm` | `action`: string. `fields`: an object with string values. Send all fields to the action together. |
| Baggage policy | `airlineCode`, `airline`, and `url`: string. |

</details>

`bookingDetails` is `null` when you did not ask for booking details, the flight
has no booking token, the limit stopped the lookup, or Google had no booking
data. `bookingOptions`, `fareRules`, `bookingLinks`, and `baggagePolicies` can
be empty.

#### Destination example

Each destination is one row. These two rows came from an Explore-only run with
`1-week` stays.

```json
[
  {
    "destinationId": "/m/030qb3t",
    "city": "Los Angeles",
    "country": "United States",
    "airport": "LAX",
    "departureDate": "2026-12-05",
    "returnDate": "2026-12-12",
    "price": 38,
    "cheapestPrice": null,
    "currency": "USD",
    "airline": "Frontier",
    "airlineCode": "F9",
    "stops": 0,
    "duration": 93
  },
  {
    "destinationId": "/m/0d35y",
    "city": "Phoenix",
    "country": "United States",
    "airport": "PHX",
    "departureDate": "2026-11-07",
    "returnDate": "2026-11-14",
    "price": 56,
    "cheapestPrice": null,
    "currency": "USD",
    "airline": "Frontier",
    "airlineCode": "F9",
    "stops": 0,
    "duration": 123
  }
]
```

<details>
<summary>Destination field types</summary>

| Field | JSON type |
|---|---|
| `destinationId`, `city`, `country`, `airport`, `currency` | string |
| `departureDate`, `returnDate`, `airline`, `airlineCode` | string or `null` |
| `price`, `cheapestPrice`, `stops`, `duration` | number or `null` |
| `googleResponses` | optional Response\[] |

</details>

`price` is the quote for the trip. `cheapestPrice` is a comparison value that
can be higher or lower. Rows with a trip quote come before rows with only a
comparison value, and each group is sorted by its own price. At least one price
field has a value. `airline`, `stops`, and `duration` can be `null`.

#### Google response data

The Actor keeps Google's original data in `googleResponses`. The first row of
each operation carries the array. Booking data stays with its flight. If no row
can carry the data, for example when every result is filtered out, the Actor
writes one response record.

`rawResponse` is Google's original data. It keeps the original order, repeated
values, `null` values, and fields that the Actor does not use. `requestContext`
has only public route values, such as the origin, the destination, the dates,
the journey stage, and the Calendar variant. It never has booking tokens.

This record came from an earlier run whose only route returned no itineraries.
`rawResponse` is shortened, and `responseBlocks`, `method`, and `transport` are
left out.

<details>
<summary>Response record</summary>

```json
{
  "recordType": "google-response",
  "googleResponses": [
    {
      "operation": "search",
      "status": 200,
      "contentType": "application/json; charset=utf-8",
      "rawResponse": "…",
      "rawResponseBytes": 28775,
      "normalization": {
        "status": "unavailable",
        "reason": "decoder-rejected"
      },
      "requestContext": {
        "origin": "SFO",
        "destination": "LAX",
        "departureDate": "2026-10-01",
        "returnDate": null,
        "tripType": "one-way"
      }
    }
  ]
}
```

</details>

<details>
<summary>Response field types</summary>

| Object | Field types |
|---|---|
| Response record | `recordType`: string, always `"google-response"`. `googleResponses`: Response\[]. |
| Response identity | `operation`: `search`, `journey`, `booking`, `calendar`, or `explore`. `method` and `transport`: internal string labels. `status`: number. `contentType`: string or `null`. |
| Response body | Optional `rawResponse`: string. Optional `rawResponseKey`: string. Optional `rawResponseKeys`: string\[]. Optional `rawResponseBytes`: number. `responseBlocks`: JSON array\[] or `null`. |
| `normalization` | An object with `status`: `normalized` or `unavailable`. An unavailable value also has `reason`: `no-response-blocks`, `decoder-rejected`, or `decoder-error`. |
| `requestContext` | An optional object. `origin`, `destination`, `departureDate`, `tripType`, `calendarMode`, `tripDuration`, `exploreMonth`, and `itinerarySignature` are optional strings. `returnDate` is an optional string or `null`. `stage`, `requestIndex`, and `variant` are optional numbers. |

</details>

Large values go to the key-value store of the run under keys that start with
`GOOGLE_RESPONSE_`. `rawResponseKey` or `rawResponseKeys` then points to them.

### FAQ

#### How many flights can I get?

There is no fixed limit. Google decides how many flights it lists. In our tests,
a one-way route returned 30 to 100 rows. Use `showAllResults` to ask Google for
more choices before the filters run. Use `maxResults` to keep fewer rows for
each route.

#### Why did I get fewer flights than I expected?

Your filters can remove flights, and `maxResults` keeps only the first rows.
Google can also list few flights for a route, a date, or a narrow filter. Try
`showAllResults`. For round trips and multi-city journeys, a result has one
complete set of earlier legs and the alternatives for the final leg. It does not
list every possible mix of legs.

#### How do I get booking links?

Set `includeBookingDetails`. Each option in `bookingDetails.bookingOptions` has
a `bookingForm`. Send all its `fields` together to its `action` to reach the
provider. Use `maxResults` and `maxBookingDetails` to limit the lookups.

#### How do I track prices over time?

The Actor has no price history. Run it on a schedule and save the results. Match
a flight between runs with the flight numbers and the departure times of its
segments.

#### Does it support city names?

No. Use airport codes. To search a whole city, list its airports, such as
`JFK,EWR,LGA`.

#### A feature or field that I need is missing. What can I do?

Tell us in the **Issues** tab. Describe what you need and give an example
search.

#### Where can I report a problem?

Open an issue in the **Issues** tab. Include the run ID and the input, so that
we can reproduce it.

### Similar Actors

- [Google Hotels & Vacation Scraper](https://apify.com/kaix/google-hotels-scraper).
  Google Hotels and vacation rentals with price, hotel class, guest rating, and
  amenity filters, booking links, and reviews.
- [Booking Hotels Scraper](https://apify.com/kaix/booking-hotel-scraper). Booking
  hotel profiles, guest reviews, facilities, photos, nearby places, and stay
  availability.
- [Airbnb Scraper](https://apify.com/kaix/airbnb-listing-scraper). Airbnb
  listings by URL, listing ID, or location search, with full listing details.
- [Google Maps Scraper](https://apify.com/kaix/google-maps-places-scraper).
  Google Maps places with photos, review breakdowns, contacts, and coordinates.
- [TripAdvisor Places Scraper](https://apify.com/kaix/tripadvisor-places-scraper).
  TripAdvisor hotels, restaurants, and things to do for cities and supported
  neighborhoods.

# Actor input Schema

## `flightUrl` (type: `string`):

Optional HTTPS Google Flights URL from google.com or www.google.com. Supports airport searches with tfs, or q text such as Flights from SFO to LAX on 2027-08-15. The URL replaces Flight Searches and Trip Type. Explicit passenger, cabin, currency, country, and language values override the URL values. City/place IDs, selected-flight links, and encoded filters are not supported. Invalid URLs stop the run. Blank or null means unset.

## `searches` (type: `array`):

List of specific flight searches to run. Each entry contains origin, destination, departureDate, and an optional returnDate. Each endpoint accepts one IATA airport code, a comma-separated list, or an array of codes. Codes are trimmed, uppercased, and deduplicated. Airport groups stay in one search. Invalid independent entries are skipped without discarding valid siblings. An explicit empty list is a no-op unless Explore From is set; omission uses the sample route. At most 20 entries are processed. Multi-city is one coupled journey, so an invalid or oversized leg list is skipped as a whole; returnDate is ignored for multi-city legs. Google Flights URL takes precedence.

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

Trip type for Flight Searches. Independent entries are resolved from their own returnDate, so one-way and round-trip routes can share a batch. Multi-city processes the supplied entries as one ordered journey. Search-only settings are accepted and ignored when no Flight Search runs.

## `exploreOrigin` (type: `string`):

IATA airport code to explore priced destinations from. Clear Flight Searches to run Explore only.

## `tripDuration` (type: `string`):

How long the flexible-date trip should be when Explore From is set. Otherwise this setting is accepted and ignored.

## `exploreMonth` (type: `string`):

Explore the next six months or a named calendar month when Explore From is set. Otherwise this setting is accepted and ignored.

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

Cabin class preference.

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

Number of adult passengers, from 1 to 9. Passenger fields keep their individual ranges without a combined-total input gate.

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

Number of child passengers.

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

Number of infants traveling on an adult's lap, from 0 to 9. The value is passed through without a cross-field comparison to Adults.

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

Number of infants traveling in their own seat. Applies to Search and Explore.

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

Three-letter currency code used for returned prices and maxPrice. Codes are trimmed and uppercased. Any canonical three-letter code is preserved; malformed values warn and use USD.

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

Two-letter country code used for Google Flights search settings, such as US, GB, or SE. Codes are trimmed and uppercased; UK becomes GB. This does not change the proxy country. Invalid values warn and use US.

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

Language code used for search results, such as en-US, sv, or de. Valid language tags are normalized. Invalid values warn and use en-US. Applies to flight, calendar, destination, and booking requests.

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

Maximum number of stops. Blank or unsupported values are treated as unset with a warning.

## `maxPrice` (type: `number`):

Maximum total price in the selected currency.

## `maxDuration` (type: `number`):

Maximum duration per flight leg, in minutes.

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

Filter by caller-supplied airline IATA codes or alliance names (e.g. UA, AA, ONEWORLD). Values are trimmed and uppercased; blank or non-string entries are ignored with a warning.

## `departureTimeEarliest` (type: `string`):

Earliest local departure time as a real numeric hour or HH:MM value. If it is later than the latest time, the range crosses midnight.

## `departureTimeLatest` (type: `string`):

Latest local departure time as a real numeric hour or HH:MM value. A plain hour includes that full hour; a value earlier than the earliest time ends an overnight range.

## `arrivalTimeEarliest` (type: `string`):

Earliest local arrival time as a real numeric hour or HH:MM value. If it is later than the latest time, the range crosses midnight.

## `arrivalTimeLatest` (type: `string`):

Latest local arrival time as a real numeric hour or HH:MM value. A plain hour includes that full hour; a value earlier than the earliest time ends an overnight range.

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

How to sort Flight Search results. When no Flight Search runs, this setting is accepted and ignored.

## `showAllResults` (type: `boolean`):

Return more available Flight Search choices before applying filters. When no Flight Search runs, this setting is accepted and ignored. Round-trip and multi-city results include one complete set of earlier legs plus available alternatives for the final leg; they do not list every possible leg combination.

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

Maximum number of flight rows for each independent route, or for the complete multi-city journey. Applied after filtering and sorting, before booking lookups. Omit or use null to keep all returned flights. Calendar and destination records do not count. Invalid active limits stop the run.

## `maxBookingDetails` (type: `integer`):

Maximum number of flight rows for which booking details are requested per route or complete journey. Requires Include Booking Details. Only rows with a booking token count. Failed lookups count toward the limit. Zero disables lookups; omitted or null keeps the existing unlimited behavior. All selected flight rows remain in output.

## `includeCalendarPrices` (type: `boolean`):

Attempt one-way or round-trip calendar prices when Flight Search work runs. With no Flight Search, this setting is accepted and ignored. For multi-city, Calendar uses the first supplied route. Calendar failures produce a warning and keep any flight results. Prices attach to the first flight result, or are returned as a calendar record when no matching flight is returned.

## `calendarMode` (type: `string`):

Used only when Include Calendar Prices is enabled; otherwise accepted and ignored. Graph checks a forward window. Grid checks a centered window. Picker requests date pairs and uses returnDate when available. Defaults are 61 days for Graph and Picker, and 7 days for Grid. Calendar-specific failures warn without discarding flight results.

## `calendarDays` (type: `number`):

Number of dates or Picker date pairs to check. Used only when Include Calendar Prices is enabled; otherwise accepted and ignored. Runtime truncates the value, clamps it to 1–90, and normalizes Grid to an odd window. Defaults to 61 for Graph and Picker, or 7 for Grid.

## `includeBookingDetails` (type: `boolean`):

Attempt booking choices, prices, baggage-policy links, and booking forms for returned flights that contain booking tokens. With no eligible flight row, this setting is accepted and produces no booking output. Booking failures warn and keep the flight row. This can add significant runtime when many itineraries are returned.

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

Optional connection settings for this run. The default works for most runs.

## Actor input object example

```json
{
  "tripDuration": "1-week",
  "exploreMonth": "next-6-months",
  "cabinClass": "economy",
  "adults": 1,
  "children": 0,
  "infantsOnLap": 0,
  "infantsInSeat": 0,
  "currency": "USD",
  "country": "US",
  "language": "en-US",
  "sortBy": "best",
  "showAllResults": false,
  "includeCalendarPrices": false,
  "calendarMode": "graph",
  "includeBookingDetails": false,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

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

Actor result records. Consumers must handle missing, extra, or changed fields.

# 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 = {
    "cabinClass": "economy",
    "adults": 1,
    "children": 0,
    "infantsOnLap": 0,
    "infantsInSeat": 0,
    "currency": "USD",
    "country": "US",
    "language": "en-US",
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("kaix/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 = {
    "cabinClass": "economy",
    "adults": 1,
    "children": 0,
    "infantsOnLap": 0,
    "infantsInSeat": 0,
    "currency": "USD",
    "country": "US",
    "language": "en-US",
    "proxyConfiguration": { "useApifyProxy": True },
}

# Run the Actor and wait for it to finish
run = client.actor("kaix/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 '{
  "cabinClass": "economy",
  "adults": 1,
  "children": 0,
  "infantsOnLap": 0,
  "infantsInSeat": 0,
  "currency": "USD",
  "country": "US",
  "language": "en-US",
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}' |
apify call kaix/google-flights-scraper --silent --output-dataset

```

## MCP server setup

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