# 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:** [ScrapeBadger](https://apify.com/scrape.badger) (community)
- **Categories:** Travel
- **Stats:** 10 total users, 1 monthly users, 97.4% runs succeeded, 0 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/actors/running/actors-in-store.md#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

### 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",
  "return_date": "2026-06-22",
  "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",
    "return_date": "2026-06-22"
};

// 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",
    "return_date": "2026-06-22",
}

# 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(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 '{
  "departure_id": "JFK",
  "arrival_id": "LHR",
  "outbound_date": "2026-06-15",
  "return_date": "2026-06-22"
}' |
apify call scrape.badger/google-flights-scraper --silent --output-dataset

```

## MCP server setup

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