# Google Flights Scraper - Prices and Cheapest Dates (`conserving_windflower/google-flights-scraper-prices`) Actor

Extracts flight itineraries and prices from Google Flights for given routes and dates, including stops, layovers, CO2 estimates and a cheapest-date search.

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

## Pricing

from $1.50 / 1,000 flight itineraries

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 and Cheapest Dates

Extracts flight itineraries and prices from Google Flights for given routes and dates.

### What it does

- **Search mode:** one row per itinerary with airlines, departure and arrival times, duration, number of stops, layovers, flight segments (flight number, aircraft, legroom), price, CO2 estimate and Google's typical price range for the route.
- **Cheapest-date mode:** one row per route and departure date with the cheapest itinerary, plus a summary of the cheapest and most expensive date per route.

One-way and round-trip searches, all cabin classes, 1 to 9 adults, nonstop-only, maximum-price and airline filters are supported. Airports can be given as codes or city names.

### Input

| Field | Description |
|---|---|
| `routes` | Origin and destination pairs, e.g. `[{"from": "VNO", "to": "London"}]`. Join several airports with `+` (e.g. `"VNO+KUN+RIX"`) to search every pair; in cheapest-date mode the summary shows the cheapest pair for each date. |
| `departureDate`, `returnDate` | Dates in YYYY-MM-DD; return date is optional |
| `mode` | `search` or `dateSweep` (cheapest date) |
| `days`, `dayStep` | Dates to check in cheapest-date mode |
| `cabin`, `adults`, `currency` | Search parameters |
| `nonstopOnly`, `maxPrice`, `maxResultsPerSearch` | Filters and limits |
| `airlines`, `excludeAirlines`, `airlinesMatch` | Keep or drop airlines by 2-letter code (FR, BT) or name (Ryanair, airBaltic) |
| `includePriceHistory` | Save Google's recent price history to the key-value store |

Example:

```json
{
  "routes": [{"from": "VNO", "to": "London"}],
  "departureDate": "2026-12-10",
  "currency": "EUR"
}
```

Several departure airports and an airline filter:

```json
{
  "routes": [{"from": "VNO+KUN+RIX", "to": "LHR"}],
  "departureDate": "2026-12-10",
  "airlines": ["BT", "Ryanair"],
  "currency": "EUR"
}
```

### Output

One dataset row per itinerary or per route and date. Data can be downloaded as JSON, CSV, Excel or via the API. Example row from a test run (selected fields):

```json
{
  "searchFrom": "VNO",
  "searchTo": "London",
  "departureDate": "2026-12-10",
  "tripType": "oneWay",
  "position": 1,
  "airlines": ["Wizz Air"],
  "from": "VNO",
  "to": "LTN",
  "departure": "2026-12-10T05:55",
  "arrival": "2026-12-10T06:55",
  "stops": 0,
  "price": 46,
  "currency": "EUR",
  "priceLevel": "typical",
  "typicalLow": 25,
  "typicalHigh": 90
}
```

`SUMMARY` and `RUN_STATS` are saved to the key-value store.

### Pricing

Pay per event:
| Event | Price |
|---|---|
| Itinerary row | $1.50 per 1,000 |
| Cheapest-date row with a price | $4.00 per 1,000 |

Dates without flights, failed requests and itineraries removed by filters are not charged. Charges never exceed the maximum cost per run that you set.

### Limitations

- Prices are those shown by Google at the time of the run and can change. Final fares are set by the airline or agency.
- Some itineraries are listed without a price; they are returned with `price: null`.
- The Actor does not book flights.
- The Actor depends on the structure of Google's pages and may need updates when it changes.

### Disclaimer

This Actor is not affiliated with, endorsed by or sponsored by Google LLC. Google and Google Flights are trademarks of Google LLC. Data is provided as is, without warranty of accuracy or completeness. Users are responsible for using the Actor and its output in compliance with applicable laws and terms of service. The Actor does not collect personal data.

# Changelog

This Actor's version history is a separate document: https://apify.com/conserving_windflower/google-flights-scraper-prices/changelog.md

# Actor input Schema

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

List of origin and destination pairs, e.g. \[{"from": "JFK", "to": "LHR"}]. Use airport codes or city names. To compare several airports, join them with "+" (e.g. {"from": "VNO+KUN+RIX", "to": "LON"}); every airport pair is searched and the date sweep summary shows the cheapest pair per date.

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

YYYY-MM-DD. If empty, 30 days from today. In cheapest-date mode, the first date checked.

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

Optional, YYYY-MM-DD. If set, prices are round-trip totals. In cheapest-date mode, the trip length is kept.

## `mode` (type: `string`):

Search: one row per itinerary. Cheapest date: one row per route and date with the cheapest itinerary.

## `days` (type: `integer`):

Cheapest-date mode: number of departure dates to check.

## `dayStep` (type: `integer`):

Cheapest-date mode: 1 means every day, 7 means once a week.

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

ISO 4217 code, e.g. USD, EUR, GBP.

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

Cabin class to search.

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

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

## `nonstopOnly` (type: `boolean`):

Return only direct flights.

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

Keep only itineraries flown by these airlines. Use 2-letter codes (FR, BT, LH) or names (Ryanair, airBaltic). Leave empty for all airlines.

## `excludeAirlines` (type: `array`):

Drop itineraries that include any of these airlines (codes or names).

## `airlinesMatch` (type: `string`):

How the include list is applied to itineraries with several flights.

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

Drop itineraries above this price.

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

Search mode: maximum itineraries per route and date.

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

Save Google's recent price history for each search to the key-value store.

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

Number of parallel requests.

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

Optional. The run slows down automatically if requests start failing and stops if the success rate falls below 50%.

## Actor input object example

```json
{
  "routes": [
    {
      "from": "JFK",
      "to": "LHR"
    },
    {
      "from": "Berlin",
      "to": "Barcelona"
    }
  ],
  "mode": "search",
  "days": 7,
  "dayStep": 1,
  "currency": "USD",
  "cabin": "economy",
  "adults": 1,
  "nonstopOnly": false,
  "airlines": [],
  "excludeAirlines": [],
  "airlinesMatch": "any",
  "maxResultsPerSearch": 50,
  "includePriceHistory": false,
  "maxConcurrency": 3
}
```

# Actor output Schema

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

One row per itinerary (search mode).

## `calendar` (type: `string`):

One row per route and date (cheapest-date mode).

## `summary` (type: `string`):

Cheapest and most expensive date per route (cheapest-date mode).

## `runStats` (type: `string`):

Request and result counts for the run.

# 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": [
        {
            "from": "JFK",
            "to": "LHR"
        },
        {
            "from": "Berlin",
            "to": "Barcelona"
        }
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("conserving_windflower/google-flights-scraper-prices").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": [
        {
            "from": "JFK",
            "to": "LHR",
        },
        {
            "from": "Berlin",
            "to": "Barcelona",
        },
    ] }

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

```

## MCP server setup

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

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/egbBkpsCNzLCPVEWE/builds/wCvB8zFDcmT4vzsLM/openapi.json
