# Google Flights Prices: Fares, Times, Stops and Airlines (`docfoundry/google-flights-prices`) Actor

Flight prices from Google Flights for any route and dates: fare, airlines, flight numbers, times, duration, stops, layovers, aircraft, emissions and Google's price level. One-way or round trip. Fast, pay per flight.

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

## Pricing

from $0.50 / 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.

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 Airlines

Flight prices from Google Flights for any route and dates, one-way or round trip: fare, airlines, flight
numbers, departure and arrival times, duration, stops and layovers, aircraft, legroom, codeshares, CO2
emissions, and Google's own verdict on whether prices are low, typical or high. One clean record per flight.

- **Reliable.** Tested on 200 varied searches (50 routes, one-way and round trip, 1-4 adults,
  all four cabins, stop filters, 6 currencies, up to 6 months out): all 200 answered on the first try, every
  departure date and stop limit as requested. 189 returned priced flights; the other 11 asked for premium or
  first class on routes that do not sell it.
- **Your search, set exactly:** dates, number of adults, cabin class, maximum stops and currency go to
  Google as a real search, not guessed from text.
- **Every leg, not just the headline.** Flight numbers, aircraft and legroom for each leg, layover airports
  and times, and the codeshare flight numbers the same seat is sold under.
- **Fast.** Median 2.5 seconds per search, about 70 flights per search.
- **Pay per priced flight.** Flights without a price, and searches that fail or find nothing, are never
  charged.

### Input

| Field | Type | Default | Description |
|---|---|---|---|
| `routes` | array | `[]` | One per line, airport or city codes: `JFK-LIS`, `NYC-LON`. Add a date for that route only (`JFK-LIS 2026-12-10`), or two for a round trip (`LAX-NRT 2026-11-20 2026-11-30`). Empty = a free format example. |
| `departureDate` | date | today + 14 days | `YYYY-MM-DD`, for routes without their own date. |
| `returnDate` | date | none | Set it for round trips. Empty = one-way. |
| `adults` | integer | `1` | 1-9. |
| `cabinClass` | string | `economy` | `economy`, `premium-economy`, `business`, `first`. |
| `maxStops` | string | `any` | `any`, `nonstop`, `1` (1 stop or fewer), `2` (2 stops or fewer). |
| `sortBy` | string | `best` | `best` = Google's order, top flights first. `price` = cheapest first. |
| `currency` | string | `USD` | Any 3-letter code Google Flights supports. |
| `maxFlightsPerSearch` | integer | `50` | 1-300. |
| `includeFlightsWithoutPrice` | boolean | `false` | Google lists some flights with no price for your dates. Left out by default; turn on to get them too, free. |

```json
{
    "routes": ["JFK-LIS", "LAX-NRT 2026-11-20 2026-11-30"],
    "departureDate": "2026-12-10",
    "adults": 1,
    "cabinClass": "economy",
    "maxStops": "any",
    "sortBy": "price",
    "currency": "USD",
    "maxFlightsPerSearch": 50
}
```

### Output (one record per flight)

```json
{
    "status": "ok",
    "route": "JFK-LIS",
    "rank": 3,
    "tripType": "one-way",
    "price": 432,
    "currency": "USD",
    "airlines": ["Aer Lingus"],
    "airlineCode": "EI",
    "departureAirport": "JFK",
    "arrivalAirport": "LIS",
    "departureTime": "2026-12-10T17:00",
    "arrivalTime": "2026-12-11T10:10",
    "durationMinutes": 730,
    "stops": 1,
    "layovers": [{"airport": "DUB", "airportName": "Dublin Airport", "city": "Dublin", "durationMinutes": 160}],
    "legs": [
        {"flightNumber": "EI 104", "airline": "Aer Lingus", "departureAirport": "JFK", "arrivalAirport": "DUB",
         "departureTime": "2026-12-10T17:00", "arrivalTime": "2026-12-11T04:30", "durationMinutes": 390,
         "aircraft": "Airbus A330", "legroom": "31 in", "alsoSoldAs": []},
        {"flightNumber": "EI 482", "airline": "Aer Lingus", "departureAirport": "DUB", "arrivalAirport": "LIS",
         "departureTime": "2026-12-11T07:10", "arrivalTime": "2026-12-11T10:10", "durationMinutes": 180,
         "aircraft": "Airbus A320neo", "legroom": "29 in", "alsoSoldAs": []}
    ],
    "emissionsKg": 460,
    "typicalEmissionsKg": 479,
    "emissionsDiffPercent": -4,
    "isTopFlight": false,
    "priceLevel": "typical",
    "typicalPriceLow": 325,
    "typicalPriceHigh": 910,
    "searchDepartureDate": "2026-12-10",
    "searchReturnDate": null,
    "adults": 1,
    "cabinClass": "economy",
    "maxStops": "any",
    "googleFlightsUrl": "https://www.google.com/travel/flights/search?tfs=..."
}
```

