# Google Flights Scraper: Prices, Schedules & Flexible Dates (`tindacloud/google-flights-scraper`) Actor

Scrape Google Flights prices and schedules for any route: one-way, round trip and flexible date ranges. Airlines, flight numbers, stops and layovers, aircraft, legroom and CO2 emissions, cheapest first.

- **URL**: https://apify.com/tindacloud/google-flights-scraper.md
- **Developed by:** [Seungki Min](https://apify.com/tindacloud) (community)
- **Categories:** Travel, E-commerce, AI
- **Stats:** 2 total users, 1 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.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, Schedules & Flexible Dates

Get **Google Flights prices and schedules** for any route as clean, structured data: one-way, round trip, or **every departure date in a range** to find the cheapest day to fly. Each result includes airlines, flight numbers, stops and layovers, aircraft, legroom and CO₂ emissions, sorted cheapest first.

### Why this scraper

- **Flexible dates.** Give a date range (up to 60 days) and get prices for every day, with `isCheapestForDate` flagged. Add `tripLengthDays` for round trips, e.g. every 5-night trip in November.
- **Many routes in one run.** Every origin × destination × date combination is searched. Use airport codes (JFK, ICN) or city names (New York, Seoul) to cover all airports in a city.
- **Rich flight details** that the Google Flights list view hides:
  - flight numbers, aircraft type and legroom for every segment
  - layover airport, city and connection time
  - CO₂ estimate vs. the route's typical emissions
  - Google's "best flights" flag
- **Cabin & passengers.** Economy, premium economy, business, first; adults and children. Prices are totals for all passengers.
- **Filters.** Max stops (nonstop only), max price, airlines by name or IATA code.
- **Any currency and point of sale.** USD, EUR, GBP, KRW, JPY, …
- **Fast.** A typical search takes a few seconds; 14 flexible dates took about 13 seconds in testing.

### Input example

```json
{
  "origins": ["Seoul"],
  "destinations": ["Tokyo", "Osaka"],
  "departureDateFrom": "2026-11-01",
  "departureDateTo": "2026-11-14",
  "tripLengthDays": 5,
  "cabin": "economy",
  "adults": 2,
  "maxStops": 0,
  "currency": "KRW",
  "maxResultsPerSearch": 10
}
```

For a single date use `departureDate` (and optionally `returnDate`).

### Output example

```json
{
  "searchOrigin": "SFO",
  "searchDestination": "NRT",
  "departureDate": "2026-12-05",
  "returnDate": null,
  "tripType": "oneWay",
  "cabin": "business",
  "adults": 2,
  "currency": "USD",
  "price": 4299,
  "rankByPrice": 1,
  "isCheapestForDate": true,
  "isBest": false,
  "airlines": [
    "Air Canada"
  ],
  "origin": "SFO",
  "destination": "NRT",
  "departure": "2026-12-05T16:55",
  "arrival": "2026-12-07T16:40",
  "durationMinutes": 1845,
  "stops": 1,
  "layovers": [
    {
      "airport": "YVR",
      "airportName": "Vancouver International Airport",
      "city": "Vancouver",
      "durationMinutes": 1092
    }
  ],
  "emissionsGrams": 3643000,
  "typicalEmissionsGrams": 4537000,
  "emissionsVsTypicalPercent": -20,
  "segments": [
    {
      "flightNumber": "AC 571",
      "airline": "Air Canada",
      "from": "SFO",
      "to": "YVR",
      "departure": "2026-12-05T16:55",
      "arrival": "2026-12-05T20:18",
      "durationMinutes": 143,
      "aircraft": "Airbus A220-300 Passenger",
      "legroom": null
    },
    {
      "flightNumber": "AC 3",
      "airline": "Air Canada",
      "from": "YVR",
      "to": "NRT",
      "departure": "2026-12-06T14:30",
      "arrival": "2026-12-07T16:40",
      "durationMinutes": 610,
      "aircraft": "Boeing 787",
      "legroom": null
    }
  ]
}
```

Times are local airport times. For round trips, Google Flights first lists outbound options priced as the **round-trip total**; each row is one outbound option with that total.

### Use cases

- **Fare tracking & alerts:** schedule a daily run and watch prices for your routes.
- **Travel agencies & deal sites:** find the cheapest dates and routes to publish.
- **Corporate travel & analytics:** compare carriers, schedules and emissions.
- **Market research:** route competition, nonstop availability and price levels by date.
- **AI travel agents:** live, structured flight options.

### Pricing

Pay per flight returned, plus a negligible start fee per run. Use **Max flights per route & date** and **Max results** to control cost.

### Notes

- Prices and availability come from Google Flights at run time and can change quickly; book on the airline or agency site.
- Results follow Google Flights' own matching for city names and dates.
- If something breaks after a Google change, open an issue and it will be fixed quickly.

### Related Actors

Other scrapers from the same maker, built the same way — no browser where it isn't needed, one flat price per result:

- [Airbnb Listings Scraper](https://apify.com/tindacloud/airbnb-listings-scraper)
- [Website Contact & Email Scraper](https://apify.com/tindacloud/website-contact-scraper)

# Actor input Schema

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

Airport codes (JFK, LHR, ICN) or city names (New York, Seoul). Each origin is combined with each destination.

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

Airport codes or city names.

## `departureDate` (type: `string`):

Departure date (YYYY-MM-DD). For flexible dates use the range fields below instead.

## `departureDateFrom` (type: `string`):

Search every departure date from this day…

## `departureDateTo` (type: `string`):

…up to this day (max 60 days). Great for finding the cheapest day to fly.

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

Leave empty for one-way.

## `tripLengthDays` (type: `integer`):

With a date range, return this many days after each departure date.

## `cabin` (type: `string`):

Travel class.

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

Prices are totals for all passengers.

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

Children aged 2–11.

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

0 = nonstop only. Empty = any.

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

Drop flights above this total price (in the currency below).

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

Keep only these airlines, by name or IATA code (e.g. “Delta”, “BA”).

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

ISO currency code, e.g. USD, EUR, GBP, KRW, JPY.

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

Two-letter country code Google Flights uses for prices and availability.

## `maxResultsPerSearch` (type: `integer`):

Cheapest first.

## `maxResults` (type: `integer`):

Stop after this many flights. You are charged per flight.

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

Apify datacenter proxy works for Google Flights.

## Actor input object example

```json
{
  "origins": [
    "JFK"
  ],
  "destinations": [
    "LHR"
  ],
  "cabin": "economy",
  "adults": 1,
  "children": 0,
  "currency": "USD",
  "country": "US",
  "maxResultsPerSearch": 30,
  "maxResults": 1000,
  "proxy": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

## `flights` (type: `string`):

All flights in a 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"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("tindacloud/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 = {
    "origins": ["JFK"],
    "destinations": ["LHR"],
}

# Run the Actor and wait for it to finish
run = client.actor("tindacloud/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 '{
  "origins": [
    "JFK"
  ],
  "destinations": [
    "LHR"
  ]
}' |
apify call tindacloud/google-flights-scraper --silent --output-dataset

```

## MCP server setup

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