# Google Flights Scraper - Fares, Routes & Price Tracking (`blackfalcondata/google-flights-scraper`) Actor

Scrape Google Flights for fares, routes, layovers, airlines, and CO₂ — one structured row per itinerary, as JSON or CSV. Track price changes across runs, expand to nearby airports and flexible dates, and resolve per-seller booking options for AI agents and MCP workflows.

- **URL**: https://apify.com/blackfalcondata/google-flights-scraper.md
- **Developed by:** [Black Falcon Data](https://apify.com/blackfalcondata) (community)
- **Categories:** Travel, Lead generation, Automation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.52 / 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/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).


# README

### What does Google Flights Scraper do?

Google Flights Scraper extracts structured flight itineraries from Google Flights (google.com/travel/flights) — one-way, round-trip, and multi-city. Every itinerary carries airline, flight number, departure and arrival times, duration, number of stops, layover airports, and price in USD. Unique analytics fields — great-circle distance, price-per-km, detour factor, effective speed, and CO₂-per-km — let you rank fares by true value, not just headline price. Expand origin or destination to every airport within a radius, scan a flexible date window for the cheapest day, run incrementally to track price changes, and opt in to cross-market comparison or through-fare analysis for deeper fare intelligence.

**New to Apify?** [Sign up free](https://console.apify.com/sign-up?fpr=1h3gvi&fp_sid=ctaplain) and use the included $5 monthly platform credit to test this actor.

### Key features

<!-- KEY_FEATURES:START -->
- **🔔 Notifications** — Telegram, Slack, Discord, WhatsApp Cloud API, and generic webhook out of the box. Pair with incremental for daily new-listing alerts without pipeline glue.
- **♻️ Incremental mode** — recurring runs emit and charge only for itineraries that are new or whose price changed. First run builds the baseline; subsequent runs emit only NEW / UPDATED records (UNCHANGED + EXPIRED opt-in). Saves 80–95% on daily fare monitoring.
- **📐 Distance & value analytics** — every itinerary carries computed analytics no other Google Flights actor exposes: great-circle route distance, price-per-km, detour factor (routed vs direct distance through layovers), effective speed, and CO₂-per-km — so you can rank fares by true value.
- **🛫 Multi-airport radius** — expand an origin or destination to every airport within a chosen radius (e.g. JFK/LGA/EWR to LAX/BUR/SNA) and fan the search across all combinations, bounded by a cost guard.
- **📅 Cheapest-date scan** — scan a ±N-day window around your target date and return the cheapest itinerary per day, each tagged with its scan date — ideal for flexible travellers.
- **🔎 Through-fare data flag (opt-in)** — optionally flag a neutral **through-fare** (connecting vs. direct fare) for fare-structure analysis. Informational only — see the [Disclaimer](#disclaimer) below.
- **💱 Point-of-sale comparison (opt-in)** — optionally compare an itinerary across the markets (points of sale) you choose, in one currency. Indicative only — full notes in the [Disclaimer](#disclaimer) below.
- **🛒 Booking options (opt-in)** — optionally resolve per-itinerary booking options (airline plus agencies) with per-seller prices and a booking link. Read the [Disclaimer](#disclaimer) before booking. Billed per itinerary resolved.
- **🔗 Paste-mode (URLs in)** — paste Google Flights links (a search URL, or a results URL with a `tfs` parameter) and the actor fetches each as-is — no need to re-enter origin, destination, or dates. De-duplicated across URLs.
- **🔌 MCP connectors** — export results into Notion via Apify's MCP connectors — a clean run-summary page, no glue code or AI. Opt in with the App connector field; more destinations open up as Apify's catalog grows.
<!-- KEY_FEATURES:END -->

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

Each itinerary record includes the route (`originIata`, `destIata`, `outboundDate`, optional `returnDate`), price (`priceUsd`, `currency`), carriers (`airlines`, plus per-segment `flightNumber`, `aircraft`, and `legroom`), timing (`durationMinutes` and segment departure/arrival times), routing (`stops`, `layoverIatas`), and emissions (`carbonKg`). Every record also carries a human-readable `title`, the public `sourceUrl` it came from, and a `scrapedAt` timestamp. Unique computed analytics — `routeDistanceKm`, `pricePerKm`, `detourFactor`, `effectiveSpeedKmh`, and `co2PerKm` — let you rank fares by true value rather than headline price. Incremental runs add a `changeType` of NEW / UPDATED / UNCHANGED / EXPIRED; the opt-in add-ons attach `marketComparison` (cross-market point-of-sale prices) and `throughFare` (a neutral connecting-fare data flag).


### Input

Configure the actor through the input schema in Apify Console.

Key parameters:

- **`origin`** — Origin airport IATA code (e.g., JFK, LAX, LHR)
- **`destination`** — Destination airport IATA code (e.g., LAX, ORD, CDG)
- **`outboundDate`** — Departure date (YYYY-MM-DD format)
- **`returnDate`** — Return date for round-trip flights (YYYY-MM-DD format). Leave empty for one-way.
- **`tripType`** — Type of trip. If omitted and returnDate is set, defaults to round-trip. (default: `"one-way"`)
- **`adults`** — Number of adult passengers (default: `1`)
- **`children`** — Number of child passengers (default: `0`)
- **`cabinClass`** — Preferred cabin class (default: `"economy"`)
- **`currency`** — Currency code for prices (default: `"USD"`)
- **`market`** — Market code (e.g., us, gb, de) (default: `"us"`)
- **`language`** — Language code (e.g., en, de, fr) (default: `"en"`)
- **`maxItems`** — Maximum number of results to return. Leave empty for unlimited.
- ...and 27 more parameters

### Input examples

**Cheapest one-way fares on a route** — Search a single route for one-way fares. Returns all itineraries sorted by price, with distance analytics.

→ Itinerary records with airline, flight number, departure/arrival times, stops, price in USD, routeDistanceKm, pricePerKm, detourFactor, effectiveSpeedKph, co2PerKm.

```json
{
  "origin": "JFK",
  "destination": "LAX",
  "outboundDate": "2025-09-15",
  "tripType": "one-way",
  "maxItems": 50
}
````

**Round-trip with flexible dates** — Scan a ±3-day window around the target dates and return the cheapest itinerary per day combination.

→ One record per day combination, each tagged with its scan date and cheapest total price.

```json
{
  "origin": "LHR",
  "destination": "NYC",
  "outboundDate": "2025-10-01",
  "returnDate": "2025-10-08",
  "tripType": "round-trip",
  "dateScanDays": 3,
  "maxItems": 100
}
```

**Multi-airport radius search** — Expand JFK/LGA/EWR as origins and LAX/BUR/SNA as destinations; fan search across all airport combinations.

→ Itineraries for every origin–destination airport pair within the radius, merged and deduplicated.

```json
{
  "origin": "JFK",
  "destination": "LAX",
  "originRadiusKm": 60,
  "destRadiusKm": 60,
  "outboundDate": "2025-11-20",
  "tripType": "one-way",
  "maxItems": 200
}
```

**Price-change monitoring (incremental)** — Re-run on a schedule to detect price changes. Each run compares against the previous snapshot.

→ Records tagged NEW / UPDATED / UNCHANGED / EXPIRED — only changed itineraries are pushed.

```json
{
  "origin": "CPH",
  "destination": "BKK",
  "outboundDate": "2025-12-20",
  "tripType": "one-way",
  "incremental": true,
  "maxItems": 100
}
```

**Paste Google Flights URLs** — Paste one or more Google Flights links (a search URL, or a results URL with a tfs parameter) and the actor fetches each as-is — no need to re-enter origin, destination, or dates.

→ Itinerary records parsed from each pasted URL, de-duplicated across URLs.

```json
{
  "startUrls": [
    "https://www.google.com/travel/flights/search?tfs=CBwQAhooEgoyMDI2LTA4LTEyagwIAhIIL20vMGYydjByDAgCEggvbS8wMWN4X0ABSAFwAYIBCwj___________8BmAEC&curr=USD&hl=en&gl=us"
  ],
  "maxItems": 50
}
```

### Output

Each run produces a dataset of structured flight records. Results can be downloaded as JSON, CSV, or Excel from the Dataset tab in Apify Console.

### Example flight record

```json
{
  "itineraryId": "3f2a9c1e7b4d8a6f0c5e2d1b9a8f7e6d5c4b3a2f",
  "tripType": "one-way",
  "originIata": "JFK",
  "destIata": "LAX",
  "outboundDate": "2026-07-22",
  "priceUsd": 199,
  "currency": "USD",
  "airlines": [
    "American"
  ],
  "stops": 0,
  "durationMinutes": 361,
  "carbonKg": 215,
  "segments": [
    {
      "airlineCode": "AA",
      "airlineName": "American",
      "flightNumber": "171",
      "fromIata": "JFK",
      "toIata": "LAX",
      "departTime": "08:00",
      "arriveTime": "11:01",
      "durationMinutes": 361,
      "aircraft": "Airbus A321neo",
      "legroom": "31 in"
    }
  ],
  "bookingToken": "CjRIdGZ...",
  "routeDistanceKm": 3974.2,
  "pricePerKm": 0.05007,
  "detourFactor": 1,
  "effectiveSpeedKmh": 660.5,
  "co2PerKm": 0.05411,
  "trackedHash": "9a8f7e6d5c4b3a2f1e0d",
  "changeStatus": "NEW"
}
```

### Incremental fields

When `incremental` is enabled, each record carries a `changeType` field — one of `NEW`, `UPDATED`, `UNCHANGED`, or `EXPIRED` — computed by comparing against the previous run's snapshot (keyed per search). Default output includes `NEW` and `UPDATED`; set `emitUnchanged: true` to also receive `UNCHANGED`. `EXPIRED` records are emitted as lightweight tombstones (carrying the route and date) when a previously seen itinerary disappears.

### How to scrape Google Flights

1. Go to [Google Flights Scraper](https://apify.com/blackfalcondata/google-flights-scraper?fpr=1h3gvi) in Apify Console.
2. Configure the input.
3. Set `maxItems` to control how many results you need.
4. Click **Start** and wait for the run to finish.
5. Export the dataset as JSON, CSV, or Excel.

### Use cases

- Monitor fares on the routes you care about and get notified when prices drop.
- Rank itineraries by true value using price-per-km and detour factor, not just the headline price.
- Find the cheapest day to fly with a flexible ±N-day date scan.
- Expand a search across every airport within a radius (for example, all New York or all Los Angeles airports) in a single run.
- Build a structured fare dataset for travel analytics, dashboards, or LLM pipelines via MCP export.

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

Google Flights Scraper uses [pay-per-event](https://docs.apify.com/platform/actors/paid-actors/pay-per-event) pricing. You pay a small fee when the run starts and then for each result that is actually produced.

- **Run start:** $0.005 per run
- **Per flight (primary event):** $0.0008

You are billed only for the events your run actually triggers. Prices below are the Free plan tier; higher Apify plans (Bronze → Diamond) pay progressively less per event, down to roughly 5× lower on the top tier.

| Event | Price (Free tier) | Charged when |
|---|---|---|
| Run start | $0.005 (one-time) | Charged once when the run starts (scales with memory, minimum one). |
| Result (primary) | $0.0008 | Charged per flight itinerary returned. |
| Market compared | $0.0025 | Charged per additional market (point of sale) compared for an itinerary. |
| Through-fare check | $0.0025 | Charged per direct-fare lookup performed for a connecting itinerary. |
| Booking options resolved | $0.005 | Charged per itinerary for which per-seller booking options (airline + agencies) are resolved. |

Example costs (primary event only — other events above add cost when they fire):

- 10 results: **$0.013**
- 25 results: **$0.025**
- 100 results: **$0.085**
- 200 results: **$0.17**
- 500 results: **$0.41**

#### Example: recurring monitoring savings

These examples compare full re-scrapes with incremental runs at different churn rates. Churn is the share of listings that are new or whose tracked content changed since the previous run. Actual churn depends on your query breadth, source activity, and polling frequency — the scenarios below are examples, not predictions.

Example setup: 250 results per run, daily polling (30 runs/month). Event-pricing examples scale linearly with result count.

Numbers below are for the primary **Result** event. Other events (**Market compared**, **Through-fare check**, **Booking options resolved**) are billed separately when they fire.

| Churn rate | Full re-scrape run cost | Incremental run cost | Savings vs full re-scrape | Monthly cost after baseline |
|---|---:|---:|---:|---:|
| 5% — stable niche query | $0.21 | $0.01 | $0.19 (93%) | $0.45 |
| 15% — moderate broad query | $0.21 | $0.04 | $0.17 (83%) | $1.05 |
| 30% — high-volume aggregator | $0.21 | $0.07 | $0.14 (68%) | $1.95 |

Full re-scrape monthly cost at daily polling: $6.15. First month with incremental costs $0.64 / $1.22 / $2.09 for the 5% / 15% / 30% scenarios because the first run builds baseline state at full cost before incremental savings apply.

Platform usage (compute and proxies) is billed separately by Apify based on actual consumption. Incremental runs consume less on result processing, though fixed per-run overhead stays the same.

### FAQ

#### How many results can I get from Google Flights?

The number of results depends on the search query and available listings on Google Flights. Use the `maxItems` parameter to control how many results are returned per run.

#### Does Google Flights Scraper support recurring monitoring?

Yes. Enable incremental mode to only receive new or changed listings on subsequent runs. This is ideal for scheduled monitoring where you want to track changes over time without re-processing the full dataset.

#### Can I integrate Google Flights Scraper with other apps?

Yes. Google Flights Scraper works with Apify's [integrations](https://apify.com/integrations?fpr=1h3gvi) to connect with tools like Zapier, Make, Google Sheets, Slack, and more. You can also use webhooks to trigger actions when a run completes.

#### Can I use Google Flights Scraper with the Apify API?

Yes. You can start runs, manage inputs, and retrieve results programmatically through the [Apify API](https://docs.apify.com/api/v2). Client libraries are available for JavaScript, Python, and other languages.

#### Can I use Google Flights Scraper through an MCP Server?

Yes. Apify provides an [MCP Server](https://apify.com/apify/actors-mcp-server?fpr=1h3gvi) that lets AI assistants and agents call this actor directly. Use `excludeEmptyFields` to keep payloads manageable for LLM context windows.

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

This actor extracts publicly available data from Google Flights. Web scraping of public information is generally considered legal, but you should always review the target site's terms of service and ensure your use case complies with applicable laws and regulations, including GDPR where relevant.

#### Your feedback

If you have questions, need a feature, or found a bug, please [open an issue](https://apify.com/blackfalcondata/google-flights-scraper/issues?fpr=1h3gvi) on the actor's page in Apify Console. Your feedback helps us improve.

### You might also like

- [Facebook Marketplace \[$0.9💰\] Scraper](https://apify.com/blackfalcondata/facebook-marketplace-scraper?fpr=1h3gvi) — Scrape facebook.com Marketplace listings by keyword + location with price, condition, radius &.
- [Finn Torget Scraper - Norwegian Marketplace](https://apify.com/blackfalcondata/finn-torget-scraper?fpr=1h3gvi) — Scrape finn.no/torget — Norway's largest classifieds marketplace. Filter by category, condition,.
- [LinkedIn Profile Scraper + Email](https://apify.com/blackfalcondata/linkedin-profile-scraper?fpr=1h3gvi) — Scrape LinkedIn profiles at scale — no login cookies. Full work history, education, skills,.
- [RedNote (Xiaohongshu) Scraper](https://apify.com/blackfalcondata/xiaohongshu-scraper?fpr=1h3gvi) — Scrape RedNote (Xiaohongshu, rednote.com) notes by keyword search or by pasting note URLs and IDs,.
- [Willhaben.at Scraper - Austria’s Classifieds](https://apify.com/blackfalcondata/willhaben-all-scraper?fpr=1h3gvi) — Scrape willhaben.at — Austria's largest classifieds platform. Pull listings from any pasted search.
- [RedNote Provisioner](https://apify.com/blackfalcondata/rednote-provisioner?fpr=1h3gvi) — Rednote Provisioner.
- [Xing Provisioner](https://apify.com/blackfalcondata/xing-provisioner?fpr=1h3gvi) — Xing Provisioner.

### Getting started with Apify

New to Apify? [Create a free account with $5 credit](https://console.apify.com/sign-up?fpr=1h3gvi\&fp_sid=ctaplain) — no credit card required.

1. Sign up — $5 platform credit included
2. Open this actor and configure your input
3. Click **Start** — export results as JSON, CSV, or Excel

Need more later? [See Apify pricing](https://apify.com/pricing?fpr=1h3gvi).

### Disclaimer

#### General

This actor is a data and analytics tool. It does not sell, book, or issue tickets, and it is not affiliated with, endorsed by, or acting on behalf of any airline, travel agency, or Google. It uses no airline or agency logos, brand artwork, or affiliation claims, and reproduces only factual carrier names and codes. **You are solely responsible for how you use the data this actor provides.** Prices and other values are sourced from publicly displayed Google Flights data; they are indicative, point-in-time, and not guaranteed. Verify all fares, fare rules, conditions of carriage, and eligibility directly with the airline or seller before purchasing. Use is at your own risk.

#### Through-fare / connecting-fare data

The `throughFare` data flag is a neutral, computed comparison between two publicly displayed Google Flights fares: a connecting itinerary and the direct fare to its connection point. It is provided solely so you can analyse fare structures. Booking a connecting flight with the intention of not flying every segment ("hidden-city" or "throwaway" ticketing) may breach an airline's conditions of carriage. Possible consequences for the traveller include, without limitation: cancellation of all remaining and return segments, denial of boarding, forfeiture of frequent-flyer miles or account closure, recalculation of the fare to the applicable published price, and other penalties at the airline's discretion. Checked baggage is also routed to the ticketed final destination. This actor does not advise, encourage, or instruct any particular booking strategy.

#### Point-of-sale price comparison

Airfares are priced differently per market (point of sale). When enabled, this actor queries the same itinerary across the markets you select and reports the prices in a single currency for comparison. Reported differences are indicative, point-in-time, and not guaranteed. Booking from a different market may be subject to the airline's or agency's fare rules, residency or payment-method requirements, currency-conversion and foreign-transaction fees, and may not be available to you. Apparent savings may be unavailable or may change by the time you book. This actor reports prices only; it does not book or sell tickets and gives no booking advice.

#### Booking options

When enabled, this actor resolves, for each itinerary, the booking options (the operating airline plus travel agencies) with their per-seller prices, fare names, and a booking link. Prices are sourced from publicly displayed Google Flights data and may exclude bag fees, seat selection, payment surcharges, or other charges. This actor reports prices and seller names only; it does not book, sell, or issue tickets and gives no booking advice. Verify the final price, fare rules, and availability directly with the seller before purchasing.

# Actor input Schema

## `origin` (type: `string`):

Origin airport IATA code (e.g., JFK, LAX, LHR)

## `destination` (type: `string`):

Destination airport IATA code (e.g., LAX, ORD, CDG)

## `outboundDate` (type: `string`):

Departure date (YYYY-MM-DD format)

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

Return date for round-trip flights (YYYY-MM-DD format). Leave empty for one-way.

## `tripType` (type: `string`):

Type of trip. If omitted and returnDate is set, defaults to round-trip.

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

Number of adult passengers

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

Number of child passengers

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

Preferred cabin class

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

Currency code for prices

## `market` (type: `string`):

Market code (e.g., us, gb, de)

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

Language code (e.g., en, de, fr)

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

Maximum number of results to return. Leave empty for unlimited.

## `excludeEmptyFields` (type: `boolean`):

Drop null, empty-string, and empty-array fields from each record before push. Smaller payloads for AI agents and dashboards.

## `maxQueries` (type: `integer`):

Hard cap on total searches after fan-out (radius × dates × batch).

## `maxExtraFetches` (type: `integer`):

Hard cap on opt-in add-on lookups (market compare / through-fare / booking options).

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

Array of search objects for batch processing

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

Paste one or more Google Flights links (a search URL or a results URL with a tfs parameter). Each is fetched as-is and its itineraries are returned — origin, destination, and date are not required when you use this. Accepts a list of URL strings.

## `incremental` (type: `boolean`):

Track NEW / UPDATED / EXPIRED itineraries across runs (price-drop detection).

## `emitUnchanged` (type: `boolean`):

Also output itineraries whose tracked fields did not change since the last run.

## `stateKey` (type: `string`):

Optional. Pin a name to share one incremental tracking history across runs. Leave empty and each distinct search keeps its own isolated history automatically.

## `originRadiusKm` (type: `integer`):

Expand the origin to all airports within this many km (0 = origin only).

## `destRadiusKm` (type: `integer`):

Expand the destination to all airports within this many km (0 = destination only).

## `dateScanDays` (type: `integer`):

Scan ±N days around the outbound date and return the cheapest itinerary per day (0 = off).

## `compareMarkets` (type: `array`):

Re-query each itinerary in these markets and attach a point-of-sale price comparison. Billed per extra market. INDICATIVE ONLY — see README; this actor reports prices only and books nothing.

## `detectThroughFares` (type: `boolean`):

For connecting itineraries, look up the direct fare to the connection point and attach a NEUTRAL comparison flag. INFORMATIONAL ONLY — see README; no booking advice, books/sells nothing, no airline branding.

## `resolveBookingOptions` (type: `boolean`):

For each itinerary, resolve the per-seller booking options (airline + travel agencies) with their prices, fare names, and a booking link. Billed per itinerary resolved. INFORMATIONAL ONLY — see README; prices are indicative, this actor books/sells nothing and uses no airline or agency branding.

## `telegramToken` (type: `string`):

Telegram bot token (from @BotFather). Required for Telegram notifications.

## `telegramChatId` (type: `string`):

Telegram chat or channel ID where alerts are sent.

## `discordWebhookUrl` (type: `string`):

Discord incoming webhook URL.

## `slackWebhookUrl` (type: `string`):

Slack incoming webhook URL.

## `whatsappPhoneNumberId` (type: `string`):

WhatsApp Business phone number ID from Meta Business Manager.

## `whatsappAccessToken` (type: `string`):

Meta Cloud API access token with whatsapp\_business\_messaging scope.

## `whatsappTo` (type: `string`):

Recipient phone number in E.164 format (e.g. +14155551234).

## `webhookUrl` (type: `string`):

Universal escape hatch for n8n / Make / Zapier / custom HTTP backends. Receives a JSON POST per run.

## `webhookHeaders` (type: `object`):

Additional HTTP headers sent with the generic webhook POST.

## `notificationLimit` (type: `integer`):

Maximum number of itineraries included in each notification message (1–20).

## `notifyOnlyChanges` (type: `boolean`):

When Incremental tracking is on, only notify for NEW and UPDATED itineraries.

## `appConnector` (type: `string`):

Optional. Pick a connected app under Settings → API & Integrations to receive your results. A run-summary is written to the connected app; support is best-effort as Apify expands its connector catalog.

## `mcpIssueTeam` (type: `string`):

Only when the connected app is an issue tracker: the team (name or ID) the summary issue is created under, if that app requires one.

## Actor input object example

```json
{
  "origin": "JFK",
  "destination": "LAX",
  "outboundDate": "2026-07-22",
  "tripType": "one-way",
  "adults": 1,
  "children": 0,
  "cabinClass": "economy",
  "currency": "USD",
  "market": "us",
  "language": "en",
  "excludeEmptyFields": false,
  "maxQueries": 1000,
  "maxExtraFetches": 100000,
  "startUrls": [],
  "incremental": false,
  "emitUnchanged": false,
  "compareMarkets": [],
  "detectThroughFares": false,
  "resolveBookingOptions": false,
  "notificationLimit": 5,
  "notifyOnlyChanges": false
}
```

# Actor output Schema

## `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 = {
    "origin": "JFK",
    "destination": "LAX",
    "outboundDate": "2026-07-22",
    "excludeEmptyFields": false,
    "startUrls": [],
    "compareMarkets": [],
    "detectThroughFares": false,
    "resolveBookingOptions": false
};

// Run the Actor and wait for it to finish
const run = await client.actor("blackfalcondata/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 = {
    "origin": "JFK",
    "destination": "LAX",
    "outboundDate": "2026-07-22",
    "excludeEmptyFields": False,
    "startUrls": [],
    "compareMarkets": [],
    "detectThroughFares": False,
    "resolveBookingOptions": False,
}

# Run the Actor and wait for it to finish
run = client.actor("blackfalcondata/google-flights-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "origin": "JFK",
  "destination": "LAX",
  "outboundDate": "2026-07-22",
  "excludeEmptyFields": false,
  "startUrls": [],
  "compareMarkets": [],
  "detectThroughFares": false,
  "resolveBookingOptions": false
}' |
apify call blackfalcondata/google-flights-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=blackfalcondata/google-flights-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Google Flights Scraper - Fares, Routes & Price Tracking",
        "description": "Scrape Google Flights for fares, routes, layovers, airlines, and CO₂ — one structured row per itinerary, as JSON or CSV. Track price changes across runs, expand to nearby airports and flexible dates, and resolve per-seller booking options for AI agents and MCP workflows.",
        "version": "0.1",
        "x-build-id": "cV0B4kKqqxAUViwfi"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/blackfalcondata~google-flights-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-blackfalcondata-google-flights-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/blackfalcondata~google-flights-scraper/runs": {
            "post": {
                "operationId": "runs-sync-blackfalcondata-google-flights-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/blackfalcondata~google-flights-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-blackfalcondata-google-flights-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "properties": {
                    "origin": {
                        "title": "✈️ Origin",
                        "type": "string",
                        "description": "Origin airport IATA code (e.g., JFK, LAX, LHR)"
                    },
                    "destination": {
                        "title": "Destination",
                        "type": "string",
                        "description": "Destination airport IATA code (e.g., LAX, ORD, CDG)"
                    },
                    "outboundDate": {
                        "title": "Outbound Date",
                        "type": "string",
                        "description": "Departure date (YYYY-MM-DD format)"
                    },
                    "returnDate": {
                        "title": "Return Date",
                        "type": "string",
                        "description": "Return date for round-trip flights (YYYY-MM-DD format). Leave empty for one-way."
                    },
                    "tripType": {
                        "title": "Trip Type",
                        "enum": [
                            "one-way",
                            "round-trip",
                            "multi-city"
                        ],
                        "type": "string",
                        "description": "Type of trip. If omitted and returnDate is set, defaults to round-trip.",
                        "default": "one-way"
                    },
                    "adults": {
                        "title": "👤 Adults",
                        "minimum": 1,
                        "type": "integer",
                        "description": "Number of adult passengers",
                        "default": 1
                    },
                    "children": {
                        "title": "Children",
                        "minimum": 0,
                        "type": "integer",
                        "description": "Number of child passengers",
                        "default": 0
                    },
                    "cabinClass": {
                        "title": "Cabin Class",
                        "enum": [
                            "economy",
                            "premium-economy",
                            "business",
                            "first"
                        ],
                        "type": "string",
                        "description": "Preferred cabin class",
                        "default": "economy"
                    },
                    "currency": {
                        "title": "🌎 Currency",
                        "type": "string",
                        "description": "Currency code for prices",
                        "default": "USD"
                    },
                    "market": {
                        "title": "Market",
                        "type": "string",
                        "description": "Market code (e.g., us, gb, de)",
                        "default": "us"
                    },
                    "language": {
                        "title": "🌐 Language",
                        "type": "string",
                        "description": "Language code (e.g., en, de, fr)",
                        "default": "en"
                    },
                    "maxItems": {
                        "title": "⚙️ Max Results",
                        "minimum": 1,
                        "type": "integer",
                        "description": "Maximum number of results to return. Leave empty for unlimited."
                    },
                    "excludeEmptyFields": {
                        "title": "🧹 Exclude empty fields from output",
                        "type": "boolean",
                        "description": "Drop null, empty-string, and empty-array fields from each record before push. Smaller payloads for AI agents and dashboards.",
                        "default": false
                    },
                    "maxQueries": {
                        "title": "Max queries",
                        "minimum": 1,
                        "type": "integer",
                        "description": "Hard cap on total searches after fan-out (radius × dates × batch).",
                        "default": 1000
                    },
                    "maxExtraFetches": {
                        "title": "Max add-on fetches",
                        "minimum": 0,
                        "type": "integer",
                        "description": "Hard cap on opt-in add-on lookups (market compare / through-fare / booking options).",
                        "default": 100000
                    },
                    "searches": {
                        "title": "Batch Searches",
                        "type": "array",
                        "description": "Array of search objects for batch processing"
                    },
                    "startUrls": {
                        "title": "🔗 Paste Google Flights URLs",
                        "type": "array",
                        "description": "Paste one or more Google Flights links (a search URL or a results URL with a tfs parameter). Each is fetched as-is and its itineraries are returned — origin, destination, and date are not required when you use this. Accepts a list of URL strings.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "incremental": {
                        "title": "🔁 Incremental tracking",
                        "type": "boolean",
                        "description": "Track NEW / UPDATED / EXPIRED itineraries across runs (price-drop detection).",
                        "default": false
                    },
                    "emitUnchanged": {
                        "title": "♻️ Emit unchanged",
                        "type": "boolean",
                        "description": "Also output itineraries whose tracked fields did not change since the last run.",
                        "default": false
                    },
                    "stateKey": {
                        "title": "🗝️ Tracking namespace",
                        "type": "string",
                        "description": "Optional. Pin a name to share one incremental tracking history across runs. Leave empty and each distinct search keeps its own isolated history automatically."
                    },
                    "originRadiusKm": {
                        "title": "🛫 Origin radius (km)",
                        "minimum": 0,
                        "type": "integer",
                        "description": "Expand the origin to all airports within this many km (0 = origin only)."
                    },
                    "destRadiusKm": {
                        "title": "Destination radius (km)",
                        "minimum": 0,
                        "type": "integer",
                        "description": "Expand the destination to all airports within this many km (0 = destination only)."
                    },
                    "dateScanDays": {
                        "title": "📅 Cheapest-date scan (± days)",
                        "minimum": 0,
                        "type": "integer",
                        "description": "Scan ±N days around the outbound date and return the cheapest itinerary per day (0 = off)."
                    },
                    "compareMarkets": {
                        "title": "💱 Compare markets (opt-in)",
                        "type": "array",
                        "description": "Re-query each itinerary in these markets and attach a point-of-sale price comparison. Billed per extra market. INDICATIVE ONLY — see README; this actor reports prices only and books nothing."
                    },
                    "detectThroughFares": {
                        "title": "🔎 Through-fare data flag (opt-in)",
                        "type": "boolean",
                        "description": "For connecting itineraries, look up the direct fare to the connection point and attach a NEUTRAL comparison flag. INFORMATIONAL ONLY — see README; no booking advice, books/sells nothing, no airline branding.",
                        "default": false
                    },
                    "resolveBookingOptions": {
                        "title": "🛒 Booking options (opt-in)",
                        "type": "boolean",
                        "description": "For each itinerary, resolve the per-seller booking options (airline + travel agencies) with their prices, fare names, and a booking link. Billed per itinerary resolved. INFORMATIONAL ONLY — see README; prices are indicative, this actor books/sells nothing and uses no airline or agency branding.",
                        "default": false
                    },
                    "telegramToken": {
                        "title": "🔑 Telegram Bot Token",
                        "type": "string",
                        "description": "Telegram bot token (from @BotFather). Required for Telegram notifications."
                    },
                    "telegramChatId": {
                        "title": "💬 Telegram Chat ID",
                        "type": "string",
                        "description": "Telegram chat or channel ID where alerts are sent."
                    },
                    "discordWebhookUrl": {
                        "title": "🎮 Discord Webhook URL",
                        "type": "string",
                        "description": "Discord incoming webhook URL."
                    },
                    "slackWebhookUrl": {
                        "title": "💼 Slack Webhook URL",
                        "type": "string",
                        "description": "Slack incoming webhook URL."
                    },
                    "whatsappPhoneNumberId": {
                        "title": "📱 WhatsApp Phone Number ID",
                        "type": "string",
                        "description": "WhatsApp Business phone number ID from Meta Business Manager."
                    },
                    "whatsappAccessToken": {
                        "title": "🔐 WhatsApp Access Token",
                        "type": "string",
                        "description": "Meta Cloud API access token with whatsapp_business_messaging scope."
                    },
                    "whatsappTo": {
                        "title": "📨 WhatsApp Recipient",
                        "type": "string",
                        "description": "Recipient phone number in E.164 format (e.g. +14155551234)."
                    },
                    "webhookUrl": {
                        "title": "🪝 Generic Webhook URL",
                        "type": "string",
                        "description": "Universal escape hatch for n8n / Make / Zapier / custom HTTP backends. Receives a JSON POST per run."
                    },
                    "webhookHeaders": {
                        "title": "🪝 Webhook Headers (opt)",
                        "type": "object",
                        "description": "Additional HTTP headers sent with the generic webhook POST."
                    },
                    "notificationLimit": {
                        "title": "📊 Max Items Per Notification",
                        "minimum": 1,
                        "maximum": 20,
                        "type": "integer",
                        "description": "Maximum number of itineraries included in each notification message (1–20).",
                        "default": 5
                    },
                    "notifyOnlyChanges": {
                        "title": "🔄 Notify Only New/Updated",
                        "type": "boolean",
                        "description": "When Incremental tracking is on, only notify for NEW and UPDATED itineraries.",
                        "default": false
                    },
                    "appConnector": {
                        "title": "📤 Send results to a connected app",
                        "type": "string",
                        "description": "Optional. Pick a connected app under Settings → API & Integrations to receive your results. A run-summary is written to the connected app; support is best-effort as Apify expands its connector catalog."
                    },
                    "mcpIssueTeam": {
                        "title": "🏷️ Issue tracker team",
                        "type": "string",
                        "description": "Only when the connected app is an issue tracker: the team (name or ID) the summary issue is created under, if that app requires one."
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
