# Google Flights Fare & Itinerary Filter Scraper (`vexaloom-labs/google-flights-fare-and-itinerary-filter-scraper`) Actor

Search Google Flights for one-way or round-trip fares across any cabin class, then narrow results by stops, total duration, airline, and price range, with an optional price-alert flag.

- **URL**: https://apify.com/vexaloom-labs/google-flights-fare-and-itinerary-filter-scraper.md
- **Developed by:** [vexaloom-labs](https://apify.com/vexaloom-labs) (community)
- **Categories:** Travel, Automation, Developer tools
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.49 / 1,000 results

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 Fare & Itinerary Filter Scraper

Search Google Flights for a route and date and get one structured record per itinerary — fare, airline, flight numbers, local departure and arrival times, duration, stops, layovers, aircraft, CO2 estimate and a link to open the itinerary on Google Flights. Works for one-way and round-trip searches in 71 currencies, 186 countries and 73 languages. No login, no cookies, no proxy setup.

### What this actor does

- Searches Google Flights by airport or city code (one code per side; use `searches` for alternate airports)
- Returns one-way and round-trip fares, with optional return-flight options for the top outbound choices
- Filters by stops, airline include/exclude, cabin, passengers, price range, total duration, departure/arrival time window and lower-emission itineraries
- Adds a **Price calendar** mode with up to 61 daily fares starting on the departure date (also capped by `maxResults`)
- Produces a booking deep link for one-way itineraries and for every return option
- Supports batch searches, so one run can cover several routes and dates
- Empty fields are omitted from records

### Output per flight

- `price`, `currency` — total for all passengers in the selected currency; a round-trip price is the trip total
- `airline`, `airlineCode`, `airlines[]`, `airlineCodes[]`, `operatingAirlines[]`
- `flightNumber`, `flightNumbers[]` — marketing flight numbers (e.g. `BA178`)
- `departureAirport`, `departureAirportName`, `departureDate`, `departureTime`, `departureDateTime`
- `arrivalAirport`, `arrivalAirportName`, `arrivalDate`, `arrivalTime`, `arrivalDateTime`
- `durationMinutes`, `stops`, `layovers[]` (airport, airport name, city, minutes)
- `segments[]` — per-flight airline, flight number, codeshares, airports, local times, duration, aircraft, legroom and CO2 grams
- `emissionsGrams`, `typicalEmissionsGrams` — Google's CO2 estimate for the itinerary and a typical flight on the route; `emissionsDeltaPercent` when Google supplies it
- `bookingUrl` — opens this exact itinerary on Google Flights (one-way rows and return options)
- `googleFlightsUrl` — opens the selected outbound and its return choices on Google Flights
- `itineraryId`, `isBest`, `rank`, `searchId`
- `priceInsights` — current lowest, typical low, history low/high and the difference from typical, when Google provides it
- `returnOptions[]` — return-flight itineraries (`recordType: "returnOption"`) with segments, price, duration and a booking link (when requested)
- `pricePerHour`, `priceBelowThreshold` (when a threshold is set), `cabin`, `outboundDate`, `returnDate`
- `recordType: "flight"`, `scrapedAt`

#### Output per calendar day (mode = `calendar`)

- `recordType: "priceCalendarDay"`, `date`, `price`, `currency`, `isCheapest` (true for every day tied at the lowest price)
- `originAirport`, `destinationAirport`, `outboundDate`, `returnDate`, `searchId`, `scrapedAt`

### Input

| Field | Type | Default | Description |
|---|---|---|---|
| `mode` | string | `search` | `search` for itineraries, `calendar` for a daily price graph |
| `originAirport` | string | `JFK` | Airport or city code (one per search; comma lists are not combined) |
| `destinationAirport` | string | `LHR` | Airport or city code (one per search; comma lists are not combined) |
| `outboundDate` | string | – | `YYYY-MM-DD`; when empty, defaults to 30 days from today (UTC) and logs the chosen date |
| `returnDate` | string | – | `YYYY-MM-DD`; empty means one-way |
| `adults` | int | `1` | 1–9 |
| `children` | int | `0` | 0–8 |
| `infants` | int | `0` | Lap infants, 0–8; cannot exceed adults |
| `infantsInSeat` | int | `0` | Infants in their own seat, 0–8 |
| `cabinClass` | enum | `economy` | `economy` / `premium_economy` / `business` / `first` |
| `currency` | enum | `USD` | 71 currencies |
| `language` | enum | `en` | 73 languages |
| `country` | enum | `US` | 186 countries |
| `maxStops` | enum | `any` | `any` / `nonstop` / `one_stop` / `two_or_fewer` |
| `airlines` | array | `[]` | IATA codes to keep; codeshare partners count |
| `excludeAirlines` | array | `[]` | IATA codes to remove |
| `minPrice` / `maxPrice` | int | – | Price range in the selected currency |
| `maxDurationMinutes` | int | – | Maximum total journey time, layovers included |
| `departureTimeRange` | enum | `any` | `any` / `00-06` / `06-12` / `12-18` / `18-24` local time |
| `arrivalTimeRange` | enum | `any` | Same windows for the final arrival |
| `lessEmissions` | bool | `false` | Keep lower-emission itineraries |
| `sortBy` | enum | `top` | `top` / `cheapest` / `fastest` / `earliestDeparture` / `latestDeparture` / `lowestEmissions` |
| `maxResults` | int | `61` | 1–200 rows |
| `returnOptionsTop` | int | `0` | Round trips: fetch returns for this many outbounds |
| `returnOptionsPerOutbound` | int | `5` | Maximum return options per outbound |
| `includePriceInsights` | bool | `true` | Add Google's price-range insight when available |
| `priceGraphDays` | int | `61` | Calendar days from the departure date, 1–61; each day is its own search; also capped by `maxResults` |
| `priceAlertThreshold` | number | – | Adds `priceBelowThreshold` in the selected currency |
| `searches` | array | – | Optional batch of `{originAirport,destinationAirport,outboundDate,returnDate}` objects, up to 20 |

#### Example: nonstop business class, London to New York

```json
{
  "originAirport": "LHR",
  "destinationAirport": "JFK",
  "outboundDate": "2026-12-01",
  "returnDate": "2026-12-10",
  "cabinClass": "business",
  "maxStops": "nonstop",
  "returnOptionsTop": 3,
  "includePriceInsights": true
}
```

#### Example: cheapest economy fares to Tokyo

```json
{
  "originAirport": "SFO",
  "destinationAirport": "HND",
  "outboundDate": "2027-03-10",
  "cabinClass": "economy",
  "sortBy": "cheapest",
  "maxResults": 25
}
```

#### Example: price calendar for the next two months

```json
{
  "mode": "calendar",
  "originAirport": "NYC",
  "destinationAirport": "LON",
  "outboundDate": "2026-12-20",
  "priceGraphDays": 61
}
```

#### Example: several routes in one run

```json
{
  "mode": "search",
  "currency": "EUR",
  "country": "DE",
  "searches": [
    {"originAirport": "FRA", "destinationAirport": "JFK", "outboundDate": "2026-12-01"},
    {"originAirport": "AMS", "destinationAirport": "SIN", "outboundDate": "2026-12-15", "returnDate": "2027-01-05"}
  ]
}
```

### Use cases

- **Fare monitoring** — schedule a route and compare today's fares with yesterday's
- **Corporate travel** — benchmark business-class fares across carriers on a fixed route
- **Travel deals** — sort by cheapest and filter to nonstop or low-emission options
- **Fare calendars** — collect a daily price curve before choosing travel dates
- **Route analysis** — compare airlines, aircraft, layovers and CO2 on the same city pair
- **Multi-market research** — query the same route in different currencies and countries

### Limitations

- **Multi-city trips are not available** from Google's public search page. Run each leg as a separate one-way search; those are separate tickets, not a single through-fare.
- **Comma-separated airport lists are not combined.** Only the first code in a field is searched; add one `searches` entry per airport or city.
- **The booking-options panel (sellers, fare brands, bag fees) is not included.** Google loads it separately after the itinerary page. Open `bookingUrl` to see it on Google Flights.
- **The public page returns a subset of Google's full board** — observed 9–65 itineraries per search in our 2026-10 tests, varying by route (65 on SYD–MEL). `maxResults` caps the output; the full board may still be larger.
- **Explore destinations and the date-grid calendar are not included**; both are loaded separately by Google.
- **Premium and first-class searches sometimes have no price insight**, and Google occasionally lists a schedule without a fare. Those unpriced rows are skipped.
- Prices are a snapshot and are not guaranteed at booking time.

### FAQ

**Do I need cookies, a Google account, or an API key?** No. The actor reads public search pages without signing in.

**Do I need to configure a proxy?** No. The actor chooses a working connection to Google Flights automatically. Just fill in the input and run it.

**Why does a round-trip record show only the outbound flight?** Google lists round trips as outbound choices priced for the whole trip. Set `returnOptionsTop` to attach the actual return flights for the top outbound options.

**Where are the airline sellers and baggage fees?** They are behind Google's separate booking panel. The actor gives you a `bookingUrl` that opens the exact itinerary on Google Flights, where the sellers and bag rules are shown.

**Why do I get fewer rows than on Google Flights?** The public results page lists a subset of the full board; `maxResults` caps the actor's output further. This is a source limit, not a filter error.

**How fresh are the prices?** They are read when the run executes. Google prices change frequently and are advisory until purchase.

**Can I search several airports or cities at once?** Use the `searches` list. Each entry takes one airport or city code per side; comma-separated codes in one field are not combined (only the first is searched).

**How does the price calendar work?** Calendar mode searches each departure date separately and keeps the cheapest matching fare. Each date starts at `outboundDate` and moves forward, `priceGraphDays` sets the window, and `maxResults` also caps the number of days. The rows are real future fares, not past price estimates.

**What happens if I leave the departure date empty?** The actor uses 30 days from today in UTC and logs the date it chose, so saved tasks keep producing results without a fixed date. You can always set an exact date.

**Is this affiliated with Google?** No. This is an independent third-party actor that reads publicly available Google Flights search results.

# Actor input Schema

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

Search flights, or collect the cheapest fare for each date around your departure date.

## `originAirport` (type: `string`):

Three-letter IATA airport or city code, e.g. JFK, LHR, NYC. One code per search; use `searches` for alternate airports.

## `destinationAirport` (type: `string`):

Three-letter IATA airport or city code, e.g. LHR, HND, LON. One code per search; use `searches` for alternate airports.

## `outboundDate` (type: `string`):

Departure date in YYYY-MM-DD format. Leave empty to use 30 days from today (UTC); the chosen date is logged.

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

Return date in YYYY-MM-DD format. Leave empty for a one-way search.

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

Travellers aged 12 and over (1-9).

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

Travellers aged 2-11 (0-8).

## `infants` (type: `integer`):

Infants under 2 travelling on an adult lap (0-8). Cannot exceed the number of adults.

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

Infants under 2 travelling in their own seat (0-8).

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

Cabin to search.

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

Currency for every price.

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

Language Google Flights uses for airport and airline names.

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

Country whose fares and availability Google should show.

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

Largest number of stops allowed on any leg.

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

Two-letter IATA airline codes to keep, e.g. \["BA","AA"]. Flights marketed by or codesharing with these airlines are kept. Empty means all airlines.

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

Two-letter IATA airline codes to remove, e.g. \["FR"].

## `minPrice` (type: `integer`):

Drop fares below this price, in the chosen currency.

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

Drop fares above this price, in the chosen currency.

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

Drop itineraries longer than this, including layovers.

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

Only departures in this local-time window.

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

Only arrivals in this local-time window.

## `lessEmissions` (type: `boolean`):

Keep itineraries Google marks as producing less CO2 than typical for the route.

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

How to order the returned flights.

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

Maximum number of flight or calendar rows to return; in calendar mode it also caps the number of days.

## `returnOptionsTop` (type: `integer`):

For round trips, fetch return flights for this many top outbound options. 0 turns this off.

## `returnOptionsPerOutbound` (type: `integer`):

How many return flights to attach to each selected outbound.

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

Add Google's current, typical and historical price range when available.

## `priceGraphDays` (type: `integer`):

Number of calendar days to return in price-calendar mode (1-61), starting on the departure date; also capped by maxResults.

## `priceAlertThreshold` (type: `number`):

When set, add a priceBelowThreshold flag to every fare in the chosen currency.

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

Optional list of searches to run in one go. Each item needs originAirport, destinationAirport, outboundDate and an optional returnDate. Up to 20.

## Actor input object example

```json
{
  "mode": "search",
  "originAirport": "JFK",
  "destinationAirport": "LHR",
  "outboundDate": "2026-12-10",
  "adults": 1,
  "children": 0,
  "infants": 0,
  "infantsInSeat": 0,
  "cabinClass": "economy",
  "currency": "USD",
  "language": "en",
  "country": "US",
  "maxStops": "any",
  "airlines": [],
  "excludeAirlines": [],
  "departureTimeRange": "any",
  "arrivalTimeRange": "any",
  "lessEmissions": false,
  "sortBy": "top",
  "maxResults": 1,
  "returnOptionsTop": 0,
  "returnOptionsPerOutbound": 5,
  "includePriceInsights": true,
  "priceGraphDays": 1
}
```

# Actor output Schema

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

Dataset containing the scraped Google Flights itineraries and price-calendar rows.

# 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 = {
    "mode": "search",
    "originAirport": "JFK",
    "destinationAirport": "LHR",
    "outboundDate": "2026-12-10",
    "adults": 1,
    "children": 0,
    "infants": 0,
    "infantsInSeat": 0,
    "cabinClass": "economy",
    "currency": "USD",
    "language": "en",
    "country": "US",
    "maxStops": "any",
    "airlines": [],
    "excludeAirlines": [],
    "departureTimeRange": "any",
    "arrivalTimeRange": "any",
    "lessEmissions": false,
    "sortBy": "top",
    "maxResults": 1,
    "returnOptionsTop": 0,
    "returnOptionsPerOutbound": 5,
    "includePriceInsights": false,
    "priceGraphDays": 1
};

