# Google Flights Scraper - Flight Prices & Price Insights (`aolmo/google-flights`) Actor

Flights and fares from Google Flights for any route and date, without login: price, airlines, flight numbers, times, stops, layovers, aircraft, legroom, CO2 and whether prices are low or high. One-way and round trips in any cabin and currency. Scheduled runs flag price changes. $0.001 per flight.

- **URL**: https://apify.com/aolmo/google-flights.md
- **Developed by:** [Antonio del Olmo Tena](https://apify.com/aolmo) (community)
- **Categories:** Travel
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.00 / 1,000 flight scrapeds

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

Export flights and fares from Google Flights for any route and date. Give routes as airport or city codes and the Actor returns one row per flight option with price, airlines, flight numbers, times, duration, stops, layovers, aircraft, legroom and CO2, plus Google's rating of whether prices are low, typical or high right now. One-way and round trips, any cabin, any currency. Schedule it and flights whose price changed are flagged. Fare tracking, travel apps, route research and deal alerts at $0.001 per flight.

### What you get

**Flight** (one row each): `price`, `isBestOption`, `airlines`, `flightNumbers`, `from`, `fromName`, `to`, `toName`, `departureDate`, `departureTime`, `arrivalDate`, `arrivalTime`, `durationMinutes`, `stops`, `layovers`, `legs`, `co2Grams`, `typicalCo2Grams`, `position`, `id`.

**Each leg**: flight number, airline, operating carrier, aircraft, airports, times, duration and legroom.

**Route** on every row: `priceLevel` (`low`, `typical` or `high`), `lowestPrice`, `typicalPrice`, `typicalPriceLow`, `typicalPriceHigh`, `search` and `searchUrl`.

**Changes** on scheduled runs: `priceChanged` and `previousPrice` for flights whose price moved since the previous run of the same search.

Routes without flights return nothing and are not charged.

### How to use it

1. Open the **Input** tab.
2. Add **Routes**, one per line, as two codes: `MAD-BCN`, `JFK-LHR` or the city codes `LON-NYC` (up to 50 per run).
3. Set the **Departure date**, and a **Return date** for a round trip. With no date the Actor searches 30 days ahead, so a schedule never expires.
4. Choose passengers, **Cabin**, **Currency** and **Country**.
5. Click **Start** and export the rows as JSON, CSV or Excel.
6. To track a fare, schedule the Actor with fixed dates.

### Input

```json
{
  "routes": ["MAD-BCN", "JFK-LHR"],
  "departureDate": "2026-12-10",
  "returnDate": "2026-12-17",
  "adults": 1,
  "cabin": "economy",
  "currency": "USD",
  "country": "US",
  "maxStops": 1,
  "maxFlights": 50
}
```

### Output

```json
{
  "search": "MAD-LHR 2026-12-10 2026-12-17 economy 1a0c USD US any",
  "searchUrl": "https://www.google.com/travel/flights/search?tfs=...&hl=en&gl=US&curr=USD",
  "priceLevel": "typical",
  "lowestPrice": 238,
  "typicalPrice": 212,
  "typicalPriceLow": 165,
  "typicalPriceHigh": 290,
  "position": 1,
  "id": "IB 719@2026-12-10T15:05",
  "isBestOption": true,
  "price": 238,
  "airlines": ["Iberia"],
  "flightNumbers": ["IB 719"],
  "from": "MAD",
  "fromName": "Adolfo Suárez Madrid-Barajas Airport",
  "to": "LHR",
  "toName": "Heathrow Airport",
  "departureDate": "2026-12-10",
  "departureTime": "15:05",
  "arrivalDate": "2026-12-10",
  "arrivalTime": "16:35",
  "durationMinutes": 150,
  "stops": 0,
  "layovers": [],
  "legs": [{ "flightNumber": "IB 719", "aircraft": "Airbus A320", "legroom": "28 inches" }],
  "co2Grams": 116000,
  "typicalCo2Grams": 115000,
  "previousPrice": null,
  "priceChanged": false,
  "timestamp": "2026-11-01T10:00:00.000Z"
}
```

### Pricing

Pay per event: **$0.001 per flight** and **$0.001 per price change** detected on a scheduled run. Routes without flights are free. A route with 50 options costs $0.05.

### Limits and notes

- `price` is the total for all passengers. On a round trip the rows are the outbound options and the price covers the whole trip; return flights are not listed.
- Fares and the options shown vary by country, currency and moment, as they do on the website. `price` is null when Google shows no fare.
- Airlines and booking links for each fare are on the Google Flights page, which `searchUrl` opens.
- Multi-city trips are not supported.

### Related Actors

- **Google Hotels Scraper**: hotel prices for the same destination and dates.
- **Airbnb Search Scraper**: short-term rentals.

# Actor input Schema

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

One per line, as two airport or city codes: MAD-BCN, JFK-LHR or LON-NYC. Up to 50 per run.

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

YYYY-MM-DD. Empty means 30 days from today, so a saved or scheduled run does not expire.

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

YYYY-MM-DD for a round trip. Empty means one way. Round trips list the outbound options and the price covers the whole trip.

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

Prices are the total for all passengers.

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

Up to 9 passengers in total.

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

Travel class.

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

Keep flights with at most this many stops: 0 is nonstop only. Empty keeps all.

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

Three-letter code such as USD, EUR or GBP.

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

Two-letter code of the market, such as US, ES or GB.

## `maxFlights` (type: `integer`):

Google shows from a few to about 100 options.

## `product` (type: `string`):

Internal. Leave as is.

## Actor input object example

```json
{
  "routes": [
    "MAD-BCN"
  ],
  "adults": 1,
  "children": 0,
  "cabin": "economy",
  "currency": "USD",
  "country": "US",
  "maxFlights": 50,
  "product": "google-flights"
}
```

# Actor output Schema

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

Dataset items: url, changed, events, data, timestamp and error (when the target failed).

# 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": [
        "MAD-BCN"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("aolmo/google-flights").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": ["MAD-BCN"] }

# Run the Actor and wait for it to finish
run = client.actor("aolmo/google-flights").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": [
    "MAD-BCN"
  ]
}' |
apify call aolmo/google-flights --silent --output-dataset

```

## MCP server setup

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

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/pu2VUAoR4WA8he8be/builds/fZz1ShzgOEKee3Avh/openapi.json
