# Google Flights — Fares & Multi-City (`madeingermany/google-flights-scraper`) Actor

Google Flights scraper for real-time fare monitoring and price comparison. Extracts airlines, schedules, duration, stops, baggage, and carbon emissions.

- **URL**: https://apify.com/madeingermany/google-flights-scraper.md
- **Developed by:** [Made In Germany](https://apify.com/madeingermany) (community)
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.00 / 1,000 results

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?

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 — Real-Time Fares, Multi-City Itineraries & Airline Routes

A high-performance, production-grade **Google Flights Scraper** built for fast fare monitoring, price tracking, and route analysis. Unlike heavy browser-based scrapers that consume massive memory and CPU, this Actor uses a **pure HTTP fast-path architecture** (powered by Crawlee, `got-scraping`, and Chrome TLS fingerprinting) to retrieve real-time flight data up to **10x faster and 80% cheaper**.

***

### 💰 Pricing (Pay-Per-Event)

This actor operates on a pay-as-you-go **Pay-Per-Event (PPE)** pricing model. You only pay for what you extract:

| Event Name | Purpose | Price (USD) | Description |
|---|---|---|---|
| **`apify-actor-start`** | Actor Start | `$0.005` | Charged when the Actor starts running. Number of events charged depends on Actor memory (one event per GB, minimum one event). |
| **`apify-default-dataset-item`** | result | `$0.002` | Single result in the default dataset. |
| **`additional-data`** | Additional data | `$0.0001` | Charged for additional data |

***

### ⚡ Why Use This Google Flights Scraper?

- **Ultra-Fast & Resource-Efficient**: Pure HTTP engine extracts flight itineraries directly without spinning up heavy Chromium instances.
- **Complete Flight Results**: Extracts both "Best flights" and extended "Other flights", giving you full visibility into all available fares, not just the top 2 options.
- **Rich Flight Metadata**:
  - Airline name & flight numbers
  - Departure & arrival timestamps, dates, and airport codes
  - Flight duration in minutes & formatted text
  - Exact stop counts & layover details
  - Included baggage allowance (carry-on & checked bags)
  - Carbon emissions (kg CO2e) & comparison against route average
  - Live ticket pricing & currency support (USD, EUR, GBP, and more)
- **Pay-Per-Event (PPE) Pricing**: Pay only for what you scrape ($0.005 per run start + $0.002 per extracted flight record). Zero wasted compute.
- **Anti-Bot Resilient**: Built-in HTTP/2 framing, TLS fingerprinting (Chrome 130+), header emulation, and optional residential proxy rotation.

***

### 📥 Input Parameters

| Parameter | Type | Required | Default | Description |
| :--- | :--- | :---: | :--- | :--- |
| `startUrls` | Array | No | *Sample search URL* | List of direct Google Flights search result URLs. |
| `searchQuery` | String | No | `"LAX to JFK 2026-10-15"` | Free-text search query (e.g. `LAX to JFK 2026-10-15`). Used if `startUrls` is omitted. |
| `currency` | String | No | `"USD"` | Desired currency for prices (e.g. `USD`, `EUR`, `GBP`). |
| `maxItems` | Integer | No | `50` | Maximum number of flight itineraries to collect (up to 50,000). |
| `proxy` | Object | No | `{ "useApifyProxy": true, "apifyProxyGroups": ["RESIDENTIAL"] }` | Proxy configuration. Residential proxies are recommended for heavy usage. |

#### Sample Input JSON

```json
{
  "startUrls": [
    {
      "url": "https://www.google.com/travel/flights?q=Flights%20to%20JFK%20from%20LAX%20on%202026-10-15"
    }
  ],
  "searchQuery": "LAX to JFK 2026-10-15",
  "maxItems": 25,
  "currency": "USD",
  "proxy": {
    "useApifyProxy": true,
    "apifyProxyGroups": ["RESIDENTIAL"]
  }
}
```

***

### 📤 Output Dataset Format

The scraper pushes structured flight records to the default dataset. You can download the results in **JSON, CSV, Excel, XML, or Parquet**.

| Field | Type | Description |
| :--- | :--- | :--- |
| `itineraryId` | String | Unique identifier for the flight itinerary. |
| `price` | Number | Numeric ticket price. |
| `currency` | String | Currency code (e.g., `USD`, `EUR`). |
| `rawPrice` | String | Displayed price string (e.g., `$552`). |
| `airline` | String | Airline name (e.g., `JetBlue`, `Delta`, `American`). |
| `origin` | String | Origin airport IATA code (e.g., `LAX`). |
| `destination` | String | Destination airport IATA code (e.g., `JFK`). |
| `departureTime` | String | Departure time (e.g., `9:28 AM`). |
| `arrivalTime` | String | Arrival time (e.g., `5:58 PM`). |
| `departureAirport`| String | Full name of the departure airport. |
| `arrivalAirport` | String | Full name of the destination airport. |
| `departureDate` | String | Departure date. |
| `arrivalDate` | String | Arrival date. |
| `durationMinutes`| Number | Total duration in minutes (e.g., `330`). |
| `durationText` | String | Human-readable duration (e.g., `5 hr 30 min`). |
| `stops` | Number | Number of stops (`0` = nonstop). |
| `cabinClass` | String | Cabin class (`Economy`, `Premium Economy`, `Business`, `First`). |
| `carbonEmissions`| String | Carbon footprint (e.g., `421 kg CO2e`). |
| `emissionsDifference` | String | Emissions compared to typical route flights (e.g., `+25% emissions`). |
| `baggage` | String | Included baggage summary (carry-on and checked bags). |
| `tripType` | String | Trip type (`round-trip` or `one-way`). |
| `searchUrl` | String | The exact Google Flights URL queried. |
| `scrapedAt` | String | ISO 8601 timestamp of extraction. |

#### Sample Output Record

```json
{
  "itineraryId": "6:Ez0RRc",
  "price": 552,
  "currency": "USD",
  "rawPrice": "$552",
  "airline": "JetBlue",
  "origin": "LAX",
  "destination": "JFK",
  "durationMinutes": 330,
  "durationText": "5 hr 30 min",
  "stops": 0,
  "cabinClass": "Economy",
  "departureTime": "9:28 AM",
  "arrivalTime": "5:58 PM",
  "departureAirport": "Los Angeles International Airport",
  "arrivalAirport": "John F. Kennedy International Airport",
  "departureDate": "Thursday, October 15",
  "arrivalDate": "Thursday, October 15",
  "carbonEmissions": "421 kg CO2e",
  "emissionsDifference": "+25% emissions",
  "baggage": "1 carry-on bag included. 0 checked bags included.",
  "tripType": "round-trip",
  "searchUrl": "https://www.google.com/travel/flights?q=Flights+to+JFK+from+LAX+on+2026-10-15&hl=en&gl=us&curr=USD",
  "scrapedAt": "2026-09-28T00:40:10.583Z"
}
```

***

### 💡 How to Automate & Integrate

- **Schedule Price Alerts**: Run this Actor daily or hourly with Apify Schedules to track price fluctuations for specific flight routes.
- **Export Anywhere**: Seamlessly export data to Google Sheets, Airtable, Snowflake, or Amazon S3.
- **Webhooks**: Trigger your backend or send Slack/Discord alerts when prices drop below your threshold.
- **REST API**: Call the Actor programmatically via the Apify API in Python, Node.js, Go, or cURL.

***

### 🏷️ Tags & Keywords

`google-flights` • `flight-scraper` • `airfare-monitoring` • `travel-data` • `cheap-flights` • `airline-fares` • `flight-tracker` • `carbon-emissions` • `flight-api`

# Actor input Schema

## `startUrls` (type: `array`):

Direct Google Flights search result URLs to scrape.

## `searchQuery` (type: `string`):

Free-text search query (e.g., 'LAX to JFK 2026-10-15'). Scraper will construct the Google Flights search URL automatically.

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

Maximum number of flight itineraries to scrape.

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

Currency for prices (e.g. USD, EUR, GBP). Defaults to USD.

## `proxy` (type: `object`):

Proxy settings. For high-volume production scraping, Residential Proxies are recommended.

## Actor input object example

```json
{
  "startUrls": [
    {
      "url": "https://www.google.com/travel/flights?q=Flights%20to%20JFK%20from%20LAX%20on%202026-10-15"
    }
  ],
  "searchQuery": "LAX to JFK 2026-10-15",
  "maxItems": 50,
  "currency": "USD",
  "proxy": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

# Actor output Schema

## `results` (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 = {
    "startUrls": [
        {
            "url": "https://www.google.com/travel/flights?q=Flights%20to%20JFK%20from%20LAX%20on%202026-10-15"
        }
    ],
    "searchQuery": "LAX to JFK 2026-10-15"
};

// Run the Actor and wait for it to finish
const run = await client.actor("madeingermany/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 = {
    "startUrls": [{ "url": "https://www.google.com/travel/flights?q=Flights%20to%20JFK%20from%20LAX%20on%202026-10-15" }],
    "searchQuery": "LAX to JFK 2026-10-15",
}

# Run the Actor and wait for it to finish
run = client.actor("madeingermany/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 '{
  "startUrls": [
    {
      "url": "https://www.google.com/travel/flights?q=Flights%20to%20JFK%20from%20LAX%20on%202026-10-15"
    }
  ],
  "searchQuery": "LAX to JFK 2026-10-15"
}' |
apify call madeingermany/google-flights-scraper --silent --output-dataset

```

## MCP server setup

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