# Google Flights Scraper — Airfare, Routes, Prices (`scrape.badger/google-flights-scraper`) Actor

Scrape Google Flights at scale: one-way, round-trip, or multi-city itineraries with per-offer pricing, total duration, stops, layovers, airline metadata, and carbon emissions. Returns Google's Best flights recommendations plus the full Other flights result set.

- **URL**: https://apify.com/scrape.badger/google-flights-scraper.md
- **Developed by:** [Scrape Badger](https://apify.com/scrape.badger) (community)
- **Categories:** Travel
- **Stats:** 2 total users, 0 monthly users, 0.0% runs succeeded, NaN bookmarks
- **User rating**: No ratings yet

## Pricing

from $12.00 / 1,000 flight searches

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

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

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use 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

### What does Google Flights Scraper do?

Scrape [Google Flights](https://www.google.com/travel/flights) at scale — one-way, round-trip, and multi-city fares across all airlines, with cabin class, stops, and price filters.

### Why use Google Flights Scraper?

- **Every cabin class.** Economy, Premium Economy, Business, First.
- **One-way, round-trip, multi-city.** All Google Flights trip types.
- **Stops + airline filters.** Non-stop only, one-stop, or all; whitelist / blacklist airlines.
- **Currency + country targeting.** Local prices for your customer base.
- **Price insights.** When Google returns them — typical price range, lowest-price recent history.

### What data can Google Flights Scraper extract?

| Field | Type | Description |
|---|---|---|
| result_group | string | `best` or `other` |
| price / currency | number / string | Total fare |
| airline | string | Primary carrier |
| flights | array | Per-segment info (origin / dest / times / aircraft) |
| duration | string | Total journey time |
| stops | number | Layover count |
| layovers | array | Layover airport + duration |
| carbon_emissions | object | Google's CO2 estimate in kg |

### How to scrape Google Flights

1. Click **Try for free**.
2. Enter `departure_id` (IATA code, e.g. `JFK`) and `arrival_id` (e.g. `LAX`).
3. Set `outbound_date` (and `return_date` if round-trip).
4. Optional: passengers (`adults`, `children`, …), `travel_class`, `stops`, `max_price`, airline filters.
5. Click **Start** — each flight offer streams into the dataset.

### How much will it cost?

**$0.012 per search (≈ $12 per 1,000 searches).** One call per origin-destination-date combo. Multi-city is still one call.

#### Competitor benchmark

| Actor | Author | Price | Notes |
|---|---|---|---|
| kaizu/google-flights-scraper | kaizu | ~$15 / 1k searches | Most popular |
| credible_sandal/google-flights-scraper | credible_sandal | ~$18 / 1k searches | Subscription |
| scrapier/google-flights-scraper | scrapier | ~$20 / 1k searches | Per-result |
| **scrape-badger/google-flights-scraper** | **ScrapeBadger** | **$12 / 1k searches** | **20% below cheapest major** |

### Input

Configure the run in the **Input** tab above, or pass a JSON object matching the fields below when calling the Actor via the Apify API.

| Field | Required | Description |
|---|---|---|
| departure_id | ✅ | IATA airport code (e.g. `JFK`). |
| arrival_id | ✅ | IATA airport code. |
| outbound_date | ✅ | `YYYY-MM-DD`. |
| return_date | Round-trip only | `YYYY-MM-DD`. |
| trip_type | — | `round_trip` (default) / `one_way` / `multi_city`. |
| adults / children / infants_in_seat / infants_on_lap | — | Passenger counts. |
| travel_class | — | `economy` / `premium_economy` / `business` / `first`. |
| stops | — | `any` / `nonstop` / `one_stop` / `two_stops`. |
| max_price | — | Upper price cap in the target currency. |
| currency / gl / hl | — | Currency + country + language (defaults `USD` / `us` / `en`). |

### Output

Every successful run streams records into the run's dataset. Download as JSON, CSV, XML, Excel, or HTML from the **Dataset** tab; consume programmatically via the Apify API or webhooks.

Example record:

```json
{
  "result_group": "best",
  "price": 412,
  "currency": "USD",
  "airline": "Delta",
  "flights": [
    {
      "origin": "JFK",
      "destination": "LAX",
      "departure": "2026-12-01T08:00",
      "arrival": "2026-12-01T11:15"
    }
  ],
  "duration": "6h 15m",
  "stops": 0,
  "layovers": [],
  "carbon_emissions": {
    "this_flight": 203,
    "typical_for_this_route": 215
  }
}
````

### Tips / Advanced options

- **Run daily for fare tracking.** Prices change hourly — a cron gets you a price history for free.
- **Nonstop = 2-3x the price of one-stop.** Filter on `stops: nonstop` only when your customer specifically needs it.
- **`best` vs. `other`.** `best` is Google's ranked top offers (by convenience + price). `other` is everything else — cheaper but often with worse timings.
- **Carbon emissions for ESG reporting.** Use the `carbon_emissions.this_flight` kg figure for scope-3 tracking.

### FAQ, Disclaimers, Support

#### What IATA codes do you support?

Every airport Google Flights supports (~8,000+). Major hubs + regional airports.

#### Can I search by city?

Google accepts city codes too — `NYC` instead of `JFK` returns all NYC airports. The actor passes through whatever you provide.

#### Does this include award / mileage fares?

No — Google Flights is cash-only. Use your airline's website for award availability.

#### Multi-city?

Yes — set `trip_type: multi_city` and pass an array of legs via the SDK. Apify UI doesn't expose the array input directly; use the API.

#### Disclaimer

This Actor scrapes public Google data only. You're responsible for compliance with Google's Terms of Service and any applicable data-protection laws (GDPR, CCPA, etc.) in your jurisdiction. ScrapeBadger does not store the scraped results — they are delivered directly to your Apify dataset.

#### Support

Something not working? Open a ticket in the **Issues** tab above — we triage within one business day. Full API reference: [docs.scrapebadger.com](https://docs.scrapebadger.com).

#### Related Actors

- [`google-hotels-scraper`](https://apify.com/scrape-badger/google-hotels-scraper) — Hotel search + details

#### Powered by

[ScrapeBadger](https://scrapebadger.com) — Google-optimised residential proxy pool + browser-farm fallback, 99.7% uptime, unmetered bandwidth. No CAPTCHAs reach you.

# Actor input Schema

## `departure_id` (type: `string`):

Departure airport IATA code (e.g. <b>JFK</b>, <b>LAX</b>, <b>LHR</b>) or Google location ID.

## `arrival_id` (type: `string`):

Arrival airport IATA code (e.g. <b>LHR</b>, <b>CDG</b>, <b>NRT</b>) or Google location ID.

## `outbound_date` (type: `string`):

Outbound date in <b>YYYY-MM-DD</b> format. Example: <b>2026-06-15</b>.

## `return_date` (type: `string`):

Return date in <b>YYYY-MM-DD</b> format. Required when <b>trip\_type</b> is <b>round\_trip</b>. Leave blank for one-way.

## `trip_type` (type: `string`):

Itinerary type: <b>round\_trip</b> (default), <b>one\_way</b>, or <b>multi\_city</b>.

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

Adult passengers (1-9).

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

Children passengers (0-8).

## `infants_in_seat` (type: `integer`):

Infants with their own seat (0-4).

## `infants_on_lap` (type: `integer`):

Infants travelling on an adult's lap (0-4).

## `travel_class` (type: `string`):

Cabin class to search.

## `stops` (type: `string`):

Maximum number of stops per leg.

## `max_price` (type: `integer`):

Upper price bound in the currency selected below. Optional.

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

ISO-4217 currency code. Example: <b>USD</b>, <b>EUR</b>, <b>GBP</b>.

## `gl` (type: `string`):

ISO 3166-1 alpha-2 country code (lowercase). Example: <b>us</b>, <b>gb</b>, <b>de</b>.

## `hl` (type: `string`):

ISO 639-1 language code. Example: <b>en</b>, <b>es</b>, <b>de</b>.

## Actor input object example

```json
{
  "departure_id": "JFK",
  "arrival_id": "LHR",
  "outbound_date": "2026-06-15",
  "trip_type": "round_trip",
  "adults": 1,
  "children": 0,
  "infants_in_seat": 0,
  "infants_on_lap": 0,
  "travel_class": "economy",
  "stops": "any",
  "currency": "USD",
  "gl": "us",
  "hl": "en"
}
```

# Actor output Schema

## `dataset` (type: `string`):

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

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

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "departure_id": "JFK",
    "arrival_id": "LHR",
    "outbound_date": "2026-06-15"
};

// Run the Actor and wait for it to finish
const run = await client.actor("scrape.badger/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 = {
    "departure_id": "JFK",
    "arrival_id": "LHR",
    "outbound_date": "2026-06-15",
}

# Run the Actor and wait for it to finish
run = client.actor("scrape.badger/google-flights-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "departure_id": "JFK",
  "arrival_id": "LHR",
  "outbound_date": "2026-06-15"
}' |
apify call scrape.badger/google-flights-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=scrape.badger/google-flights-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Google Flights Scraper — Airfare, Routes, Prices",
        "description": "Scrape Google Flights at scale: one-way, round-trip, or multi-city itineraries with per-offer pricing, total duration, stops, layovers, airline metadata, and carbon emissions. Returns Google's Best flights recommendations plus the full Other flights result set.",
        "version": "1.0",
        "x-build-id": "9vV42kgDowqzyahvn"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/scrape.badger~google-flights-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-scrape.badger-google-flights-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/scrape.badger~google-flights-scraper/runs": {
            "post": {
                "operationId": "runs-sync-scrape.badger-google-flights-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/scrape.badger~google-flights-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-scrape.badger-google-flights-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "required": [
                    "departure_id",
                    "arrival_id",
                    "outbound_date"
                ],
                "properties": {
                    "departure_id": {
                        "title": "Departure airport",
                        "type": "string",
                        "description": "Departure airport IATA code (e.g. <b>JFK</b>, <b>LAX</b>, <b>LHR</b>) or Google location ID."
                    },
                    "arrival_id": {
                        "title": "Arrival airport",
                        "type": "string",
                        "description": "Arrival airport IATA code (e.g. <b>LHR</b>, <b>CDG</b>, <b>NRT</b>) or Google location ID."
                    },
                    "outbound_date": {
                        "title": "Outbound date",
                        "type": "string",
                        "description": "Outbound date in <b>YYYY-MM-DD</b> format. Example: <b>2026-06-15</b>."
                    },
                    "return_date": {
                        "title": "Return date",
                        "type": "string",
                        "description": "Return date in <b>YYYY-MM-DD</b> format. Required when <b>trip_type</b> is <b>round_trip</b>. Leave blank for one-way."
                    },
                    "trip_type": {
                        "title": "Trip type",
                        "enum": [
                            "round_trip",
                            "one_way",
                            "multi_city"
                        ],
                        "type": "string",
                        "description": "Itinerary type: <b>round_trip</b> (default), <b>one_way</b>, or <b>multi_city</b>.",
                        "default": "round_trip"
                    },
                    "adults": {
                        "title": "Adults",
                        "minimum": 1,
                        "maximum": 9,
                        "type": "integer",
                        "description": "Adult passengers (1-9).",
                        "default": 1
                    },
                    "children": {
                        "title": "Children",
                        "minimum": 0,
                        "maximum": 8,
                        "type": "integer",
                        "description": "Children passengers (0-8).",
                        "default": 0
                    },
                    "infants_in_seat": {
                        "title": "Infants in seat",
                        "minimum": 0,
                        "maximum": 4,
                        "type": "integer",
                        "description": "Infants with their own seat (0-4).",
                        "default": 0
                    },
                    "infants_on_lap": {
                        "title": "Infants on lap",
                        "minimum": 0,
                        "maximum": 4,
                        "type": "integer",
                        "description": "Infants travelling on an adult's lap (0-4).",
                        "default": 0
                    },
                    "travel_class": {
                        "title": "Cabin class",
                        "enum": [
                            "economy",
                            "premium_economy",
                            "business",
                            "first"
                        ],
                        "type": "string",
                        "description": "Cabin class to search.",
                        "default": "economy"
                    },
                    "stops": {
                        "title": "Stops filter",
                        "enum": [
                            "any",
                            "nonstop",
                            "one_stop",
                            "two_stops"
                        ],
                        "type": "string",
                        "description": "Maximum number of stops per leg.",
                        "default": "any"
                    },
                    "max_price": {
                        "title": "Max price",
                        "minimum": 0,
                        "type": "integer",
                        "description": "Upper price bound in the currency selected below. Optional."
                    },
                    "currency": {
                        "title": "Currency",
                        "type": "string",
                        "description": "ISO-4217 currency code. Example: <b>USD</b>, <b>EUR</b>, <b>GBP</b>.",
                        "default": "USD"
                    },
                    "gl": {
                        "title": "Country",
                        "type": "string",
                        "description": "ISO 3166-1 alpha-2 country code (lowercase). Example: <b>us</b>, <b>gb</b>, <b>de</b>.",
                        "default": "us"
                    },
                    "hl": {
                        "title": "Language",
                        "type": "string",
                        "description": "ISO 639-1 language code. Example: <b>en</b>, <b>es</b>, <b>de</b>.",
                        "default": "en"
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
