# Google Flights Scraper (`data_xplorer/google-flights-scraper`) Actor

✈️ Scrape every Google Flights price in seconds, not just the first page. One-way, round trip and multi-city, with booking links for every seller, a 330-day price calendar and all Google filters. Up to 3× faster. The Google Flights API alternative. Export to JSON, CSV or Excel.

- **URL**: https://apify.com/data_xplorer/google-flights-scraper.md
- **Developed by:** [Data Xplorer](https://apify.com/data_xplorer) (community)
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: 5.00 out of 5 stars

## Pricing

from $0.75 / 1,000 results

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

### ✈️ What is Google Flights Scraper?

**Google Flights Scraper** extracts flight prices and schedules from [Google Flights](https://www.google.com/travel/flights) in seconds. Enter where you fly from, where you fly to and when, and get **every flight Google knows for the search** as clean, structured data: price, airlines, flight numbers, departure and arrival times, duration, stops, layovers, aircraft, legroom, CO2 emissions and Google's typical price range.

Google has no official Google Flights API. This Actor works as one: run it from the Apify Console, call it from your code, schedule it every day, or connect it to Zapier, Make, n8n and Google Sheets.

https://www.youtube.com/watch?v=CAqRKuexXmY\&feature=youtu.be

#### What can this Google Flights scraper do?

- 🚀 **Fast**: no browser, searches run in parallel. A search with 100+ flights takes a few seconds, up to 3× faster than other Google Flights scrapers in our benchmark (one-way search, October 2026).
- 🔎 **Every flight, not just the first page**: Google hides many itineraries behind "View more flights". The Actor gets the complete list.
- 🔁 **One-way, round trip and multi-city**, for as many routes and dates as you want in one run
- 🧳 **Complete trips**: outbound and return flights (or every flight of a multi-city trip) with the total price
- 🛒 **Booking options**: every seller (airline or online travel agency) with its fare, price, bag fees and a direct booking link
- 📅 **Price calendar**: the cheapest price of each departure date, up to 330 days, to find the cheapest day to fly
- 🎛️ **All of Google's filters**: stops, airlines and alliances, bags, max price, departure and arrival times, CO2, layover length, connecting airports
- 🌍 **Airport codes, city codes or city names**: "New York" or "NYC" covers JFK, EWR and LGA
- 💱 **20 currencies and 16 search countries**
- ⚙️ **Everything the Apify platform offers**: API, scheduling, monitoring, proxy rotation, integrations, and export to JSON, CSV, Excel or HTML

### 💡 Why scrape Google Flights?

- **Fare tracking and price alerts**: schedule the Actor daily and get notified when prices drop
- **Cheapest dates**: the price calendar shows the best day to fly over months
- **Travel agencies and deal sites**: compare airlines and online travel agencies on the same trip, and feed your website with fresh fares
- **Market research**: routes, schedules, connections and prices by airline
- **Corporate travel**: benchmark ticket costs for recurring business trips
- **Sustainability reporting**: CO2 emissions per flight compared with the typical flight on the route
- **AI agents and apps**: give your product live flight data through the API

### 🚀 How to scrape Google Flights

1. Click **Try for free** and open the **Input** tab.
2. Add one line per search in **Flights**: *From*, *To*, *Departure date*, and a *Return date* for a round trip. Use airport codes (CDG), city codes (PAR) or city names (Paris).
3. For a multi-city journey, fill the **Multi-city trip** lines (at least 2 flights, in order).
4. Choose passengers, cabin class and filters (all optional).
5. Optional: turn on **Price calendar** and **Booking options**.
6. Click **Start**. Results appear in the **Output** tab in a few seconds; download them as JSON, CSV or Excel.

Already have a search open on Google Flights? Choose **Option 2** and paste the URL of the results page.

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

You only pay for the flights you get: **from $0.75 per 1,000 results**. Platform usage is included.

| Apify plan | Price per 1,000 results |
|---|---|
| Free | $1.50 |
| Bronze | $1.25 |
| Silver | $1.00 |
| Gold | $0.75 |

A typical round-trip search returns around 100 flights, so it costs about **$0.15 on the Free plan**. Booking options and the price calendar come at no extra cost. Apify's free plan includes monthly credits, enough for thousands of flights to try the Actor.

To control your spending, set **Max results** in the input, or a maximum cost per run in the run options: the Actor stops cleanly when the limit is reached.

### ⬇️ Input

| Field | Description |
|---|---|
| Flights | One line per search: From, To (airport code, city code or city name), departure date, optional return date. Dates can be relative (`30 days`) for scheduled runs. |
| Multi-city trip | One journey made of several flights, in order, priced as one ticket. |
| Round-trip & multi-city results | **Fast**: outbound (or first) flights with the price of the whole trip. **Complete trips**: every flight of the trip with the total price. |
| Passengers & cabin | Adults, children, infants; economy, premium economy, business or first. |
| Filters | Stops, airlines and alliances, excluded airlines, max price, departure and arrival hours, carry-on and checked bags, less emissions only, max trip duration, min and max layover, airports to avoid, connect only via. |
| Price calendar | Cheapest price of every departure date around the searched date (7 to 330 days). |
| Include all flights | Get every itinerary, as if you had clicked "View more flights". On by default. |
| Include flights without a price | Off by default. |
| Booking options | Sellers, fares, prices and booking links for the first N results of each search. |
| Currency / country | 20 currencies, 16 search countries. |
| Max results | Per search and in total. |

Input example:

```json
{
  "flights": [
    { "from": "Paris", "to": "NYC", "departureDate": "2026-12-26", "returnDate": "2027-01-04" },
    { "from": "LHR", "to": "DXB", "departureDate": "30 days" }
  ],
  "adults": 1,
  "cabinClass": "economy",
  "bookingOptions": true,
  "priceCalendar": true
}
```

### ⬆️ What data can you extract from Google Flights?

Each flight is one row. The **Flights** tab shows the main columns (with airline logos); **All fields** has everything. The price calendar has its own **Price calendar** tab.

| Data | Fields |
|---|---|
| Price | `price`, `currency`, `isCheapest`, typical price range |
| Flights | `airline`, `airlineLogo`, `flightNumbers`, aircraft and legroom of each leg |
| Schedule | `departureDate`, `departureTime`, `arrivalTime`, `duration` |
| Route | `departureAirport`, `arrivalAirport`, `stops`, `layovers` |
| Trip | `returnFlight`, `nextFlights` (multi-city) |
| Booking | `bookingOptions` (seller, fare, price, bag fees, link), `cheapestSeller`, `bookingUrl` |
| Environment | `co2EmissionsKg`, comparison with the typical flight |
| Links | `googleFlightsUrl` (the same search on Google Flights) |

Output example:

```json
{
  "recordType": "flight",
  "tripType": "round-trip",
  "departureDate": "2026-12-26",
  "returnDate": "2027-01-20",
  "price": 1039,
  "currency": "USD",
  "airline": "Qatar Airways",
  "airlineLogo": "https://www.gstatic.com/flights/airline_logos/70px/QR.png",
  "flightNumbers": "QR 38, QR 826",
  "departureAirport": "CDG",
  "arrivalAirport": "BKK",
  "departureTime": "2026-12-26 22:00",
  "arrivalTime": "2026-12-27 19:25",
  "duration": "15h 25m",
  "stops": 1,
  "layovers": "DOH (2h 50m)",
  "co2EmissionsKg": 837,
  "returnFlight": { "flightNumbers": "QR 829, QR 39", "layovers": "DOH (3h 05m)" },
  "bookingOptions": [
    { "seller": "Qatar Airways", "sellerType": "airline", "price": 1039, "bookingUrl": "https://www.google.com/travel/clk/f?..." },
    { "seller": "wego", "sellerType": "travel agency", "price": 1045, "bookingUrl": "https://www.google.com/travel/clk/f?..." }
  ],
  "cheapestSeller": "Qatar Airways",
  "googleFlightsUrl": "https://www.google.com/travel/flights/search?tfs=..."
}
```

Price calendar rows have `departureDate`, `dayOfWeek`, `returnDate`, `price`, `priceVsSearchedDate`, `isCheapestDate` and a Google Flights link for each date.

### 🔎 Is there a Google Flights API?

No. Google closed its QPX Express API in 2018 and has no public Google Flights API today. This Actor is a Google Flights API alternative: send routes and dates in one request and get the flights back as JSON, with prices, schedules, booking links and the price calendar.

### 🔌 Can I use Google Flights Scraper as an API?

Yes. Google has no public Google Flights API, and this Actor fills the gap. Call it with the [Apify API](https://docs.apify.com/api/v2) and get the results as JSON in a single request.

Python:

```python
from apify_client import ApifyClient

client = ApifyClient("<YOUR_API_TOKEN>")
run = client.actor("data_xplorer/google-flights-scraper").call(run_input={
    "flights": [{ "from": "Paris", "to": "NYC", "departureDate": "2026-12-26" }],
})
for flight in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(flight["price"], flight["airline"], flight["flightNumbers"])
```

Node.js:

```js
import { ApifyClient } from 'apify-client';

const client = new ApifyClient({ token: '<YOUR_API_TOKEN>' });
const run = await client.actor('data_xplorer/google-flights-scraper').call({
    flights: [{ from: 'Paris', to: 'NYC', departureDate: '2026-12-26' }],
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items);
```

cURL (one request that starts the run and returns the flights):

```bash
curl -X POST "https://api.apify.com/v2/acts/data_xplorer~google-flights-scraper/run-sync-get-dataset-items" \
  -H "Authorization: Bearer <YOUR_API_TOKEN>" \
  -H "Content-Type: application/json" \
  -d '{"flights":[{"from":"Paris","to":"NYC","departureDate":"2026-12-26"}]}'
```

### 🤖 Use Google Flights Scraper with AI agents (MCP)

AI assistants such as Claude, Cursor or VS Code can call this Actor as a tool through the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp). The agent sends the routes and dates, the Actor returns the flights as JSON, and the agent answers with live Google Flights prices.

Use this server URL to give your agent this Actor only:

```
https://mcp.apify.com?tools=data_xplorer/google-flights-scraper
```

Claude Code:

```bash
claude mcp add --transport http google-flights "https://mcp.apify.com?tools=data_xplorer/google-flights-scraper"
```

Cursor, VS Code and other MCP clients (MCP config file):

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

In Claude Desktop, add a custom connector with the same URL. You sign in to your Apify account the first time the tool is used.

#### Example prompts for flight search agents

- "Find the cheapest nonstop flights from Paris to New York on December 26, returning January 4."
- "Which day in March is the cheapest to fly from London to Dubai? Use the price calendar."
- "Compare the booking options of the 3 cheapest Madrid to Tokyo flights next month and give me the booking links."

#### Tips for agents

- Dates can be relative (`30 days`), so an agent does not need to compute calendar dates.
- To keep the answer short, filter with `maxStops`, `maxPrice` or `airlines`. Results follow Google's order, not price, so a low `maxResultsPerSearch` alone can leave out the cheapest flight.
- Turn on `bookingOptions` only when the user asks where to book: it adds requests for each result.
- Use `priceCalendar` for "cheapest day" questions instead of running one search per date.

### 🧩 Integrations

Google Flights Scraper runs on the Apify platform, so you can connect it to the rest of your stack without code:

- **Make, Zapier and n8n**: start a search from a workflow and send the flights to Slack, email, Airtable or a CRM. See [Apify integrations](https://docs.apify.com/platform/integrations).
- **Google Sheets**: export each run to a spreadsheet to build a price history.
- **Schedules**: run the same search every day or every hour with [Apify schedules](https://docs.apify.com/platform/schedules).
- **Webhooks**: get notified when a run finishes and process the results in your own app. See [webhooks](https://docs.apify.com/platform/integrations/webhooks).

### 📚 Tutorials and examples

- [Build a Google Flights price tracker in Python](https://dev.to/data_xplorer/build-a-google-flights-price-tracker-in-python-no-official-api-needed-2o1a): step-by-step tutorial with price history and Telegram alerts
- [google-flights-price-tracker on GitHub](https://github.com/dataxplore19/google-flights-price-tracker): the complete script, ready to run

### 🔗 Other scrapers you may like

- [Google Trends Scraper](https://apify.com/data_xplorer/google-trends-fast-scraper): daily trending searches by country and keyword interest over time, a reliable Google Trends API alternative
- [Google News Scraper](https://apify.com/data_xplorer/google-news-scraper-fast): Google News articles in real time, with titles, sources, dates, images and URLs
- [TikTok Ads Library FAST](https://apify.com/data_xplorer/tiktok-ads-library-fast): competitor ad campaigns and creatives from the TikTok Ads Library, by keyword or advertiser

### ❓ FAQ

#### How fast is it?

A one-way search takes a few seconds and a round trip with booking options around 20 to 30 seconds. Searches run in parallel, so a run with dozens of routes is much faster than running them one by one.

#### Why does the price calendar sometimes show a lower price than the flight list?

The calendar gives the cheapest fare of each date across all airlines and times, while the list follows your filters.

#### Are booking options available for every result?

They are fetched for the first N results of each search (you choose N, up to 50), because each one needs extra requests to Google.

#### Can I scrape Google Flights every day?

Yes. Create a schedule in Apify (for example every day at 8:00) and use relative dates like `30 days` so each run searches 30 days ahead.

#### What is a layover?

A stop at a connecting airport between two flights. The `layovers` column shows the airport and the waiting time, e.g. `DOH (2h 50m)`.

#### Are the results sorted by price?

No. Flights come in the order Google Flights shows them (see the `position` field). Sort by `price` on your side to get the cheapest first. If you set **Max results**, keep in mind that the cheapest flight is not always among the first results.

#### A search returned no flights. Why?

Check the dates (in the future, return after departure) and the filters: a max price or a nonstop-only filter can exclude every flight. If a code is not recognised, the log says so: use an airport code (CDG) or a city name (Paris).

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

The Actor only collects publicly available flight data, with no personal data. Check the rules that apply to your use case and location, and see [Is web scraping legal?](https://blog.apify.com/is-web-scraping-legal/).

#### I need another feature or found a bug.

Open an issue in the **Issues** tab: we read every one and answer quickly.

# Actor input Schema

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

Option 1: describe the trips (from, to, dates) and the actor builds the searches. Option 2: paste Google Flights search URLs copied from your browser.

## `flights` (type: `array`):

From / To: airport code (JFK, CDG) or city name (New York, Paris: all its airports). Leave the return date empty for a one-way flight.

## `multiCity` (type: `array`):

One journey made of several flights, in order (e.g. Paris → Bangkok, Bangkok → Phuket, Phuket → Paris). Fill at least 2 lines. Searched in addition to the flights above.

## `returnFlights` (type: `string`):

Only used for round trips and multi-city trips. Fast: the outbound (or first) flights, each with the price of the whole trip. Complete trips: each result is a full itinerary (outbound + return, or every flight of the multi-city trip) with its total price, like after picking every flight on Google Flights.

## `startUrls` (type: `array`):

Results page URLs, e.g. https://www.google.com/travel/flights/search?tfs=...

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

Passengers aged 12 and over.

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

Passengers aged 2 to 11.

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

Children under 2 with their own seat.

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

Children under 2 sitting on an adult's lap.

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

Travel class of the searched fares.

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

Maximum number of stops per direction.

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

Only these airlines or alliances: 2-letter codes (AF, DL, BA) or Star Alliance, oneworld, SkyTeam.

## `excludeAirlines` (type: `array`):

Never show flights operated by these airlines (2-letter codes or names).

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

Only flights at or below this price (in the selected currency, all passengers).

## `departureHourFrom` (type: `integer`):

Earliest departure hour of the outbound flight, 0-23.

## `departureHourTo` (type: `integer`):

Latest departure hour of the outbound flight, 1-24.

## `arrivalHourFrom` (type: `integer`):

Earliest arrival hour of the outbound flight, 0-23.

## `arrivalHourTo` (type: `integer`):

Latest arrival hour of the outbound flight, 1-24.

## `carryOnBags` (type: `integer`):

Include the fee for a carry-on bag in the price (0 or 1).

## `checkedBags` (type: `integer`):

Include the fees for checked bags in the price (0-2).

## `lessEmissionsOnly` (type: `boolean`):

Only flights with lower CO2 emissions than typical for the route.

## `maxDurationHours` (type: `integer`):

Only flights with a total duration up to this number of hours.

## `maxLayoverHours` (type: `integer`):

Only flights whose connections last up to this number of hours.

## `avoidConnectingAirports` (type: `array`):

Never connect through these airports (3-letter codes).

## `connectOnlyVia` (type: `array`):

Only flights whose connections are all in these airports (3-letter codes).

## `minLayoverHours` (type: `integer`):

Only flights whose connections last at least this number of hours.

## `priceCalendar` (type: `boolean`):

Also get the cheapest price of each departure date around the searched date (same trip length for round trips), like the date grid of Google Flights. One extra request per search, very cheap. Saved in a separate dataset: open the "Price calendar" tab of the run.

## `priceCalendarDays` (type: `integer`):

Days covered by the calendar, centred on the departure date (7-330).

## `deepSearch` (type: `boolean`):

By default, Google Flights lists only part of the itineraries for a search: you have to click "View more flights" at the bottom of the results to see them all. On: the actor gets the complete list, as if you had clicked that button. The number of extra flights depends on the route: none on some, 2-3x more on others (mostly itineraries with connections). Off: only the first list Google shows.

## `includeUnpricedFlights` (type: `boolean`):

Google lists some itineraries without a price ("price unavailable"). Off: they are left out. On: they are included with an empty price.

## `bookingOptions` (type: `boolean`):

For each result: every seller (airline or travel agency) with its fare, price and a direct booking link, like the 'Booking options' page on Google Flights. One or two extra requests per result, so it is only done for the first results of each search (see below). Round trips in fast mode also get the cheapest return flight of each of these results.

## `bookingOptionsFor` (type: `integer`):

How many results of each search get their booking options (1-50).

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

Currency of the prices.

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

Airfares can differ by the country you search from. Google Flights is queried from this country.

## `maxResultsPerSearch` (type: `integer`):

0 = every result for the search.

## `maxItems` (type: `integer`):

0 = no limit.

## Actor input object example

```json
{
  "mode": "search",
  "flights": [
    {
      "from": "JFK",
      "to": "LAX",
      "departureDate": "30 days"
    }
  ],
  "returnFlights": "price-only",
  "adults": 1,
  "children": 0,
  "infantsInSeat": 0,
  "infantsOnLap": 0,
  "cabinClass": "economy",
  "maxStops": "any",
  "carryOnBags": 0,
  "checkedBags": 0,
  "lessEmissionsOnly": false,
  "priceCalendar": false,
  "priceCalendarDays": 60,
  "deepSearch": true,
  "includeUnpricedFlights": false,
  "bookingOptions": false,
  "bookingOptionsFor": 10,
  "currency": "USD",
  "country": "US",
  "maxResultsPerSearch": 0,
  "maxItems": 0
}
```

# Actor output Schema

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

No description

## `priceCalendar` (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 = {
    "flights": [
        {
            "from": "JFK",
            "to": "LAX",
            "departureDate": "30 days"
        }
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("data_xplorer/google-flights-scraper").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 = { "flights": [{
            "from": "JFK",
            "to": "LAX",
            "departureDate": "30 days",
        }] }

# Run the Actor and wait for it to finish
run = client.actor("data_xplorer/google-flights-scraper").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 '{
  "flights": [
    {
      "from": "JFK",
      "to": "LAX",
      "departureDate": "30 days"
    }
  ]
}' |
apify call data_xplorer/google-flights-scraper --silent --output-dataset

```

## MCP server setup

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

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/1L4RKdqlz8cspHEwc/builds/SZUn1kCMCiJKGIDVR/openapi.json
