# Google Flights API: Flight Prices, Cheapest Dates & Itineraries (`sauliusautomatesit/google-flights-api`) Actor

Flight prices from Google Flights for any route and dates: one way or round trip, cabin, stops, airlines, every leg with flight numbers, times, layovers, aircraft and CO2. Plus a cheapest-dates price calendar. $1 per 1,000 flights.

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

## Pricing

from $0.85 / 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.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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 API: flight prices, cheapest dates and full itineraries

Get flight prices from [Google Flights](https://www.google.com/travel/flights) for any route and date, in bulk. One way or round trip, any cabin, any number of passengers, nonstop or with stops, only the airlines you want. Every flight comes with its price, airlines, flight numbers, departure and arrival times, duration, layovers, aircraft, legroom and CO2 emissions. Switch to **cheapest dates** to get Google's price calendar: the lowest fare for every departure date over the next weeks or months.

No login, no API key, no browser. **$1 per 1,000 flights**, $0.50 per 1,000 calendar dates, and searches that find nothing cost nothing.

### What you can use it for

- **Fare tracking and alerts**: schedule a run every day for the routes you care about and get the price change the moment it happens.
- **Cheapest day to fly**: price every departure date for the next 2 to 11 months in one run, for one-way or round trips of a fixed length.
- **Travel apps, deal newsletters and AI agents**: clean JSON with every leg, ready for your own search, alerts or chat assistant.
- **Airline and route research**: who flies a route, how often, how long it takes, nonstop or not, and at what price.
- **Corporate travel and budgets**: what a trip really costs in business vs economy, for a team, on given dates.

### How to use it

1. Put one route per line in **Routes**: airport codes (`LHR-JFK`), metro codes for every airport in a city (`LON-NYC`, `PAR-TYO`, `CHI-WAS`), city names (`London-New York`), or several airports on one side (`SFO,OAK-LAX`).
2. Set the **departure date**. Add a **return date** for a round trip.
3. Optional: cabin, passengers, stops, airlines, maximum price, order.
4. Optional: **Departure dates to cover** repeats every route for that many consecutive days (a round trip keeps its length).
5. Run it and download the results as JSON, CSV or Excel, or read them through the API.

For the cheapest date, set **What to get** to `Cheapest dates (price calendar)` and **Days in the price calendar** to how far ahead you want to look.

#### Input example: flights

```json
{
  "routes": ["LHR-JFK", "LON-NYC"],
  "departureDate": "2026-11-15",
  "returnDate": "2026-11-22",
  "adults": 2,
  "cabinClass": "economy",
  "maxStops": "nonstop",
  "maxFlightsPerSearch": 20,
  "currency": "USD"
}
```

#### Input example: cheapest dates

```json
{
  "routes": ["SFO-NRT"],
  "mode": "cheapest-dates",
  "departureDate": "2026-11-01",
  "calendarDays": 120,
  "tripLengthDays": 10
}
```

### Output

#### Flights

One item per flight, in Google's order (or the order you chose).

```json
{
  "type": "flight",
  "route": "LHR-JFK",
  "origin": "LHR",
  "destination": "JFK",
  "tripType": "one-way",
  "departureDate": "2026-11-15",
  "returnDate": null,
  "cabinClass": "economy",
  "adults": 1,
  "children": 0,
  "infants": 0,
  "position": 1,
  "price": 413,
  "currency": "USD",
  "airlines": ["SWISS"],
  "airlineCodes": ["LX"],
  "flightNumbers": ["LX 345", "LX 16"],
  "stops": 1,
  "durationMinutes": 735,
  "departureAirport": "LHR",
  "departureAirportName": "Heathrow Airport",
  "departureTime": "2026-11-15T06:00",
  "arrivalAirport": "JFK",
  "arrivalAirportName": "John F. Kennedy International Airport",
  "arrivalTime": "2026-11-15T13:15",
  "layovers": [
    { "airport": "ZRH", "airportName": "Zurich Airport", "city": "Zürich", "durationMinutes": 75, "changeOfAirport": false }
  ],
  "co2Grams": 356000,
  "typicalCo2Grams": 343000,
  "co2VsTypicalPercent": 4,
  "legs": [
    {
      "airline": "SWISS", "airlineCode": "LX", "flightNumber": "LX 345",
      "departureAirport": "LHR", "departureTime": "2026-11-15T06:00",
      "arrivalAirport": "ZRH", "arrivalTime": "2026-11-15T08:40",
      "durationMinutes": 100, "aircraft": "Airbus A320neo", "legroom": "29 inches", "co2Grams": 73916
    },
    {
      "airline": "SWISS", "airlineCode": "LX", "flightNumber": "LX 16",
      "departureAirport": "ZRH", "departureTime": "2026-11-15T09:55",
      "arrivalAirport": "JFK", "arrivalTime": "2026-11-15T13:15",
      "durationMinutes": 560, "aircraft": "Airbus A330", "legroom": "31 inches", "co2Grams": 281626
    }
  ],
  "isTopFlight": false,
  "lowestPriceOnRoute": 413,
  "googleFlightsUrl": "https://www.google.com/travel/flights/search?tfs=GhoSCjIwMjYtMTEtMTVqBRIDTEhScgUSA0pGS0IBAUgBmAEC&hl=en&gl=us&curr=USD",
  "scrapedAt": "2026-10-03T16:00:00.000Z"
}
```

| Field | Meaning |
|---|---|
| `price` | Total for all passengers in `currency`. Round trips: the round-trip total |
| `departureTime`, `arrivalTime` | Local time at each airport |
| `durationMinutes` | Door to door, layovers included |
| `layovers` | Every connection with its length; `changeOfAirport` flags a change such as LGW to LHR |
| `isTopFlight` | In Google's "Top flights" group |
| `co2VsTypicalPercent` | Emissions against the typical flight on the route, as Google shows it |
| `googleFlightsUrl` | The same search on Google Flights |

#### Cheapest dates

One item per departure date that has a price.

```json
{
  "type": "date-price",
  "route": "LHR-JFK",
  "tripType": "one-way",
  "departureDate": "2026-11-03",
  "returnDate": null,
  "price": 498,
  "currency": "USD",
  "isCheapestDate": false,
  "cheapestPriceInRange": 390,
  "googleFlightsUrl": "https://www.google.com/travel/flights/search?tfs=...",
  "scrapedAt": "2026-10-03T16:00:00.000Z"
}
```

### Pricing

Pay per result, no monthly fee:

| Event | Price |
|---|---|
| Flight (one row per flight) | $0.001 ($1 per 1,000) |
| Date price (one row per date, cheapest-dates mode) | $0.0005 ($0.50 per 1,000) |
| Actor start | $0.00005 |

Apify Store discounts apply on paid plans: Bronze 5%, Silver 10%, Gold and above 15%.

Examples: the 20 best flights on one route and date = $0.02. A 120-day price calendar for one route = $0.06. Ten routes tracked every day with 10 flights each = $0.10 per run, about $3 a month.

### Tips

- Use metro codes or city names to cover every airport in a city at once: `LON` covers Heathrow, Gatwick, City, Stansted and Luton.
- Round trips are priced as Google prices them: the round-trip total, shown next to each outbound flight.
- `maxStops`, `airlines` and `maxPrice` are applied by Google itself, so results match what you see on the site with the same filters.
- Schedule the Actor in Apify (daily or hourly) and connect the dataset to Google Sheets, Make, Zapier or your own API for fare alerts.
- Results are what Google shows a US searcher by default; set `country` and `currency` for another market.

### Use it from code or an AI agent

```bash
curl -X POST "https://api.apify.com/v2/acts/sauliusautomatesit~google-flights-api/run-sync-get-dataset-items?token=YOUR_TOKEN" \
  -H "content-type: application/json" \
  -d '{"routes": ["LHR-JFK"], "departureDate": "2026-11-15", "maxFlightsPerSearch": 10}'
```

AI agents can call it through the Apify MCP server: `https://mcp.apify.com/?tools=sauliusautomatesit/google-flights-api`.

### Related Actors

- [Google Hotels API](https://apify.com/sauliusautomatesit/google-hotels-api): hotel prices for the same trip, with every booking site's price.
- [Google Trends API](https://apify.com/sauliusautomatesit/google-trends-api): search interest for destinations over time.

### FAQ

**Is it legal?** It reads public Google Flights results that anyone can open without logging in. You are responsible for how you use the data.

**Why does a search return fewer flights than I asked for?** Google lists a limited number of options per route and date, usually 10 to 60. Nonstop-only or airline filters shrink that further.

**Can I book through it?** No. It returns prices and itineraries; `googleFlightsUrl` opens the same search on Google Flights, where you can pick the flight and booking site.

**Do I get return flights for a round trip?** Each row shows the outbound itinerary with the round-trip price, the way Google lists round trips first. Run the return direction as its own route if you need the return legs too.

**Something broke or you need a field?** Open an issue on the Actor's Issues tab and it will be looked at quickly.

# Actor input Schema

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

One route per line, origin then destination: airport codes (`LHR-JFK`), metro codes for every airport in a city (`LON-NYC`, `PAR-TYO`), city names (`London-New York`) or several airports on one side (`SFO,OAK-LAX`).

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

`flights`: every flight Google lists for the date, with price and full itinerary. `cheapest-dates`: the lowest price for each departure date over a range (Google's date grid), to find the cheapest day to fly.

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

YYYY-MM-DD. Leave empty for 30 days from today. In cheapest-dates mode this is the first date of the range.

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

Optional, YYYY-MM-DD. Makes it a round trip: prices are the round-trip total and each row shows the outbound itinerary. In cheapest-dates mode it sets the trip length kept for every date.

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

Instead of a return date: return this many days after each departure. Useful with `Departure dates to cover` and in cheapest-dates mode. Ignored when a return date is set.

## `departureDays` (type: `integer`):

Flights mode: repeat every route for this many consecutive departure dates, starting at the departure date (a round trip keeps its length). Each date is its own search.

## `calendarDays` (type: `integer`):

Cheapest-dates mode: how many departure dates to price, starting at the departure date.

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

Prices are for all passengers together.

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

Children aged 2 to 11.

## `infantsInSeat` (type: `integer`):

Infants under 2 with their own seat.

## `infantsOnLap` (type: `integer`):

Infants under 2 on an adult's lap (one per adult).

## `cabinClass` (type: `string`):

Economy, premium economy, business or first.

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

Most stops allowed on each way.

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

Optional. Only these airlines: two-character codes (`BA`, `UA`, `LH`) or an alliance (`ONEWORLD`, `SKYTEAM`, `STAR_ALLIANCE`). Google also keeps flights sold by their partners.

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

Optional. Skip flights above this total price, in the chosen currency.

## `sortBy` (type: `string`):

Order of flights in each search. `top` is Google's own best-flights order.

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

Stop after this many flights for each route and date. Google usually lists 10 to 60.

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

Three-letter code: `USD`, `EUR`, `GBP`, `INR`, `JPY`...

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

Google interface language for airport and airline names, for example `en`, `de`, `fr`.

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

Two-letter country code Google uses for the searcher, for example `us`, `gb`, `de`.

## `concurrency` (type: `integer`):

How many searches run at the same time.

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

Apify Proxy is used by default. You do not need to change this.

## Actor input object example

```json
{
  "routes": [
    "LHR-JFK"
  ],
  "mode": "flights",
  "departureDays": 1,
  "calendarDays": 60,
  "adults": 1,
  "children": 0,
  "infantsInSeat": 0,
  "infantsOnLap": 0,
  "cabinClass": "economy",
  "maxStops": "any",
  "sortBy": "top",
  "maxFlightsPerSearch": 30,
  "currency": "USD",
  "language": "en",
  "country": "us",
  "concurrency": 4,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

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

One item per flight (or per date in cheapest-dates mode). Download as JSON, CSV or Excel, or read it from this API endpoint.

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

Searches, flights and dates delivered, searches without results and failures.

# 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": [
        "LHR-JFK"
    ]
};

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

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

```

## MCP server setup

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

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/fP4OUT4UfeaJ0QWWh/builds/lbpYdQww5ZvspobqB/openapi.json
