# Google Flights API: flight prices, schedules and airfare

> Flight options and prices from Google Flights for any route and date: whole-trip price, schedule, stops, legs with aircraft, bags included, price level and CO2.

Source: https://cozybit.dev/tools/google-flights/

For each route and date, get the itineraries Google Flights shows: the whole-party price, schedule, stops and layovers, every leg with airline, flight number and aircraft, included bags, Google's low/typical/high price rating and CO2 estimates.

[Try it in Apify Console](https://apify.com/cozybit/google-flights-scraper)

- [0.00001 USD per event](https://apify.com/cozybit/google-flights-scraper/pricing), trial price until 31 Dec 2026
- Errors are never charged
- Free Apify plan: 40 itineraries per run

## What you get

- **Price:** for your whole party, one way or round trip, in your currency.
- **Schedule:** times, duration, stops and each layover.
- **Legs:** airline, flight number, aircraft, legroom and amenities.
- **Bags and price level:** bags included in the fare and Google's low, typical or high rating.
- **Emissions:** CO2 estimate and the route's typical value.

## Who uses it

- **Travel and corporate travel teams**: Monitor fares on routes they sell or fly.
- **Deal sites and newsletters**: Spot cheap fares with Google's own price rating.
- **Airlines and airports**: Compare schedules, aircraft and connections on a route.
- **Analysts**: Collect fare and emissions data across routes and dates.

## Input

| Field | Key | What it does | Default |
|---|---|---|---|
| Routes | `routes` | 1-100 routes as `FROM-TO` with airport or city codes, such as `SFO-LAX` | required |
| Departure dates | `departureDates` | Up to 30 dates, `YYYY-MM-DD` or relative such as `3 weeks` | 14 days ahead |
| Return after days | `returnAfterDays` | 0 for one way, 1-30 for a round trip | 0 |
| Passengers and cabin | `adults`, `children`, `infantsOnLap`, `cabinClass` | 1-9 adults; economy to first | 1 adult, economy |
| Maximum stops | `maxStops` | `any`, `0`, `1` or `2` | any |
| Currency and search country | `currency`, `country` | Any currency Google supports; the Google market | USD, US |
| Maximum itineraries per search | `maxResultsPerSearch` | 1-200 | 100 |

### Berlin to Lisbon in three weeks, five itineraries, euros

**Input**

```json
{
  "routes": ["BER-LIS"],
  "departureDates": ["3 weeks"],
  "currency": "EUR",
  "maxResultsPerSearch": 5
}
```

We ran this exact input on 2 Dec 2026: 5 records, run status `SUCCEEDED`.

#### A week's round trip for two adults

**Input**

```json
{
  "routes": ["BER-LIS"],
  "departureDates": ["2027-04-02"],
  "returnAfterDays": 7,
  "adults": 2,
  "currency": "EUR",
  "country": "DE"
}
```

#### Business class on four Fridays

**Input**

```json
{
  "routes": ["LON-NYC"],
  "departureDates": ["2027-01-08", "2027-01-15", "2027-01-22", "2027-01-29"],
  "cabinClass": "business",
  "currency": "GBP",
  "country": "GB"
}
```

## Output

One record per item in the run's dataset, exportable as JSON, CSV or Excel.

**Example record**

```json
{
  "record_type": "flight",
  "route": "BER-LIS",
  "origin": "BER",
  "destination": "LIS",
  "departure_date": "2026-12-23",
  "return_date": null,
  "trip_type": "one_way",
  "position": 1,
  "is_best": true,
  "status": "ok",
  "error": null,
  "price": 129,
  "currency": "EUR",
  "typical_price_low": 95,
  "typical_price_high": 180,
  "price_level": "typical",
  "carry_on_bags_included": 1,
  "checked_bags_included": 0,
  "passengers": {
    "adults": 1,
    "children": 0,
    "infants_on_lap": 0
  },
  "cabin_class": "economy",
  "airline_codes": ["ZZ"],
  "airlines": ["Example Air"],
  "departure_time": "2026-12-23T06:00",
  "arrival_time": "2026-12-23T10:30",
  "duration_minutes": 330,
  "stops": 1,
  "layovers": [
    {
      "airport": "AMS",
      "airport_name": "Amsterdam Airport Schiphol",
      "city": "Amsterdam",
      "minutes": 65
    }
  ],
  "legs": [
    {
      "airline_code": "ZZ",
      "airline": "Example Air",
      "flight_number": "100",
      "from": "BER",
      "to": "AMS",
      "departure_time": "2026-12-23T06:00",
      "arrival_time": "2026-12-23T07:25",
      "aircraft": "Airbus A320neo",
      "legroom": "29 in",
      "amenities": ["In-seat USB outlet"]
    }
  ],
  "co2_grams": 172000,
  "typical_co2_grams": 217000,
  "scraped_at": "2026-12-02T12:00:00.000Z"
}
```

Shortened to one leg; real records list every leg plus `booking_url`, `booking_token` and `source_url`.

| Field | What it means |
|---|---|
| `price` | Covers all passengers; for round trips the round-trip total, with the record describing the outbound flights. |
| `price_level` | Google's own rating for the search: `low`, `typical` or `high`. |
| `legs[].amenities` | Google's labels, such as Wi-Fi or power outlets; `[]` when none are listed. |
| `status` | `no_data` (no flights listed) and `error` records are free. |

## Use it from your code, agent or workflow

Every example runs the same input. Get your API token in Apify Console under *Settings, API & Integrations*, and keep it in the `APIFY_TOKEN` environment variable.

**curl**

**Synchronous run (token in APIFY_TOKEN)**

```bash
curl -sS --max-time 310 -X POST \
  "https://api.apify.com/v2/acts/rTAa68kee8wUtPb3d/run-sync-get-dataset-items?maxTotalChargeUsd=0.10" \
  -H "Authorization: Bearer $APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"routes": ["BER-LIS"], "departureDates": ["3 weeks"], "currency": "EUR", "maxResultsPerSearch": 5}'
```

**Python**

**apify-client 3.x**

```python
# pip install apify-client
import os
from decimal import Decimal

from apify_client import ApifyClient

client = ApifyClient(os.environ["APIFY_TOKEN"])
run = client.actor("rTAa68kee8wUtPb3d").call(
    run_input={
        "routes": ["BER-LIS"],
        "departureDates": ["3 weeks"],
        "currency": "EUR",
        "maxResultsPerSearch": 5,
    },
    max_total_charge_usd=Decimal("0.10"),  # spend cap for this run
)
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item.get("airlines"), item.get("price"), item.get("stops"))
```

**JavaScript**

**apify-client 2.x, Node 18+**

```javascript
// npm install apify-client
import { ApifyClient } from 'apify-client';

const client = new ApifyClient({ token: process.env.APIFY_TOKEN });
const run = await client.actor('rTAa68kee8wUtPb3d').call(
  {
    routes: ['BER-LIS'],
    departureDates: ['3 weeks'],
    currency: 'EUR',
    maxResultsPerSearch: 5,
  },
  { maxTotalChargeUsd: 0.1 }, // spend cap for this run
);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
for (const item of items) console.log(item.airlines, item.price, item.stops);
```

**AI agents (MCP)**

**MCP client configuration**

```json
{
  "mcpServers": {
    "apify": {
      "url": "https://mcp.apify.com?tools=cozybit/google-flights-scraper"
    }
  }
}
```

Works in any MCP client that accepts a remote server URL ([Apify's MCP docs](https://docs.apify.com/platform/integrations/mcp)). Clients with OAuth sign you in to Apify on first use; others send `"headers": {"Authorization": "Bearer <APIFY_TOKEN>"}`. The tool is called `cozybit--google-flights-scraper`. Try a prompt such as: Find flights from Berlin to Lisbon on 12 March for two adults and list the three cheapest with their included bags. More in [AI agents and MCP](https://cozybit.dev/integrations/ai-agents/).

**n8n, Make, Zapier**

Apify has its own apps for the main automation platforms. Point them at this actor's ID `rTAa68kee8wUtPb3d` and paste the input JSON.

- **n8n:** the Apify node, operation *Run an Actor and get dataset*.
- **Make:** the Apify module *Run an Actor*, then *Get Dataset Items*.
- **Zapier:** the Apify action *Run Actor*, or the trigger *Finished Actor run* for scheduled runs.

Step-by-step setup: [n8n, Make and Zapier](https://cozybit.dev/integrations/no-code/).

**Apify Console**

1. **Open the [Store page](https://apify.com/cozybit/google-flights-scraper)** and choose *Try for free*. Apify asks you to sign in or create a free account.
2. **Paste the input** into the JSON tab of the input form, or fill in the fields.
3. **Start the run**, then open the dataset and export it as JSON, CSV or Excel. Save the input as a task to schedule it.

- `run-sync-get-dataset-items` waits at most 300 seconds, then answers HTTP 408. Keep synchronous calls small and start an asynchronous run for batches (below).
- `maxTotalChargeUsd` caps what one run may charge; the run stops cleanly when it is reached.
- Send the token in the `Authorization` header, never as `?token=` in the URL, where it ends up in logs.
- The ID `rTAa68kee8wUtPb3d` never changes; the name `cozybit/google-flights-scraper` works too.

**Batches and schedules: start a run, wait, read the results**

**Asynchronous run, results as CSV**

```bash
# 1. Start a run; the answer comes back at once
curl -sS -X POST "https://api.apify.com/v2/acts/rTAa68kee8wUtPb3d/runs?maxTotalChargeUsd=1" \
  -H "Authorization: Bearer $APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d @input.json
# The answer's data.id is RUN_ID and data.defaultDatasetId is DATASET_ID.

# 2. Wait up to 60 s per call until data.status is SUCCEEDED
curl -sS "https://api.apify.com/v2/actor-runs/RUN_ID?waitForFinish=60" \
  -H "Authorization: Bearer $APIFY_TOKEN"

# 3. Read the records as JSON, CSV or Excel (format=json, csv or xlsx)
curl -sS "https://api.apify.com/v2/datasets/DATASET_ID/items?format=csv" \
  -H "Authorization: Bearer $APIFY_TOKEN" -o results.csv
```

Relative dates such as `"departureDates": ["3 weeks"]` keep a scheduled fare watch looking the same distance ahead. Schedules live in Apify Console under *Schedules*; a webhook or the no-code apps can pick up each finished run.

## Price

You pay per event, through your Apify account, with platform costs included. The live price is on the [Store page](https://apify.com/cozybit/google-flights-scraper/pricing): **0.00001 USD per event, a trial price until 31 Dec 2026**.

| Event | What counts | Trial price until 31 Dec 2026 | Planned post-trial rate |
|---|---|---|---|
| `flight` | Flight (one itinerary with its price) | 0.00001 USD (0.01 USD per 1,000) | 0.75 USD per 1,000 |

### What each outcome costs

| Outcome | What it is | Charged? |
|---|---|---|
| `ok` | One itinerary with its price | Charged |
| `no_data` | Google listed no flights for the route and date | Free |
| `error` | The search failed, or Google ignored the requested date or currency | Free |

**Not charged:** `no_data` and `error` records.

**Apify's free plan** (no card) returns up to 40 itineraries per run. You can cap any run's cost with `maxTotalChargeUsd`.

### What typical jobs cost

| Example | Charged events | At the trial price | At the planned rate |
|---|---|---|---|
| One route, one date (about 17 itineraries) | 17 × `flight` | 0.00017 USD | 0.013 USD |
| One route on 30 dates | 500 × `flight` | 0.005 USD | 0.38 USD |

The post-trial rate is planned, not scheduled: the trial may be extended, Apify notifies users before any price increase, and the Store page always shows the price that applies. See [how pricing works](https://cozybit.dev/pricing/) and the [cost estimator](https://cozybit.dev/pricing/#estimate).

## Reliability

45 / 48 searches returned itineraries

45 of 48 itinerary searches returned results, 1,123 itineraries in total, across 15 routes and five countries and currencies. Each search is checked against your date and currency: if Google ignored the request, you get a clear error and no wrong prices.

Problems and questions go to the actor's Issues tab on Apify.

## Limits

- Only the list before Google's "View more flights": a median of 17 itineraries per search in our runs (range 7-68).
- Round trips return the outbound options with round-trip prices; matching return flights are not included.
- Children and lap infants are experimental: Google's response does not confirm the party.
- Multi-city trips are not supported.
- Google Flights has no official public API; a change on Google's side can break the actor until it is updated.

## Questions

**Does it return every flight on the route?**

It returns the list Google shows before "View more flights", typically about 17 itineraries per search.

**Can I use city codes such as NYC or LON?**

Yes, for itineraries.

**Which bags are included?**

Each itinerary has `carry_on_bags_included` and `checked_bags_included` as Google shows them, or `null` when Google gives no count.

## Related

### [Google Hotels Scraper](https://cozybit.dev/tools/google-hotels/)

Travel prices

Hotel prices, stars, ratings and details for your dates.

- Relative dates

per hotel

### [Hotel Price Comparison](https://cozybit.dev/tools/hotel-booking-prices/)

Travel prices

Every booking site's price for a hotel and your dates.

- Relative dates

per booking-site price

## Try Google Flights Scraper on the free Apify plan

No card needed. Errors are never charged, and every run can carry a spend cap.

[Try it in Apify Console](https://apify.com/cozybit/google-flights-scraper)