- `price` is the total for all adults, including required taxes and fees, as Google shows it. For a
  round trip it is the round-trip total; the record describes the outbound flights (Google shows return
  options only after an outbound flight is picked).
- Times are local to each airport, as on the ticket.
- `priceLevel` is Google's own "Prices are currently low / typical / high" for the route, and
  `typicalPriceLow`/`typicalPriceHigh` its usual price range. Google does not show the verdict on every
  search (city codes, some cabins), and the field is then empty.
- `isTopFlight` marks Google's "Top flights" (its pick of price and convenience).
- A search with no flights gives one record with `status: "no-results"` (also for an unknown airport code);
  a search that could not be completed gives `status: "failed"` and an `error`. Neither is charged.

### Pricing

Pay per event, no subscription.

| Event | Price | When it is charged |
|---|---|---|
| Flight | **$0.0005** | Once per flight with a price delivered. 50 flights for one route = $0.025. |

Set a maximum charge in the run options and the actor stops before it would go over. Apify's standard
run-start event adds $0.00005 per run.

### Limits, stated plainly

- The flights Google lists on its results page for your search: often 20-100, up to about 300 on busy
  routes. With `sortBy: price` you get the cheapest of those.
- Prices are what Google Flights shows for your search from airline and agency sites. They change often and
  can differ from a booking site's final checkout price.
- Adults only for now. Google fills in fares with children through a step this actor does not take, so
  searches with children are not offered rather than returned half empty.
- No booking links: Google's booking options need a second step per flight.
- Public data only: no login, no personal data.

### Privacy

Only your search (route, dates, travellers, cabin) is sent to Google. Results are stored only in your run's
dataset. The actor runs with limited permissions and reads nothing else in your account.

# Actor input Schema

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

One per line, airport or city codes: "JFK-LIS", "NYC-LON". Add a date for that route only ("JFK-LIS 2026-12-10"), or two dates for a round trip ("LAX-NRT 2026-11-20 2026-11-30"). Each line is one Google Flights search. Leave empty for a free format example.

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

YYYY-MM-DD, for routes without their own date. Empty = 14 days from today.

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

YYYY-MM-DD. Set it for round trips (the price is then the round-trip total). Empty = one-way.

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

1-9. Prices are the total for all travellers.

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

Economy, premium economy, business or first. Many short routes do not sell premium economy or first.

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

Limit the number of stops per direction.

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

Best = Google's own order (top flights first). Price = cheapest first.

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

3-letter code: USD, EUR, GBP, JPY, AUD, CAD ...

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

Up to 300. Each flight is one charged result. With sort by price, these are the cheapest of the flights Google lists.

## `includeFlightsWithoutPrice` (type: `boolean`):

Google lists some flights with no price for your dates. They are left out by default; turn this on to get them too, free of charge.

## Actor input object example

```json
{
  "routes": [
    "JFK-LIS",
    "LAX-NRT"
  ],
  "adults": 1,
  "cabinClass": "economy",
  "maxStops": "any",
  "sortBy": "best",
  "currency": "USD",
  "maxFlightsPerSearch": 50,
  "includeFlightsWithoutPrice": false
}
```

# Actor output Schema

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

Every flight with price, airlines, times, stops, layovers, legs and emissions.

## `resultsCsv` (type: `string`):

The same flights as CSV.

# 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": [
        "JFK-LIS",
        "LAX-NRT"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("docfoundry/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": [
        "JFK-LIS",
        "LAX-NRT",
    ] }

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

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,docfoundry/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/O9UAmQ16ScfzxTV15/builds/UG9weaWXx0I6dKczL/openapi.json
