# Google Flights Scraper - Prices, Airlines, Stops, CO2 (`coiled_magistrate/google-flights-fast`) Actor

Scrape Google Flights: every flight for any route and date with price, airlines, flight numbers, times, stops, layovers, aircraft, legroom, CO2 and route price history. One-way, round trip, any cabin and passengers. $1 per 1,000 flights.

- **URL**: https://apify.com/coiled\_magistrate/google-flights-fast.md
- **Developed by:** [TrendsData](https://apify.com/coiled_magistrate) (community)
- **Categories:** Travel, E-commerce, Automation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$1.00 / 1,000 flights

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 - Prices, Airlines, Stops, CO2 & Price History

Get **every flight Google Flights shows** for any route and date - as clean JSON, CSV or Excel. One-way or round trip, any cabin class, any number of passengers, flexible dates.

**$1 per 1,000 flights.** No start fee, no per-search fee. Searches without results, invalid airport codes or past dates are **never charged**.

### What you get for every flight

- **Price** (total for all passengers) in any currency, plus Google's **typical price range** for the route and a **low / typical / high** price level
- **Airlines**, **flight numbers**, codeshares, **aircraft type** and **legroom**
- **Departure and arrival** local times, **total duration**, **number of stops** and **layovers** (airport, city, waiting time)
- Every **segment** of connecting flights
- **CO2 emissions** vs. the typical flight on the route
- Optional **route price history** (about the last 60 days)
- A ready-made **Google Flights link** for the search

### Why this scraper

- **Fast** - one search takes about 1-2 seconds, no browser
- **Flexible dates** - search a date and the next N days to find the cheapest day to fly
- **Many routes at once** - every origin x every destination x every date in one run
- **City codes** - NYC, LON, PAR, TYO search all airports of the city
- **Real filters** - cabin class, nonstop / max stops, airlines, adults / children / infants
- **Pay only for flights** you actually receive

### Use cases

- **Fare monitoring & alerts** - schedule daily runs and track price drops on your routes
- **Travel agencies & deal sites** - find the cheapest days and routes to publish
- **Market research** - which airlines fly a route, how often, at what price
- **Corporate travel** - compare costs of business trips across dates
- **Sustainability reports** - CO2 per flight and route

### Input example

```json
{
  "origins": ["NYC"],
  "destinations": ["LHR", "CDG"],
  "departureDates": ["2026-11-12"],
  "alsoSearchNextDays": 6,
  "returnAfterDays": 7,
  "adults": 2,
  "maxStops": "0",
  "sortBy": "price",
  "currency": "USD"
}
```

This runs 14 searches (2 destinations x 7 days), round trips with 2 adults, nonstop only.

**Cheapest flight per day only:** set `sortBy` to `price` and `maxFlightsPerSearch` to `1`.

### Output example

```json
{
  "searchFrom": "JFK", "searchTo": "LHR", "departureDate": "2026-11-12", "tripType": "one_way",
  "price": 295, "currency": "USD", "priceIsTotalForAllPassengers": true, "isBestFlight": true,
  "airlines": ["Virgin Atlantic"], "from": "JFK", "to": "LHR",
  "departure": "2026-11-12T08:00", "arrival": "2026-11-12T20:10", "durationMinutes": 430, "stops": 0,
  "legs": [{"from": "JFK", "to": "LHR", "flightNumber": "VS 26", "airline": "Virgin Atlantic", "aircraft": "Airbus A330-900neo", "legroom": "31 inches", "durationMinutes": 430}],
  "co2Kg": 365, "typicalCo2Kg": 431, "co2DifferencePercent": -15,
  "routeTypicalPriceLow": 225, "routeTypicalPriceHigh": 295, "routePriceLevel": "typical",
  "googleFlightsUrl": "https://www.google.com/travel/flights?tfs=..."
}
```

### FAQ

**Are round-trip prices for both directions?** Yes. For round trips the list shows outbound flights with the total round-trip price, exactly like Google Flights.

**Are prices per person?** No - `price` is the total for all passengers in the search, like on Google Flights.

**How often can I run it?** As often as you like. Schedule it hourly or daily for price tracking.

### More tools from this author

- [Google News Scraper - real article URLs, any date range](https://apify.com/coiled_magistrate/google-news-fast)
- [Google Ads Transparency Scraper - every ad your competitors run](https://apify.com/coiled_magistrate/google-ads-transparency-fast)
- [Steam Scraper - games, sales estimates, players, reviews](https://apify.com/coiled_magistrate/steam-scraper-fast)
- [Google Trends Scraper - interest over time, by region, related queries](https://apify.com/coiled_magistrate/google-trends-reliable)
- [Google Trends Trending Now - real-time trending searches for any country](https://apify.com/coiled_magistrate/google-trending-now)
- [Keyword Suggestions - Google, YouTube, Amazon autocomplete](https://apify.com/coiled_magistrate/keyword-suggestions)
- [Tech Stack Detector - Wappalyzer & BuiltWith alternative](https://apify.com/coiled_magistrate/tech-stack-detector)
- [Company Jobs Scraper - Workday, Greenhouse, Lever, Ashby & more](https://apify.com/coiled_magistrate/company-jobs-scraper)
- [YouTube Scraper - videos, channels, search results ($1/1K)](https://apify.com/coiled_magistrate/youtube-scraper-fast)
- [YouTube Transcript Scraper - subtitles for videos, channels, playlists](https://apify.com/coiled_magistrate/youtube-transcript-fast)
- [YouTube Shorts Scraper - search, hashtags, channels](https://apify.com/coiled_magistrate/youtube-shorts-fast)
- [YouTube Channel Scraper - subscribers, stats, links, latest videos](https://apify.com/coiled_magistrate/youtube-channel-fast)

# Actor input Schema

## `origins` (type: `array`):

3-letter IATA codes of airports (JFK, LHR, PRG) or cities with all their airports (NYC, LON, PAR). Every origin is combined with every destination.

## `destinations` (type: `array`):

3-letter IATA codes of airports or cities, e.g. LHR, CDG, LON, TYO.

## `departureDates` (type: `array`):

One or more departure dates. Leave empty to search 30 days from today.

## `alsoSearchNextDays` (type: `integer`):

Flexible dates: for each departure date also search the following N days (find the cheapest day to fly). 0 = only the given dates.

## `returnAfterDays` (type: `integer`):

Makes it a round trip returning N days after each departure date. 0 = one-way. Round-trip prices are totals for both directions.

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

Alternative to 'return after N days': the same return date for every search.

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

Travel class.

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

Number of adult passengers. Prices are totals for all passengers.

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

Children aged 2-11.

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

Infants under 2 with their own seat.

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

Infants under 2 on an adult's lap.

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

Maximum number of stops.

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

Optional 2-letter airline codes, e.g. BA, LH, DL. Empty = all airlines.

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

3-letter currency code, e.g. USD, EUR, GBP, CZK.

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

2-letter country code Google uses for prices and availability, e.g. us, gb, de.

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

Language of airport and airline names, e.g. en, de, fr.

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

Order of flights within each search.

## `maxFlightsPerSearch` (type: `integer`):

Limit the number of flights returned (and charged) per route and date. Use 1 with 'Cheapest first' to get only the cheapest flight.

## `includePriceHistory` (type: `boolean`):

Adds Google's price history of the route (about the last 60 days) to the first flight of each search.

## `maxConcurrency` (type: `integer`):

How many searches run in parallel.

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

Used automatically only if Google blocks a request.

## Actor input object example

```json
{
  "origins": [
    "JFK"
  ],
  "destinations": [
    "LHR"
  ],
  "departureDates": [],
  "alsoSearchNextDays": 0,
  "returnAfterDays": 0,
  "cabinClass": "economy",
  "adults": 1,
  "children": 0,
  "infantsInSeat": 0,
  "infantsOnLap": 0,
  "maxStops": "any",
  "airlines": [],
  "currency": "USD",
  "country": "us",
  "language": "en",
  "sortBy": "google",
  "maxFlightsPerSearch": 100,
  "includePriceHistory": false,
  "maxConcurrency": 5,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

# Actor output Schema

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

All flights with full details.

## `overview` (type: `string`):

Compact table view.

# 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 = {
    "origins": [
        "JFK"
    ],
    "destinations": [
        "LHR"
    ],
    "departureDates": [],
    "returnDate": "",
    "airlines": [],
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ]
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("coiled_magistrate/google-flights-fast").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 = {
    "origins": ["JFK"],
    "destinations": ["LHR"],
    "departureDates": [],
    "returnDate": "",
    "airlines": [],
    "proxyConfiguration": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
    },
}

# Run the Actor and wait for it to finish
run = client.actor("coiled_magistrate/google-flights-fast").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 '{
  "origins": [
    "JFK"
  ],
  "destinations": [
    "LHR"
  ],
  "departureDates": [],
  "returnDate": "",
  "airlines": [],
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}' |
apify call coiled_magistrate/google-flights-fast --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,coiled_magistrate/google-flights-fast"
        }
    }
}
```

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/a8AY9fnnta5OHln9R/builds/pQPnIhGPBG6xAmMx4/openapi.json
