# Google Flights Prices API (`insights_data/google-flights-prices-api`) Actor

Google Flights prices API & scraper: get live fares, schedules, stops, layovers, airlines, CO2 and booking options for one-way, round-trip and multi-city routes. Export flight price data to JSON, CSV or Excel.

- **URL**: https://apify.com/insights_data/google-flights-prices-api.md
- **Developed by:** [Insights Data](https://apify.com/insights_data) (community)
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.45 / 1,000 results

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.
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

### What is Google Flights Prices API?

**Google Flights Prices API** collects live Google Flights prices and schedules as clean, structured data for travel startups, fare sites, travel agencies, analysts and developers, so you can work with flight fares the way you would with a Google Flights API. Paste one or many Google Flights links (or type a route) and get one row per flight option with price, airlines, flight numbers, times, stops, layovers, duration, cabin and carbon estimate. No coding is needed: the input is prefilled with one Los Angeles to New York search, so you can click **Start** right away; on the Apify Free plan you get up to 10 flights per run, shared by all searches.

> ⚠️ **Apify Free plan:** a run saves **up to 10 flights in total, shared by all searches in that run**. If you add several routes, the first ones can use up the 10 flights and the rest end as `skipped`. Test one route first.

You get airfare data as JSON, CSV or Excel instead of copying it from a browser by hand.

- ✈️ **Flight price monitoring tool:** schedule runs for the routes you care about and compare fares over time in your own sheet or database.
- 📱 **Travel apps and fare sites:** use it as a flight fare API and feed fares, airlines, durations and stops straight into your product.
- 📊 **Route and airline research:** flight price comparison across airlines, nonstop options, cabins and markets, plus Google's price level for each route.
- 🧳 **Travel agencies and corporate travel:** check fares and where to book them for many routes in one run.
- 🌱 **Sustainability reporting:** compare the Google Flights carbon emissions estimate of each flight with what is typical for the route.
- 🤖 **AI agents and assistants:** give trip-planning agents a flight price data API through the Apify API or MCP.

**Google offers no public Google Flights API (its QPX Express flight search API was shut down on April 10, 2018). Google Flights Prices API is an independent Apify Actor, not an official Google product: you run it in Apify Console or through the [Apify API](https://docs.apify.com/api/v2).**

#### What can Google Flights Prices API do?

- 🔗 **Bulk input:** many Google Flights links, a list of routes and a single route typed in the form, all in one run. Each one becomes its own search.
- 🧭 **Any trip type:** one-way, round trip and multi-city searches, in any cabin (economy, premium economy, business, first) for up to 9 passengers.
- 🎯 **Filters:** maximum stops, maximum price, airlines or alliances, and Exclude Basic Economy.
- 🌍 **Markets:** choose the currency, country and language Google Flights should use.
- 📈 **Google Flights price insights:** lowest price, price level (low, typical or high), typical price range and the price history Google shows.
- 🎫 **Booking options (optional):** see which airlines and travel sites sell each flight and at what price.
- ⚡ **Live output:** each flight is saved the moment it is read, so rows appear while the run is still going.
- 📦 **Export and automate:** download JSON, CSV, Excel, XML or HTML, run it via API, schedule runs, monitor them and connect other tools on the Apify platform.

***

### What data can Google Flights Prices API extract?

Every flight option becomes one row in the **Flights** table. These are the Google Flights data fields you get, with the exact field names:

| | |
|---|---|
| 💲 Price and currency: `price`, `currency` | ⭐ Google's top picks (`best`) or the rest (`other`): `category` |
| ✈️ Airlines and logo: `airlines`, `airline_logo` | 🔢 Flight numbers: `flight_numbers` |
| 📍 Route and airports: `route`, `departure_airport`, `arrival_airport` | 📅 Local times: `departure_time`, `arrival_time` |
| 🔁 Stops: `stops`, `stops_label`, `layover_airports` | ⏱️ Duration: `duration_minutes`, `duration` |
| 💺 Cabin: `travel_class` | 📅 Search dates: `outbound_date`, `return_date` |
| 🌙 Overnight flag: `overnight` | ⚠️ Often delayed by over 30 minutes: `often_delayed` |
| 🌱 Carbon estimate in grams: `carbon_emissions_g` | 🌱 This flight vs typical for the route: `carbon_emissions` |
| 🧭 Each leg with airplane, legroom, Wi-Fi and power: `flights` | 🛬 Layover duration and airport: `layovers` |
| 🔑 Tokens for later runs: `booking_token`, `departure_token` | 🔎 Trip type and search: `trip_type`, `search_number`, `page_number` |
| 🔗 Source link: `source_url` | 🕒 Search time (UTC): `search_timestamp` |

Each run also fills four more tables:

| Table | What it contains |
|---|---|
| 📈 **Price insights** | One row per search: `lowest_price`, `price_level` (low / typical / high), `typical_price_low`, `typical_price_high`, `price_history` |
| 🛬 **Airports** | The airports and cities of each search with `airport_name`, `city`, `country`, `country_code`, `image` and `thumbnail` |
| 🎫 **Booking options** | Only when you turn them on: `book_with`, `airline`, `price`, `option_title`, `marketed_as`, `display_url`, `booking_request` |
| 🧾 **Search summary** | One row per search: `status`, `stopped_reason`, `flights_saved`, `booking_options`, `search_parameters`, `source` |

> **Note:** Some fields are empty (`null`) when Google Flights doesn't show them for a flight. For example, `layover_airports` is `null` for nonstop flights, `return_date` is `null` for one-way trips, and `booking_token` is only set on one-way or final-leg results while `departure_token` is set on round-trip outbound results. Price insights appear only when Google provides them for the search.

#### What data can't Google Flights Prices API extract?

- Seat maps, baggage fees or fare rules
- Price history beyond the `price_history` series Google shows in its price insights
- Flexible-date, calendar or "explore anywhere" searches: each search is one route with fixed dates
- More than 2 result pages per search (top results and the longer "more flights" list)
- Hotel or car rental data (for hotel prices, see [Google Hotels Scraper](https://apify.com/insights_data/google-hotels-scraper))
- Ticket purchases: booking options only point you to the seller

***

### How to scrape Google Flights data

Google Flights Prices API is designed for an easy start, even if you've never extracted data from the web before. For your first run, use the prefilled search and a small limit.

1. [Create a free Apify account](https://console.apify.com/sign-up) using your email.
2. Open [Google Flights Prices API](https://apify.com/insights_data/google-flights-prices-api).
3. Keep the prefilled link in **Google Flights URLs** as it is (Los Angeles to New York, May 10 to 17, 2027) and set **Maximum flights per search** (`maxResults`) to 10 for a cheap first test.
4. Click **Start** and watch the flights appear in the **Output** tab.
5. Download your data in JSON, CSV, Excel, XML or HTML. To export Google Flights to Excel as a flat sheet, pick Excel and the Flights overview view.

When the test looks right, replace the link with your own: run a search on [Google Flights](https://www.google.com/travel/flights), copy the address bar and paste it into **Google Flights URLs**. Have several routes? Add more links or use **Bulk routes**. On the Free plan, remember that the 10 flights per run are shared by all searches.

***

### How much does it cost to scrape Google Flights?

Google Flights scraping with Google Flights Prices API uses **pay-per-event** pricing. Your cost has three parts:

1. **Apify platform usage:** the compute, data transfer and (if the run uses it) Apify Proxy traffic of your run. It depends on the run, so it isn't included in the examples below. You see the exact amount on each run's page in Apify Console. The Actor starts without a proxy, but it switches to Apify Proxy on its own if requests are blocked or fail, which adds proxy traffic to your platform usage. Do a small test run first to see what your routes cost.
2. **Results:** $3.50 per 1,000 flight rows saved to the Flights table on the Free plan (lower on paid plans, see below).
3. **Start fee:** $0.00005 per run at the default 1 GB of memory. The fee is $0.00005 per GB, so it only changes if you give the run more memory.

| 💲 Event | Price | When it is charged |
|---|---|---|
| Result | **$3.50 per 1,000 results** ($0.0035 per result) on the Free plan (lower on paid plans, see below) | Once for each flight row saved to the **Flights** table |
| Actor start | **$0.00005 per GB** of run memory | Once per run. At the default 1 GB memory that's $0.00005 per run |

| Apify plan | Price per flight | Price per 1,000 flights |
|---|---|---|
| Free | $0.0035 | $3.50 |
| Starter | $0.00315 | $3.15 |
| Scale | $0.0028 | $2.80 |
| Business and higher | $0.00245 | $2.45 |

Paid Apify plans get a lower price per flight. The plan discount applies to that price only. The start fee is the same on every plan, and platform usage is billed at your Apify plan's own rates.

- **Only Flights rows are charged.** Rows in the Price insights, Airports, Booking options and Search summary tables are free.
- **Result fees grow with searches × `maxResults`.** `maxResults` is a cap **per search**, so 3 routes at the default 100 can save up to 300 rows, which is up to $1.05 in result fees at the Free plan price.

**Example costs for results** at the Free plan price (platform usage not included):

| Flights saved | Result cost | Plus start fee at 1 GB |
|---|---|---|
| 10 | $0.035 | $0.00005 |
| 100 (the default `maxResults` for one search) | $0.35 | $0.00005 |
| 1,000 | $3.50 | $0.00005 |

See the [pricing tab](https://apify.com/insights_data/google-flights-prices-api/pricing) for the current event list.

#### Is scraping Google Flights free?

You can try it for free. On the [Apify Free plan](https://apify.com/pricing) you get monthly platform credit, and a run saves **up to 10 flights in total, shared by all searches in that run**. When the 10th flight is saved, the run stops cleanly: searches still running end early, and searches that haven't started yet are marked `skipped` in the Search summary. Paid Apify plans have no free-plan cap.

***

### Google Flights API input

You need **at least one search**: a Google Flights link in `urls`, a route in `searches`, or the single-route fields (`departure_id`, `arrival_id`, `outbound_date`). Everything else is optional and has sensible defaults. If the input contains no valid search, the run fails with a message that explains what to add.

Here's an example that gets the top results for a Los Angeles to New York round trip, May 10 to 17, 2027, capped at 10 flights:

```json
{
  "urls": [
    { "url": "https://www.google.com/travel/flights?q=Flights%20from%20LAX%20to%20JFK%20on%202027-05-10%20through%202027-05-17" }
  ],
  "maxResults": 10,
  "max_pages": 1
}
```

See the [input tab](https://apify.com/insights_data/google-flights-prices-api/input-schema) for a full description of all fields.

#### Google Flights URLs (`urls`)

Paste one or many real Google Flights search links. The Actor reads the route, dates, trip type, cabin and passengers from each link. It supports links with `?tfs=…` (copied from the address bar after a search), `?q=Flights from LAX to JFK on 2027-05-10` (add `through <date>` for a round trip) and `#flt=LAX.JFK.2027-05-10`.

- ✅ Good: `https://www.google.com/travel/flights?q=Flights%20from%20LAX%20to%20JFK%20on%202027-05-10%20through%202027-05-17`
- ❌ Bad: `https://www.google.com/travel/flights` (the home page has no search in it) or `?q=Flights from Paris to London` (`?q=` links need 3-letter airport codes and a `YYYY-MM-DD` date)

> ⚠️ Settings stored in a link (route, dates, trip type, cabin, passengers, stops, airlines, and currency, language or country when the link has them) override the same settings in the form for that search.

#### Bulk routes (`searches`)

Add several routes in one run. In Apify Console, each item has four boxes: **From** (`departure_id`), **To** (`arrival_id`), **Outbound date** (`outbound_date`) and an optional **Return date** (`return_date`). Leave the return date empty for a one-way trip. All other settings in the form (cabin, passengers, filters, market) apply to every route. Through the API, each item is a JSON object:

- ✅ Good: `{ "departure_id": "SFO", "arrival_id": "SEA", "outbound_date": "2027-05-01" }`
- ❌ Bad: `{ "departure_id": "SFO", "arrival_id": "SFO", "outbound_date": "2020-01-01" }` (same airport twice and a date in the past)

> ⚠️ Invalid items are skipped and listed in the Search summary with the status `invalid_input`. The other searches still run.

#### Single route and Google Flights multi city trips

`departure_id` and `arrival_id` take IATA airport codes like `LAX`, or several codes separated by commas (`LAX,BUR`). They also accept a Google city id such as `/m/030qb3t`, but airport codes are all most searches need. `outbound_date` and `return_date` use the `YYYY-MM-DD` format and must be today or later, and no more than 329 days (about 11 months) ahead. With `trip_type` set to `auto`, a return date makes it a round trip, and no return date makes it one-way.

For Google Flights multi city trips, put the legs in `multi_city_json` as a JSON list in travel order:

- ✅ Good: `[{"departure_id":"LAX","arrival_id":"JFK","date":"2027-05-10"},{"departure_id":"JFK","arrival_id":"LHR","date":"2027-05-14"}]`
- ❌ Bad: `LAX-JFK 2027-05-10, JFK-LHR 2027-05-14` (not JSON)

> ⚠️ `trip_type` and `multi_city_json` apply only to the single-route form, not to `urls` or `searches` items. To run several multi-city trips at once, paste multi-city Google Flights links.

#### Filters: stops, price and airlines

- **Google Flights nonstop only:** set `max_stops` to `nonstop` (other options: `any`, `1_stop`, `2_stops`).
- **Airlines or alliances:** `airlines` takes codes like `DL,B6` or `STAR_ALLIANCE`, `SKYTEAM`, `ONEWORLD`.
- **Exclude Basic Economy:** `exclude_basic` works for the economy cabin only.
- **Maximum price:** `max_price` in your selected `currency`.

> ⚠️ `max_price` is a filter sent to Google Flights. If Google still returns flights above your cap, they are saved and a warning appears in the log.

#### Maximum flights per search (`maxResults`) and result pages (`max_pages`)

`maxResults` (default 100) caps the flights **per search**, not per run. `max_pages` (default 2) sets how many result pages each search reads: 1 gets the top results, 2 also gets the longer "more flights" list. Flights that appear on both pages are saved once.

#### Google Flights booking options

Turn on `fetch_booking_options` to see where each flight can be booked: airlines and travel sites, with price and fare name. `max_booking_lookups` (default 10, up to 200) sets how many of the first saved flights per search get booking options. This adds extra requests and run time.

#### How to get return flights for a Google Flights round trip

The Flights table of a round-trip search lists the **outbound** options, and `price` is the price of the full trip for that outbound choice. To get the matching return flights:

1. Run the round-trip search (a link, a bulk route with a return date, or the single-route fields with a return date).
2. In the Flights table (the itinerary view shows the tokens), copy the `departure_token` of the outbound flight you want.
3. Start a new run with **exactly one search**: the same link, or the same route and dates, and paste the token into **Departure token** (`departure_token`).
4. The new run returns the return flights for that outbound choice. Their rows carry a `booking_token`.
5. Optional: to see where that trip can be booked, start one more single-search run with the same route and dates and paste the `booking_token` into **Booking token** (`booking_token`). That run returns only booking options.

> ⚠️ Tokens work only when the run has a single search. When the run has more than one search (several links, bulk routes, or a link plus the route form), the tokens are ignored, so you need one run per outbound flight. Only tokens from this Actor are accepted. The same steps work for the next leg of a multi-city trip.

#### Proxy and retries

By default, the Actor starts without a proxy. It switches to Apify Proxy on its own if requests are blocked or fail, which adds proxy traffic to your platform usage. You can also choose Apify Proxy or your own proxies from the start in `proxyConfiguration`. `maxRetries` (default 3) sets how often a failing request is retried, and `maxConcurrency` (1 to 5, default 2) sets how many searches run at the same time.

***

### Google Flights API output

Results are stored in the **Output** or **Storage** tab. Open the Flights table as an overview, itinerary or carbon emissions view, pick only the fields you need, and download your Google Flights export as JSON, CSV, Excel, XML or HTML. The Price insights, Airports, Booking options and Search summary tables are separate datasets of the same run, and a short run summary is saved in the key-value store as `OUTPUT`.

> **Spreadsheets:** `flights`, `layovers` and `carbon_emissions` are nested fields. In CSV and Excel they are split into many columns (for example `flights/0/airline`). For a flat sheet, download the **overview** view (12 main columns) or select only the top-level fields you need.

#### Google Flights JSON example

The flight below shows the shape of one row for the input example above. The values are **illustrative only** (not real output), and the token and leg details are shortened with "…":

```json
{
  "category": "best",
  "price": 384,
  "currency": "USD",
  "airlines": "American",
  "airline_logo": "https://www.gstatic.com/flights/airline_logos/70px/AA.png",
  "route": "LAX-JFK",
  "departure_airport": "LAX",
  "departure_time": "2027-05-10 08:00",
  "arrival_airport": "JFK",
  "arrival_time": "2027-05-10 16:17",
  "stops": 0,
  "stops_label": "Nonstop",
  "layover_airports": null,
  "duration_minutes": 317,
  "duration": "5h 17m",
  "travel_class": "Economy",
  "flight_numbers": "AA 307",
  "outbound_date": "2027-05-10",
  "return_date": "2027-05-17",
  "overnight": false,
  "often_delayed": false,
  "carbon_emissions_g": 274000,
  "booking_token": null,
  "departure_token": "…",
  "trip_type": "Round trip",
  "search_number": 1,
  "page_number": 1,
  "source_url": "https://www.google.com/travel/flights?q=Flights%20from%20LAX%20to%20JFK%20on%202027-05-10%20through%202027-05-17",
  "flights": [
    {
      "departure_airport": { "name": "Los Angeles International Airport", "id": "LAX", "time": "2027-05-10 08:00" },
      "arrival_airport": { "name": "John F. Kennedy International Airport", "id": "JFK", "time": "2027-05-10 16:17" },
      "duration": 317,
      "airline": "American",
      "travel_class": "Economy",
      "flight_number": "AA 307",
      "extensions": ["…"]
    }
  ],
  "layovers": [],
  "carbon_emissions": { "this_flight": 274000, "typical_for_this_route": 290000, "difference_percent": -6 },
  "search_timestamp": "2026-10-08T10:00:00Z"
}
```

For a round trip, `price` is the price of the full trip for this outbound choice. See [How to get return flights](#how-to-get-return-flights-for-a-google-flights-round-trip) for the matching return legs.

#### Price insights example

One illustrative row from the Price insights table for the same search:

```json
{
  "search_number": 1,
  "route": "LAX-JFK",
  "outbound_date": "2027-05-10",
  "return_date": "2027-05-17",
  "currency": "USD",
  "lowest_price": 384,
  "price_level": "typical",
  "typical_price_low": 340,
  "typical_price_high": 520,
  "price_history": [[1791000000, 410], [1791086400, 395]],
  "search_timestamp": "2026-10-08T10:00:00Z"
}
```

`price_history` is a list of `[unix timestamp, price]` pairs, the same Google Flights price history Google shows in its price insights, when Google provides it.

***

### Tips and advanced usage

#### How many results can you scrape with Google Flights Prices API?

The number depends on the route, dates and filters. Each search stops at whichever comes first:

- the `maxResults` cap for that search (100 by default);
- the end of the result pages it reads (`max_pages`, 2 by default: top results and "more flights");
- the Free plan's 10 flights per run, shared by all searches;
- your run's spending limit;
- repeated connection failures, after which the run stops sending requests and keeps what it saved.

Invalid or duplicate searches are skipped. The best way to know for your routes is a quick test run with `maxResults` set to 10.

#### How to get faster or cheaper results

- Set `max_pages` to 1 if Google's top results are enough.
- Lower `maxResults` to pay only for the flights you need.
- Use filters (`max_stops`, `airlines`, `exclude_basic`) so Google Flights returns fewer, more relevant flights.
- Leave `fetch_booking_options` off unless you need sellers. It adds requests and run time (booking options rows are not charged as results).
- Put many routes in one run with `searches` or several links, and raise `maxConcurrency` (up to 5) to run more searches at the same time.

#### Monitor fares with scheduled runs

The Actor has no built-in price alerts, but it works well for travel price monitoring. Create an [Apify schedule](https://docs.apify.com/platform/schedules) that runs your routes every day, send each run's results to Google Sheets or your database, and compare `price` and `lowest_price` over time to build your own Google Flights dataset. A [webhook](https://docs.apify.com/integrations/webhooks) can notify you when a run finishes.

#### Known issues

- **Duplicate check:** searches that differ only in country (`gl`), language (`hl`), `max_price`, `exclude_basic` or `max_pages` count as duplicates, and the later one is skipped. To compare markets, also change the currency or the route.
- **Failed searches:** if a search fails unexpectedly, its Search summary row shows `flights_saved` 0, even if some of its flights were already saved (and charged). The Flights table (filter by `search_number`) and the run's status message show the true number of saved flights.
- **Booking options after the cap:** once a run stops (the Free plan's 10-flight cap or your spending limit), no more booking options are fetched.
- **Past dates:** dates must be today or later, so update old links and routes before you reuse them.

***

### Google Flights API integrations

#### Can I use Google Flights Prices API as an API?

Yes. The [Apify API](https://docs.apify.com/api/v2) lets you start runs, schedule them and fetch results, so you can use the Actor as a Google Flights price API in your own app. Use the `apify-client` [NPM package](https://apify.com/insights_data/google-flights-prices-api/api/javascript) for Node.js or the `apify-client` [PyPI package](https://apify.com/insights_data/google-flights-prices-api/api/python) for Python. The [API tab](https://apify.com/insights_data/google-flights-prices-api/api) has ready-to-use code. You authenticate with your Apify API token; no Google Flights API key or Google account is needed.

#### Google Flights API Python example

```python
from apify_client import ApifyClient

client = ApifyClient("<YOUR_API_TOKEN>")

run_input = {
    "urls": [
        {"url": "https://www.google.com/travel/flights?q=Flights%20from%20LAX%20to%20JFK%20on%202027-05-10%20through%202027-05-17"}
    ],
    "maxResults": 10,
    "max_pages": 1,
}

run = client.actor("insights_data/google-flights-prices-api").call(run_input=run_input)

## Flights table (the run's default dataset)
for flight in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(flight["route"], flight["airlines"], flight["price"], flight["currency"])

## Other tables of the same run: priceInsights, airports, bookingOptions, searchSummary
tables = run["storageIds"]["datasets"]
for row in client.dataset(tables["priceInsights"]).iterate_items():
    print(row["route"], row["lowest_price"], row["price_level"])

## Short run summary
summary = client.key_value_store(run["defaultKeyValueStoreId"]).get_record("OUTPUT")
```

This example uses the Actor as a Google Flights data API: it starts a run, waits for it to finish and reads the tables. The run object lists the dataset ID of every table under `storageIds.datasets`; you can also copy a table's dataset ID from the run's **Storage** tab. If you were looking for a Google Flights live API, note that each run reads current prices from Google Flights when it runs; there is no streaming.

#### Can I integrate Google Flights Prices API with other apps?

Yes. Connect it with almost any cloud service through [Apify integrations](https://apify.com/integrations): **Make, Zapier, Slack, Google Sheets, Google Drive, Airbyte, GitHub, LangChain** and more. Use [webhooks](https://docs.apify.com/integrations/webhooks) to trigger actions when a run finishes. For example: run your routes every morning, add the new fares to a Google Sheet, and post the run's lowest price to a Slack channel.

#### Can I use Google Flights Prices API with AI agents (MCP)?

Yes. Connect it to Claude and other AI assistants through the Apify MCP server, so an agent can look up flights and get structured results. Open the [MCP tab](https://apify.com/insights_data/google-flights-prices-api/api/mcp) for the Google Flights API MCP setup steps.

***

### Other Google and data scrapers

These Actors from the same team cover other travel, data and research tasks, from Google Hotels prices and Google ads to Flipkart product prices, stock sentiment and Y Combinator companies:

| | |
|---|---|
| 🏨 [Google Hotels Scraper](https://apify.com/insights_data/google-hotels-scraper): hotel prices, ratings, star class, amenities, coordinates, photos and booking links for any city or hotel; compare rates by dates, guests and currency | 🔍 [Google Ads Transparency Center Scraper & API](https://apify.com/insights_data/google-ads-transparency-center-scraper-api): extract ads across Search, YouTube, Shopping, Maps and Play by brand, domain or advertiser ID |
| 🛒 [Flipkart Product Scraper](https://apify.com/insights_data/flipkart-product-scraper): Flipkart prices, discounts, ratings, specs, sellers and offers for price monitoring | 📈 [Stocktwits Scraper](https://apify.com/insights_data/stocktwits-scraper): stock and crypto messages, sentiment, price targets and trending symbols |
| 🚀 [Y Combinator Scraper](https://apify.com/insights_data/y-combinator-scraper): company profiles, founders, open roles and Launch YC posts | |

***

### ❓ FAQ

#### Is there a Google Flights API?

No, Google doesn't offer a public Google Flights API. There has been no public Google flight search API since QPX Express was shut down on April 10, 2018. Google Flights Prices API is a Google Flights API alternative: an Apify Actor that collects the same flight results you see on Google Flights and returns them as data you can call through the Apify API. Google Flights is part of Google Travel, so the Actor can also stand in for a Google Travel flights API when you need flight results.

#### Is it legal to scrape Google Flights?

Flight prices and schedules on Google Flights are public, non-personal data. Whether collecting them is fine for your project depends on your country, how you use the data and Google's [Terms of Service](https://policies.google.com/terms). Respect intellectual property rules and have a legitimate reason for your project. If you're unsure, ask a lawyer: this answer is not legal advice.

#### How does Google Flights Prices API work?

It's a Google Flights web scraper that reads the same results you see in your browser. For each search, it reads the route, dates, cabin and passengers from your link or the form, checks them, and loads the Google Flights results: first the top results, then (with `max_pages` 2) the longer "more flights" list. Each flight option becomes a flat row that is saved right away, together with Google's price insights and the airports of the search. If booking options are on, it then looks up where the first flights can be booked, and a Search summary row records the status of each search.

#### How is Google Flights Prices API different from checking Google Flights by hand?

| Feature | Google Flights Prices API | Checking Google Flights by hand |
|---|---|---|
| Many routes in one go | ✅ Links, route lists and a single route in one run | ❌ One search at a time |
| Structured data | ✅ JSON, CSV, Excel, XML or HTML | ❌ Copy and paste |
| Price insights, airports and booking options in tables | ✅ | ❌ Only on screen |
| Scheduled runs and integrations | ✅ Through the Apify platform | ❌ |
| Cost | Pay per flight saved, plus a start fee and platform usage (see [pricing](#how-much-does-it-cost-to-scrape-google-flights)) | Free, but manual |

#### Do I need a Google account or a Google Flights API key?

No. You don't need a Google account, login or Google Flights API key. You only need an Apify account, and an Apify API token if you call it from code.

#### Can I use it as a cheap flights API?

Yes, within the routes and dates you search. Sort the Flights table by `price`, or read `lowest_price` and `price_level` in the Price insights table. It doesn't search flexible dates or "anywhere" destinations: each search is one route with fixed dates.

#### Can it track prices or send price alerts?

Not on its own. There are no built-in alerts or comparisons over time. To use it for flight price monitoring, schedule runs on Apify and compare the results in a sheet or database, as described in [Monitor fares with scheduled runs](#monitor-fares-with-scheduled-runs).

#### Why use a Google Flights scraper?

A Google Flights scraper turns fares you would otherwise copy by hand into rows you can sort, filter and analyze. You can check many routes in one run, keep a travel product's fares fresh, and compare airline prices over time without manual work. Because it's a hosted Google Flights API scraper, you also don't have to keep your own code up to date when the site changes.

#### Why am I getting fewer results than expected?

1. Check the Search summary table: `invalid_input` means the input needs fixing, `skipped` means the run had already stopped (the Free plan cap or your spending limit was reached), and `no_results` means no flights came back for that search: either Google Flights lists no flights for that route, dates and filters, or it returned an empty answer for that search (check the log).
2. Look at `stopped_reason`: `max_results`, `free_limit` or `spend_limit` show why a search stopped.
3. For a search with status `failed`, count its rows in the Flights table by `search_number`: its `flights_saved` shows 0 even if some flights were saved.
4. Loosen your filters (`max_stops`, `airlines`, `exclude_basic`) or raise `maxResults` and set `max_pages` to 2.
5. Make sure the dates are today or later (and no more than 329 days ahead) and the airport codes are right. Searches differing only in `gl`, `hl`, `max_price`, `exclude_basic` or `max_pages` count as duplicates.

#### What does a failed run look like?

- **No valid search in the input:** the run ends with the status **Failed** and the message "No valid flight search to run. Paste Google Flights URLs, add searches, or fill the route fields." Fix the input and start again.
- **Google Flights can't be reached:** the log says that many requests in a row could not reach Google Flights. The Actor stops sending requests, keeps everything it saved, marks the affected searches as `failed` in the Search summary, and finishes with a status message like "Done: 0 flights saved." If you set your own proxies, check them, or select Apify Proxy in `proxyConfiguration`, then try again. A search where none of the result pages could be loaded usually ends as `failed` too, so check the log for pages that could not be loaded.
- **One search fails:** the log says that search failed unexpectedly and the run continues with the others.

First check the run's status message, then the Search summary table, then the log. If the problem repeats, report it on the Issues tab with a link to the run.

#### Do I have to maintain my own Google Flights crawler?

No. Google Flights Prices API is a hosted Google Flights extractor on Apify. You don't install or update anything: you set the input, run it, and get the data. If something breaks, report it on the Issues tab.

***

### Support and feedback

We're always working on improving Google Flights Prices API. Found a bug or have a feature request? Please create an issue on the [Issues tab](https://apify.com/insights_data/google-flights-prices-api/issues/open).

Need a **custom solution**, a different output format or more travel data? Contact us at hello.insights.data@gmail.com.

Built and maintained by [Insights Data](https://apify.com/insights_data).

# Changelog

This Actor's version history is a separate document: https://apify.com/insights_data/google-flights-prices-api/changelog.md

# Actor input Schema

## `urls` (type: `array`):

**One or many** Google Flights search links (bulk supported). Open [Google Flights](https://www.google.com/travel/flights), run your search, copy the address bar and paste it here.

Supported: links with `?tfs=…`, `?q=Flights from LAX to JFK on 2026-11-04`, or `#flt=LAX.JFK.2026-11-04`. Route, dates, trip type, cabin and passengers are read from each link. Don't have a link? Leave this empty and use the route fields below.

## `searches` (type: `array`):

Add several routes in one run. Each item is one search with its own route and dates (airport codes like `LAX`, comma-separated codes like `LAX,BUR`, or a city id like `/m/030qb3t`). Leave `return_date` empty for a one-way trip. All other settings below apply to every route.

## `departure_id` (type: `string`):

IATA airport code(s) like `LAX`, several separated by commas (`LAX,BUR`), or a city id like `/m/030qb3t`. Used when you don't paste links.

## `arrival_id` (type: `string`):

IATA airport code(s) like `JFK`, several separated by commas, or a city id.

## `outbound_date` (type: `string`):

Departure date in `YYYY-MM-DD` format. Must be today or later.

## `return_date` (type: `string`):

Return date in `YYYY-MM-DD`. Leave empty for a one-way trip.

## `trip_type` (type: `string`):

`Auto` = round trip when a return date is given, otherwise one-way. Multi-city needs the legs below.

## `multi_city_json` (type: `string`):

Optional. A JSON list of legs in travel order, e.g. `[{"departure_id":"LAX","arrival_id":"JFK","date":"2027-05-10"},{"departure_id":"JFK","arrival_id":"LHR","date":"2027-05-14"}]`. When set, the search becomes multi-city.

## `travel_class` (type: `string`):

Cabin to price.

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

Number of adults (at least 1).

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

Number of children (2–11 years).

## `infants` (type: `integer`):

Infants traveling on an adult's lap (cannot exceed the number of adults).

## `max_stops` (type: `string`):

Only return flights with up to this many stops.

## `max_price` (type: `integer`):

Only flights up to this price, in the currency selected below. Leave empty for no cap.

## `airlines` (type: `string`):

Comma-separated airline codes (`DL,B6`) or alliances (`STAR_ALLIANCE`, `SKYTEAM`, `ONEWORLD`). Leave empty for all airlines.

## `exclude_basic` (type: `boolean`):

Drop Basic Economy fares. Applies to the economy cabin only.

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

Three-letter currency code for prices, e.g. `USD`, `EUR`, `GBP`.

## `gl` (type: `string`):

Two-letter country code of the market to search from, e.g. `us`, `de`, `gb`.

## `hl` (type: `string`):

Language code for names and labels, e.g. `en`, `de`, `fr`.

## `maxResults` (type: `integer`):

Stop each search after this many flights. Free plan: up to 10 flights per run in total; paid plans have no limit.

## `max_pages` (type: `integer`):

`1` = top results, `2` = also the longer "more flights" list.

## `fetch_booking_options` (type: `boolean`):

Also collect where each flight can be booked (airlines and travel sites with prices). Adds extra requests and run time.

## `max_booking_lookups` (type: `integer`):

How many flights per search to resolve booking options for. Only used when booking options are on.

## `departure_token` (type: `string`):

Advanced. The `departure_token` of a flight from an earlier run, to get the next leg's flights (e.g. return flights). Works for a single search.

## `booking_token` (type: `string`):

Advanced. The `booking_token` of a flight from an earlier run, to fetch only its booking options. Works for a single search.

## `maxConcurrency` (type: `integer`):

How many searches run at the same time.

## `maxRetries` (type: `integer`):

Retries for a blocked or failed request once the strongest proxy level is reached.

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

By default no proxy is used. If Google Flights blocks a request, the Actor switches to a datacenter proxy and then to a residential proxy, and stays on residential for the rest of the run. Pick Apify Proxy groups or your own proxies to start there instead.

## Actor input object example

```json
{
  "urls": [
    {
      "url": "https://www.google.com/travel/flights?q=Flights%20from%20LAX%20to%20JFK%20on%202027-05-10%20through%202027-05-17"
    }
  ],
  "trip_type": "auto",
  "travel_class": "economy",
  "adults": 1,
  "children": 0,
  "infants": 0,
  "max_stops": "any",
  "exclude_basic": false,
  "currency": "USD",
  "gl": "us",
  "hl": "en",
  "maxResults": 100,
  "max_pages": 2,
  "fetch_booking_options": false,
  "max_booking_lookups": 10,
  "maxConcurrency": 2,
  "maxRetries": 3,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

## `flights` (type: `string`):

All flight options, one row each (overview view).

## `itinerary` (type: `string`):

Legs, layovers and tokens for every flight.

## `emissions` (type: `string`):

Estimated CO₂ per flight.

## `priceInsights` (type: `string`):

Lowest price, price level and price history per search.

## `airports` (type: `string`):

Airports and cities of each search.

## `bookingOptions` (type: `string`):

Where to book each flight (only when booking options are enabled).

## `searchSummary` (type: `string`):

One row per search with its status and counts.

## `runSummary` (type: `string`):

Quick counts for this run.

# 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 = {
    "urls": [
        {
            "url": "https://www.google.com/travel/flights?q=Flights%20from%20LAX%20to%20JFK%20on%202027-05-10%20through%202027-05-17"
        }
    ],
    "proxyConfiguration": {
        "useApifyProxy": false
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("insights_data/google-flights-prices-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 = {
    "urls": [{ "url": "https://www.google.com/travel/flights?q=Flights%20from%20LAX%20to%20JFK%20on%202027-05-10%20through%202027-05-17" }],
    "proxyConfiguration": { "useApifyProxy": False },
}

# Run the Actor and wait for it to finish
run = client.actor("insights_data/google-flights-prices-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 '{
  "urls": [
    {
      "url": "https://www.google.com/travel/flights?q=Flights%20from%20LAX%20to%20JFK%20on%202027-05-10%20through%202027-05-17"
    }
  ],
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}' |
apify call insights_data/google-flights-prices-api --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,insights_data/google-flights-prices-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/6bjRoeB3GWwv8quyY/builds/sdp2CTbUNg0NCnJPf/openapi.json
