# Google Flights Scraper — Fares, Itineraries & Cheapest Dates (`crawloop/google-flights-scraper`) Actor

Google Flights scraper for one-way, round-trip, and multi-city itineraries plus a cheapest-date calendar. Export prices, airlines, stops, times, aircraft, CO2, and booking options as JSON. Call from Python, Node.js, or MCP — a Google Flights API alternative.

- **URL**: https://apify.com/crawloop/google-flights-scraper.md
- **Developed by:** [Andrej Kiva](https://apify.com/crawloop) (community)
- **Categories:** Travel, AI, Agents
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.79 / 1,000 itineraries

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

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

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

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

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

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

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

# README

## Google Flights Scraper — Fares, Itineraries & Cheapest Dates

> Unofficial tool for publicly accessible Google Flights search results. Google and Google Flights are trademarks of Google LLC. Not affiliated with, sponsored by, or endorsed by Google. For informational, research, and fare-monitoring use only. Respect applicable terms of use and law.

**Google Flights Scraper** ◄── you are here

**Google Flights scraper** for live **fares**, **itineraries**, and a **cheapest-date calendar**. Pull **one-way**, **round-trip**, or **multi-city** results into a JSON dataset: **price**, **airline**, **stops**, **times**, **aircraft**, **legroom**, **CO2**, **price insights**, and optional **booking options**. A practical **Google Flights API alternative** — scrape with **Python**, **Node.js**, **cURL**, or **Apify MCP**. No official API key. Export the dataset as JSON, CSV, or Excel from Apify.

Built for **fare alerts**, **OTA comparison**, **airline pricing snapshots**, and **AI travel agents**.

| Google Flights (fares & dates) | Airbnb (stays occupancy) |
| :--- | :--- |
| **Google Flights Scraper** ◄── you are here | [Airbnb Occupancy Scraper](https://apify.com/crawloop/airbnb-occupancy-monitor) |

### When to use this Actor

- You need a **Google Flights scraper** for one-way, round-trip, or multi-city itineraries as JSON
- You want a **cheapest-date calendar** (lowest fare per departure day) without one search per date
- You monitor a route on a schedule and store **price, stops, duration, CO2**
- You want a **Google Flights API alternative** from Python, Node.js, or an MCP / AI assistant
- You compare several origin/destination pairs in one run via **batch searches**

### When not to use this Actor

- **Stay occupancy / blocked nights** — use [Airbnb Occupancy Scraper](https://apify.com/crawloop/airbnb-occupancy-monitor)
- Live checkout, seat maps, or ticket purchase — public shopping results only
- Official airline GDS / NDC contracts (Amadeus, Sabre) — this Actor reads Google Flights, not a CRS

### Modes

| Mode | What it does |
| :--- | :--- |
| `search` | Itineraries for a date (best + other flights, not just the top few) |
| `calendar` | Lowest price per departure date across a window (one request per ~61 days) |
| `both` | Itineraries for the chosen date **and** the cheapest-date grid |

### Key features

- **HTTP only** — shopping + calendar endpoints (no browser, no CAPTCHA solver)
- **Full result set** — Google's best bucket plus the rest of the ranked list
- **One-way, round-trip, multi-city** — comma-separated metros (`JFK,EWR`) supported
- **Cheapest-date calendar** — flag `isCheapest` on the low day(s) in the window
- **Filters** — stops, airlines include/exclude, cabin, max price, duration, bags, sort
- **Nested JSON** — per-segment aircraft, flight number, legroom, layovers, CO2
- **Optional booking options** — airline/OTA seller, fare name, booking URL
- **Price insights** — lowest / typical / usual range when Google sends them
- **Residential proxy** recommended — Google often returns empty lists to datacenter IPs
- **MCP / AI ready** — call from assistants via Apify MCP

### Input

| Parameter | Description |
| :--- | :--- |
| `mode` | `search` / `calendar` / `both` |
| `origin` / `destination` | IATA codes (comma-separated metros ok) |
| `departDate` / `returnDate` | `YYYY-MM-DD`; omit return for one-way |
| `multiCityLegs` | `ORIGIN-DEST-YYYY-MM-DD` rows; overrides the single route |
| `searches` | Extra `{origin, destination, departDate, returnDate}` objects |
| `cabinClass` / `adults` / `children` / infants | Passenger mix |
| `maxStops` / `airlines` / `maxPrice` / `sortBy` | Filters |
| `calendarDays` / `calendarFrom` / `calendarTo` | Date grid window |
| `resolveBookingOptions` | Extra request per top itinerary |
| `maxItems` | Cap on itinerary rows (calendar rows follow the date window) |
| `currency` / `market` / `language` | `curr` / `gl` / `hl` |
| `proxyConfiguration` | Use **Apify Residential** (US) |

#### Example — JFK → LAX one-way

```json
{
  "mode": "search",
  "origin": "JFK",
  "destination": "LAX",
  "departDate": "2026-09-20",
  "adults": 1,
  "cabinClass": "economy",
  "maxItems": 50,
  "currency": "USD",
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": ["RESIDENTIAL"],
    "apifyProxyCountry": "US"
  }
}
```

#### Example — cheapest dates, round-trip week

```json
{
  "mode": "calendar",
  "origin": "LHR",
  "destination": "JFK",
  "departDate": "2026-10-01",
  "calendarDays": 60,
  "calendarTripDays": 7,
  "cabinClass": "economy",
  "currency": "GBP",
  "market": "GB"
}
```

### Output

One dataset row per itinerary or calendar date. Download as JSON, CSV, or Excel from the run dataset.

| Field | Description |
| :--- | :--- |
| `type` | `itinerary` or `calendar_date` |
| `bucket` | `best` or `other` (search mode) |
| `price` / `currency` | Displayed fare |
| `airline` / `airlineName` | Primary carrier |
| `origin` / `destination` | IATA |
| `departAt` / `arriveAt` | Local times |
| `stops` / `durationMinutes` | Routing |
| `legs` | Per-segment aircraft, flight number, legroom, CO2 |
| `layovers` | Wait, overnight, change-of-airport |
| `co2Grams` / `emissionsTag` | Itinerary carbon vs typical |
| `priceInsights` | Lowest / typical / usual high-low |
| `bookingToken` / `bookingOptions` | Handoff + optional OTA list |
| `isCheapest` | Calendar row is the low date in the window |
| `flightsUrl` | Google Flights search link |

#### Example itinerary (abbreviated)

```json
{
  "type": "itinerary",
  "bucket": "best",
  "price": 178,
  "currency": "USD",
  "airline": "B6",
  "airlineName": "JetBlue",
  "origin": "JFK",
  "destination": "LAX",
  "departAt": "2026-09-20T12:00",
  "arriveAt": "2026-09-20T18:30",
  "stops": 1,
  "durationMinutes": 567,
  "legs": [
    {
      "origin": "JFK",
      "destination": "FLL",
      "airline": "B6",
      "flightNumber": "2201",
      "aircraft": "Airbus A321",
      "legroom": "32 inches"
    }
  ]
}
```

### Use cases

| Use case | What you get |
| :--- | :--- |
| **Fare-alert products** | Schedule a route and notify when the cheapest itinerary drops |
| **Travel apps / OTAs** | Seed a comparison page without an enterprise GDS contract |
| **Airline pricing teams** | Snapshot competitor fares, stops, cabin mix, and CO2 |
| **Cheapest-month content** | Calendar grid for “cheapest dates to fly X→Y” |
| **AI travel agents** | Ranked JSON via Apify MCP for trip-planning prompts |
| **Batch route watch** | Several origin/destination pairs in one run |

### Integration examples

#### Node.js

```javascript
import { ApifyClient } from 'apify-client';

const client = new ApifyClient({ token: process.env.APIFY_TOKEN });
const run = await client.actor('crawloop/google-flights-scraper').call({
  origin: 'JFK',
  destination: 'LAX',
  departDate: '2026-09-20',
  maxItems: 40,
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items.slice(0, 5));
```

#### Python

```python
from apify_client import ApifyClient

client = ApifyClient(token="YOUR_TOKEN")
run = client.actor("crawloop/google-flights-scraper").call(run_input={
    "origin": "JFK",
    "destination": "LAX",
    "departDate": "2026-09-20",
    "maxItems": 40,
})
items = client.dataset(run["defaultDatasetId"]).list_items().items
print(items[:5])
```

#### cURL

```bash
curl "https://api.apify.com/v2/acts/crawloop~google-flights-scraper/runs?token=YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d "{\"origin\":\"JFK\",\"destination\":\"LAX\",\"departDate\":\"2026-09-20\",\"maxItems\":40}"
```

### MCP and AI assistants

Use this Actor from AI tools via [Apify MCP](https://docs.apify.com/platform/integrations/mcp).
Connect your Apify account, then call this Actor by its Store ID / name.

Example prompts:

- "Run Google Flights Scraper for JFK to LAX on 2026-09-20 and return the 20 cheapest itineraries as JSON"
- "Scrape Google Flights calendar for LHR-JFK over the next 60 days and list the cheapest dates"
- "Chain Google Flights Scraper then Airbnb Occupancy Scraper for a long-weekend in Los Angeles"

### Suite next step

After you have fares, measure **stay occupancy** at the destination with [Airbnb Occupancy Scraper](https://apify.com/crawloop/airbnb-occupancy-monitor) — listing calendars, occupancy %, and booking pace.

### FAQ

**Is there an official Google Flights API?**\
No public one. This Actor is a Google Flights API alternative that reads the same shopping and calendar results the website uses. Call it from Python, Node.js, cURL, or MCP.

**Can I scrape Google Flights with Python or Node.js?**\
Yes. Use the Apify client examples above, or start a run from the Console and download the dataset.

**Why residential proxy?**\
Google often serves empty itinerary lists to datacenter IPs. US residential is on by default.

**Does round-trip return a combined outbound+return itinerary?**\
The first shopping page prices **outbound options as round-trips** (same as the website). Return-leg expansion per outbound is not a separate row type in this version.

**City names or only IATA?**\
Use IATA / metro codes (`JFK`, `LON`, `NYC`). Comma-separate several airports.

**How do I export CSV or Excel?**\
Every run writes a dataset. In Apify Console, open the dataset and export JSON, CSV, or Excel.

### Related Actors

- [Airbnb Occupancy Scraper](https://apify.com/crawloop/airbnb-occupancy-monitor) — public availability calendars and occupancy %

# Actor input Schema

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

search = itineraries for specific dates; calendar = cheapest price per departure date; both = itineraries plus the date grid.

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

Origin IATA airport or metro codes. Comma-separate for multi-airport search, e.g. JFK,EWR.

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

Destination IATA airport or metro codes. Comma-separate for multi-airport search, e.g. LAX,BUR.

## `departDate` (type: `string`):

YYYY-MM-DD. Defaults to about 30 days from today if empty.

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

YYYY-MM-DD. Leave empty for one-way; set for round-trip (outbound rows carry round-trip prices).

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

Overrides origin/destination when set. One ORIGIN-DEST-YYYY-MM-DD per line, e.g. JFK-LHR-2026-09-20.

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

Optional extra routes. Each object can set origin, destination, departDate, returnDate. Shared passenger/cabin/filter fields still apply.

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

Number of adult passengers.

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

Children aged 2–11.

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

Infants occupying a seat.

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

Infants on lap.

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

Cabin to price.

## `maxStops` (type: `integer`):

0 = nonstop only, 1 = one stop or fewer, 2 = two stops or fewer. Empty = any.

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

Only these IATA airline codes, e.g. DL, AA. Empty = all.

## `airlinesExclude` (type: `array`):

Drop these IATA airline codes.

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

Only itineraries at or below this price in the selected currency.

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

Drop itineraries longer than this total duration.

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

Google Flights sort mode for the shopping result set.

## `excludeBasicEconomy` (type: `boolean`):

Hide basic-economy fares when Google exposes the filter.

## `checkedBags` (type: `integer`):

Include this many checked bags in the displayed price when Google supports bag-adjusted fares.

## `carryOn` (type: `boolean`):

Ask Google to include carry-on in the displayed price.

## `calendarFrom` (type: `string`):

Start of the cheapest-date window (YYYY-MM-DD). Defaults to departure date.

## `calendarTo` (type: `string`):

End of the cheapest-date window (YYYY-MM-DD). Defaults to calendarFrom + calendarDays.

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

Length of the cheapest-date window when calendarTo is empty (1–305). Google serves ~61 days per request.

## `calendarTripDays` (type: `integer`):

Stay length used for a round-trip calendar when returnDate is empty. Ignored when returnDate is set.

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

For the top itineraries, fetch who sells the fare (airline/OTA) with price, fare name, and booking URL. Extra HTTP per itinerary.

## `maxBookingItineraries` (type: `integer`):

How many top itineraries to resolve when booking options are on.

## `maxItems` (type: `integer`):

Cap on itinerary rows. Calendar dates follow the date window (not this cap) when mode is calendar or both.

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

ISO 4217 code requested from Google Flights (USD, EUR, GBP, …).

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

Google country code, e.g. US, GB, DE.

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

Google language code, e.g. en, de, es.

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

Residential proxy is recommended. Google often returns empty itineraries to datacenter IPs.

## Actor input object example

```json
{
  "mode": "search",
  "origin": "JFK",
  "destination": "LAX",
  "departDate": "2026-09-20",
  "adults": 1,
  "children": 0,
  "infantsInSeat": 0,
  "infantsOnLap": 0,
  "cabinClass": "economy",
  "sortBy": "best",
  "excludeBasicEconomy": false,
  "carryOn": false,
  "calendarDays": 30,
  "calendarTripDays": 7,
  "resolveBookingOptions": false,
  "maxBookingItineraries": 10,
  "maxItems": 100,
  "currency": "USD",
  "market": "US",
  "language": "en",
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ],
    "apifyProxyCountry": "US"
  }
}
```

# Actor output Schema

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

Default dataset items.

# 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": "JFK",
    "destination": "LAX",
    "departDate": "2026-09-20",
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ],
        "apifyProxyCountry": "US"
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("crawloop/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": "JFK",
    "destination": "LAX",
    "departDate": "2026-09-20",
    "proxyConfiguration": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
        "apifyProxyCountry": "US",
    },
}

# Run the Actor and wait for it to finish
run = client.actor("crawloop/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": "JFK",
  "destination": "LAX",
  "departDate": "2026-09-20",
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ],
    "apifyProxyCountry": "US"
  }
}' |
apify call crawloop/google-flights-scraper --silent --output-dataset

```

## MCP server setup

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