# Google Flights Scraper: Prices, Date Ranges, Insights (`bisketapis/google-flights-scraper`) Actor

Flight prices from Google Flights without a browser. One-way and round-trip, cheapest flight per day across a date range, price insight (low/typical/high) and one summary row per route. Airlines, stops, layovers, duration, CO2. Pay per result.

- **URL**: https://apify.com/bisketapis/google-flights-scraper.md
- **Developed by:** [Chris Lucas](https://apify.com/bisketapis) (community)
- **Categories:** Travel, Automation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $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, Date Ranges and Price Insight

Get flight prices from Google Flights as clean JSON. No browser, no login, no API key. Search one-way or round-trip routes, scan a whole date range for the cheapest day to fly, and get one summary row per route with the cheapest price, the median, the airlines and whether prices are low, typical or high.

Plain HTTP requests make it fast and cheap: a typical search returns 15 to 20 flights in about a second.

### What you get

**One row per flight** (`type: "flight"`):

- route, origin, destination, departure date and time, arrival time
- price (total for all passengers, in the currency you choose)
- airlines, airline codes, flight numbers, number of stops
- total duration in minutes, layover airports and layover minutes
- per-leg segments: aircraft, legroom, times, flight number
- CO2 estimate in kg and the typical CO2 for the route
- `isBest` (in Google's "Best flights" group), `rank`
- `priceLevel` (low, typical or high) and `typicalPrice` for the route
- the Google Flights URL for the search

**One summary row per route** (`type: "route_summary"`), the row to feed a dashboard or an alert:

- cheapest, median and highest price across everything found
- cheapest nonstop price, fastest trip, all airlines and the cheapest price per airline
- `cheapestDate` and `cheapestByDate` when you search a date range
- price insight: priceLevel, typicalPrice, typicalLow, typicalHigh (optionally Google's price history)

### Modes

| Want | Input |
| --- | --- |
| One-way prices for a day | `routes`, `departureDate` |
| Round trip | add `returnDate` |
| Price calendar: cheapest flight per day | `departureDate`, `departureDateTo`, `cheapestPerDayOnly: true` |
| Round-trip calendar | date range plus `tripLengthDays: 7` |
| Only nonstop | `maxStops: "0"` |
| Other cabin, passengers, currency, market | `cabin`, `adults`, `children`, `currency`, `country` |

Example input:

```json
{
  "routes": ["LAS-JFK", "LAX-LHR"],
  "departureDate": "2026-12-10",
  "departureDateTo": "2026-12-16",
  "cheapestPerDayOnly": true
}
```

That is 14 searches and returns 14 daily-cheapest rows plus 2 route summaries.

### Pricing

Pay per result, no start fee:

- **Flight row**: $0.001 each
- **Route summary row**: $0.003 each (turn off with `includeRouteSummary: false`)

Searches that find nothing or fail are not charged. A run costs what you set as your maximum spend per run at most.

### Notes

- Prices are what Google Flights shows for the search, for all passengers combined.
- For round trips the rows list outbound options priced as the round-trip total, which is how Google Flights shows them.
- `priceLevel` compares the cheapest price with Google's typical price for the route and date (below 90% = low, above 110% = high).
- Each search is one route on one date. A date range of 30 days on one route is 30 searches.
- Uses the Apify datacenter proxy by default.
- This actor reads public Google Flights pages. It is not affiliated with Google.

### Output example

```json
{
  "type": "flight", "route": "LAS-JFK", "departureTime": "2026-12-10T10:28", "price": 188,
  "airlines": ["JetBlue"], "flightNumbers": ["B6278", "B61017"], "stops": 1, "durationMinutes": 480,
  "layovers": [{"airport": "BOS", "minutes": 97}], "carbonKg": 488, "priceLevel": "high", "typicalPrice": 112
}
```

# Actor input Schema

## `routes` (type: `array`):

One per line: origin and destination as airport or city codes, like LAS-JFK or LAX-LHR.

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

First (or only) departure date, YYYY-MM-DD.

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

Optional. Search every day from the departure date to this date (max 60 days). Combine with 'Cheapest flight per day only' for a price calendar.

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

Optional. Leave empty for one-way. Prices are the round-trip total for the outbound options listed.

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

For a date range: the return date is departure + this many days.

## `cheapestPerDayOnly` (type: `boolean`):

One row per searched day instead of the full list. Best with a date range.

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

Cheapest first. A search is one route on one date.

## `includeRouteSummary` (type: `boolean`):

Cheapest, median and highest price, airlines, cheapest day, price insight (billed as its own event).

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

Adult passengers (12+).

## `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 (max one per adult).

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

Cabin class.

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

Only flights with at most this many stops.

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

Three-letter code (USD, EUR, GBP...).

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

Google Flights language code (en, de, fr...).

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

Two-letter code that sets the Google Flights market (us, gb, de...). Prices can differ by market.

## `includeSegments` (type: `boolean`):

Per-leg airline, flight number, aircraft, legroom and times.

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

Adds Google's recent price history for the route to the summary row.

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

How many pages to fetch at the same time.

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

Apify Proxy (automatic datacenter) is the default and is included in the price.

## Actor input object example

```json
{
  "routes": [
    "LAS-JFK",
    "LAX-LHR"
  ],
  "departureDate": "2026-12-10",
  "cheapestPerDayOnly": false,
  "maxFlightsPerSearch": 20,
  "includeRouteSummary": true,
  "adults": 1,
  "children": 0,
  "infantsInSeat": 0,
  "infantsOnLap": 0,
  "cabin": "ECONOMY",
  "maxStops": "any",
  "currency": "USD",
  "language": "en",
  "country": "us",
  "includeSegments": true,
  "includePriceHistory": false,
  "maxConcurrency": 4,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

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

One row per flight, plus one summary row per route.

## `runSummary` (type: `string`):

Per search: flights found, status. Request stats.

# 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 = {
    "routes": [
        "LAS-JFK",
        "LAX-LHR"
    ],
    "departureDate": "2026-12-10",
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("bisketapis/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 = {
    "routes": [
        "LAS-JFK",
        "LAX-LHR",
    ],
    "departureDate": "2026-12-10",
    "proxyConfiguration": { "useApifyProxy": True },
}

# Run the Actor and wait for it to finish
run = client.actor("bisketapis/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 '{
  "routes": [
    "LAS-JFK",
    "LAX-LHR"
  ],
  "departureDate": "2026-12-10",
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}' |
apify call bisketapis/google-flights-scraper --silent --output-dataset

```

## MCP server setup

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