# Google Flights Prices: Fares, Times, Stops & Emissions (`onibaku/google-flights-prices`) Actor

Flight prices from Google Flights for any route and dates: fare for all passengers, airlines, flight numbers, departure and arrival times, duration, stops and layovers, aircraft, legroom and CO2 estimate. One way or return, any cabin, airport or city codes.

- **URL**: https://apify.com/onibaku/google-flights-prices.md
- **Developed by:** [Onibaku](https://apify.com/onibaku) (community)
- **Categories:** Travel, E-commerce
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.15 / 1,000 flight returneds

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 Prices (fares, times, stops and emissions)

Get **flight prices from Google Flights** for any route and dates. One clean row per flight: **fare for all
passengers**, airlines, flight numbers, departure and arrival times, total duration, **stops and layovers**, each leg
with aircraft and legroom, and Google's **CO2 estimate**. One way or return, economy to first, airport codes (`LHR`)
or city codes (`LON`, covering every London airport).

It reads the public Google Flights results anyone can see without logging in, so the fares are the ones travellers see
on Google for that market and currency.

### What it's for

- **Fare tracking and alerts:** run a route on a schedule and spot price drops for the dates you care about.
- **Travel startups:** feed real fares into a deals newsletter, a trip planner or a price predictor.
- **Analysts:** compare airlines, cabins and dates on a route, or track how fares move as departure gets closer.
- **Corporate travel:** check what a regular trip costs across carriers before booking.
- **AI agents:** one call answers "what's the cheapest non-stop from London to New York next month?" (see MCP below).

### Input

| Field | What it does |
| --- | --- |
| `routes` | Origin and destination as airport or city codes: `LHR-JFK`, `LON-NYC`, `MAN-AMS`. |
| `departureDate` | `YYYY-MM-DD`, or days from today (`30`), which keeps scheduled runs looking ahead. Empty means 30 days from today. |
| `returnDate` | Same formats. Leave empty for one way. |
| `adults`, `children` | Up to 9 passengers in all (default 1 adult). |
| `seatClass` | `economy`, `premium-economy`, `business` or `first`. |
| `maxStops` | Any, non-stop only, 1 stop or fewer, 2 or fewer. |
| `currency`, `language`, `country` | e.g. `GBP`, `en-GB`, `uk`. Defaults `USD`, `en`, `us`. Fares can differ by market. |
| `maxResultsPerRoute` | Default 50. Google lists every flight on one page, usually 20 to 100. |
| `proxyConfiguration` | Apify Proxy by default. Switch to the RESIDENTIAL group if runs get blocked. |

**Non-stop London to New York, a month ahead, in pounds:**

```json
{
    "routes": ["LON-NYC"],
    "maxStops": "0",
    "currency": "GBP",
    "country": "uk"
}
```

**Daily fare check for a family trip, three routes, return in a week (run on a schedule):**

```json
{
    "routes": ["MAN-PMI", "MAN-AGP", "MAN-FAO"],
    "departureDate": "60",
    "returnDate": "67",
    "adults": 2,
    "children": 2,
    "maxResultsPerRoute": 10
}
```

### Output

One row per flight:

```json
{
    "route": "LHR-JFK",
    "tripType": "one-way",
    "departureDate": "2026-11-24",
    "returnDate": null,
    "seatClass": "economy",
    "adults": 1,
    "children": 0,
    "price": 315,
    "currency": "GBP",
    "isBest": true,
    "airlines": ["Vueling", "LEVEL"],
    "flightNumbers": ["VY 7641", "LL 2627"],
    "departureAirport": "LHR",
    "arrivalAirport": "JFK",
    "departureTime": "2026-11-24T09:55",
    "arrivalTime": "2026-11-24T22:00",
    "durationMinutes": 1025,
    "stops": 1,
    "layovers": [{ "airport": "BCN", "airportName": "Josep Tarradellas Barcelona-El Prat Airport", "durationMinutes": 335 }],
    "legs": [
        { "flightNumber": "VY 7641", "airline": "Vueling", "from": "LHR", "fromName": "Heathrow Airport", "to": "BCN", "toName": "Josep Tarradellas Barcelona-El Prat Airport", "departureTime": "2026-11-24T09:55", "arrivalTime": "2026-11-24T13:10", "durationMinutes": 135, "aircraft": null, "legroom": "74 cm" },
        { "flightNumber": "LL 2627", "airline": "LEVEL", "from": "BCN", "fromName": "Josep Tarradellas Barcelona-El Prat Airport", "to": "JFK", "toName": "John F. Kennedy International Airport", "departureTime": "2026-11-24T18:45", "arrivalTime": "2026-11-24T22:00", "durationMinutes": 555, "aircraft": null, "legroom": null }
    ],
    "co2Kg": null,
    "typicalCo2Kg": 342,
    "googleFlightsUrl": "https://www.google.com/travel/flights/search?tfs=GhoSCjIwMjYtMTEtMjRqBRIDTEhScgUSA0pGS0ABSAGYAQI&hl=en-GB&gl=uk&curr=GBP",
    "scrapedAt": "2026-10-25T23:50:00.000Z"
}
```

- `price` covers every passenger, and both ways on a return trip.
- Times are local to each airport, as on the departures board. `durationMinutes` is the whole journey, layovers
  included.
- `isBest` marks the flights Google ranks as best for price and convenience.
- `co2Kg` is Google's estimate for this flight; `typicalCo2Kg` is typical for the route. `null` where Google has none.
- On a return trip the rows are the outbound flights with their return fare, as Google lists them first.

### Pricing

**$0.00015 per flight returned**, plus a token $0.00005 per run. 1,000 flights cost $0.15. Routes with no flights,
filtered-out flights and failed searches cost nothing.

### Good to know

- Fares are live: each run asks Google for your exact dates, passengers, cabin, currency and market.
- Google decides which airlines and fares it shows. Some low-cost carriers don't list on Google Flights.
- Use city codes (`LON`, `NYC`, `PAR`) to include every airport in a city in one search.
- Google limits how often one IP can search. The actor goes gently, and if Google asks to check for "unusual traffic"
  it retries on a fresh proxy IP a few times, then stops with a clear message. It never tries to solve those checks.
  If that happens often, use the RESIDENTIAL proxy group.

### Use it from Claude, ChatGPT or Cursor (MCP)

AI assistants can call this actor as a tool through Apify's MCP server. Add this server URL to your MCP client and
sign in with your Apify account when prompted:

```
https://mcp.apify.com?tools=onibaku/google-flights-prices
```

### Data source

Google Flights (google.com/travel/flights), the public, logged-out results anyone can see. Every row's
`googleFlightsUrl` opens the same search on Google Flights. Not affiliated with Google.

Questions or feature requests? Open an issue on the actor's Issues tab or email admin@onibaku.co.uk.

# Actor input Schema

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

Origin and destination as airport or city codes, e.g. LHR-JFK, LON-NYC, MAN-AMS.

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

YYYY-MM-DD, or a number of days from today (e.g. 30), which keeps scheduled runs looking ahead. Leave empty for 30 days from today.

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

YYYY-MM-DD or days from today. Leave empty for one way. On a return trip, prices are for both ways and the rows are the outbound flights.

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

Number of adult passengers (1 to 9).

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

Number of child passengers aged 2 to 11.

## `seatClass` (type: `string`):

Cabin class to price.

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

Only flights with at most this many stops.

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

Three-letter code, e.g. USD, GBP, EUR.

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

Google's language code, e.g. en, en-GB, de.

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

Two-letter country Google prices for, e.g. us, uk, de. Fares can differ by market.

## `maxResultsPerRoute` (type: `integer`):

Google lists everything on one page, usually 20 to 100 flights.

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

Google limits busy IPs. Apify Proxy is the default; switch to the RESIDENTIAL group if runs get blocked.

## Actor input object example

```json
{
  "routes": [
    "LHR-JFK"
  ],
  "adults": 1,
  "children": 0,
  "seatClass": "economy",
  "maxStops": "any",
  "currency": "USD",
  "language": "en",
  "country": "us",
  "maxResultsPerRoute": 50,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

## `overview` (type: `string`):

No description

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

No description

# 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"
    ],
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("onibaku/google-flights-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": ["LHR-JFK"],
    "proxyConfiguration": { "useApifyProxy": True },
}

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

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,onibaku/google-flights-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/1QjaYd9UD31vNlPWc/builds/VKrvz6DTXc26GDbms/openapi.json