// Run the Actor and wait for it to finish
const run = await client.actor("vexaloom-labs/google-flights-fare-and-itinerary-filter-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 = {
    "mode": "search",
    "originAirport": "JFK",
    "destinationAirport": "LHR",
    "outboundDate": "2026-12-10",
    "adults": 1,
    "children": 0,
    "infants": 0,
    "infantsInSeat": 0,
    "cabinClass": "economy",
    "currency": "USD",
    "language": "en",
    "country": "US",
    "maxStops": "any",
    "airlines": [],
    "excludeAirlines": [],
    "departureTimeRange": "any",
    "arrivalTimeRange": "any",
    "lessEmissions": False,
    "sortBy": "top",
    "maxResults": 1,
    "returnOptionsTop": 0,
    "returnOptionsPerOutbound": 5,
    "includePriceInsights": False,
    "priceGraphDays": 1,
}

# Run the Actor and wait for it to finish
run = client.actor("vexaloom-labs/google-flights-fare-and-itinerary-filter-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 '{
  "mode": "search",
  "originAirport": "JFK",
  "destinationAirport": "LHR",
  "outboundDate": "2026-12-10",
  "adults": 1,
  "children": 0,
  "infants": 0,
  "infantsInSeat": 0,
  "cabinClass": "economy",
  "currency": "USD",
  "language": "en",
  "country": "US",
  "maxStops": "any",
  "airlines": [],
  "excludeAirlines": [],
  "departureTimeRange": "any",
  "arrivalTimeRange": "any",
  "lessEmissions": false,
  "sortBy": "top",
  "maxResults": 1,
  "returnOptionsTop": 0,
  "returnOptionsPerOutbound": 5,
  "includePriceInsights": false,
  "priceGraphDays": 1
}' |
apify call vexaloom-labs/google-flights-fare-and-itinerary-filter-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,vexaloom-labs/google-flights-fare-and-itinerary-filter-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/8lx7PfBaJQLrtPwBv/builds/JMe14jW0FAs170tz8/openapi.json
