# Google Flights Scraper - Airfare Prices & Price Tracker (`sonic_scraper/google-flights-price-monitor`) Actor

Google Flights scraper for live flight prices: airlines, times, duration, stops, layover airports, aircraft and CO2. One-way or round-trip, scan up to 31 dates for the cheapest day, bulk routes, target-price flags and stable itinerary IDs for fare tracking. No API key.

- **URL**: https://apify.com/sonic_scraper/google-flights-price-monitor.md
- **Developed by:** [Group Oject](https://apify.com/sonic_scraper) (community)
- **Categories:** Travel, Automation, Developer tools
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 92.9% runs succeeded, 1 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.40 / 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

## Google Flights Scraper - Airfare Prices & Price Tracker

Scrape live **Google Flights** results for any route and date: prices, airlines, departure and arrival times, duration, stops, layover airports, aircraft, and CO2 emissions. Search one-way or round-trip, scan up to 31 departure dates to find the cheapest day, bulk-search up to 100 route/date combinations per run, and flag fares below your target price. **No Google API key, no login.**

![Google Flights Scraper output in Apify: type, rank, from, to, departure date, return date, price](https://api.apify.com/v2/key-value-stores/lwQu1lCMCLQIIhSMQ/records/google-flights-price-monitor-output.png)

*Real output from a default run of Google Flights Scraper in Apify Console.*

### What can this Google Flights scraper do?

- **Live airfare search** - every itinerary Google Flights shows for a route and date, ranked from cheapest.
- **Cheapest-day finder** - set a departure date range (up to 31 days) and get each day's fares plus a summary row per day.
- **Bulk routes** - add more origin/destination/date combinations in the same run.
- **Round-trip or one-way** - add a return date for round-trip pricing.
- **Travelers and cabin** - adults, children, infants in seat or on lap; economy, premium economy, business, or first.
- **Filters** - direct flights only, maximum stops, airline codes, maximum price.
- **Fare alerts** - set a target price and every row gets `belowTargetPrice: true/false`; each fare also gets a price tier (`lowest`, `good`, `typical`, `high`) relative to that search.
- **Stable itinerary IDs** - `itineraryId` stays the same when only the price changes, so you can track one flight's fare across scheduled runs.
- **Any currency and language** - `USD`, `EUR`, `GBP`, `MAD`, ... and Google language codes.

### What flight data can I extract?

| Field | Description |
| --- | --- |
| `price`, `currency`, `pricePerTraveler` | Total fare for all travelers and per-traveler fare |
| `priceTier`, `belowTargetPrice`, `rank` | Fare tier within the search, target-price flag, rank by price |
| `airlines`, `airlineCode` | Marketing airline names and code |
| `origin`, `destination`, `departureDate`, `returnDate`, `tripType` | Search route |
| `departureAt`, `arrivalAt`, `durationMinutes` | Local departure and arrival times, total travel time |
| `stops`, `isDirect`, `layoverAirports` | Connections |
| `segments[]` | Each leg: from/to airport code and name, times, duration, aircraft |
| `carbonGrams`, `carbonVsTypicalPercent` | CO2 estimate and difference vs. typical for the route |
| `cabinClass`, `adults`, `children`, `infants` | Search settings |
| `itineraryId` | Stable ID for price tracking across runs |
| `googleFlightsUrl`, `scrapedAt` | Link to the same search on Google Flights, timestamp |

With **Include route summary** on (default), each search also adds one `route_summary` row with `lowestPrice`, `medianPrice`, `averagePrice`, `directFlightCount`, and `cheapestDirectPrice`.

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

Pay per result row saved: **$2.00 per 1,000 rows** ($0.002 per flight or summary row), plus an Actor start event of $0.01 per GB of memory (one event at the default 512 MB).

| Example | Rows | Approx. price |
| --- | --- | --- |
| 1 route, 1 date, up to 100 flights + summary | up to 101 | up to $0.21 |
| 1 route, 30-day scan, 20 flights per day + summaries | up to 630 | up to $1.27 |
| 1,000 rows | 1,000 | $2.01 |

Lower **Maximum flights per search** to pay only for the cheapest fares you need. See the **Pricing** tab for current rates.

### How to scrape Google Flights prices

1. Enter **Origin airport** and **Destination airport** as three-letter IATA codes (`JFK`, `LHR`, `CDG`, `DXB`, `CMN`).
2. Enter a future **Departure date** (`YYYY-MM-DD`). Add a **Return date** for round trips.
3. Optional: set **Scan departure dates through** to compare every day in a range.
4. Optional: travelers, cabin, filters, target price, currency.
5. Click **Start** and export as JSON, CSV, or Excel.

#### Input example: cheapest day to fly

```json
{
  "origin": "JFK",
  "destination": "LAX",
  "departureDate": "2026-12-01",
  "departureDateEnd": "2026-12-14",
  "maxResultsPerSearch": 10,
  "currency": "USD"
}
```

#### Input example: round trip with filters and a fare alert

```json
{
  "origin": "LHR",
  "destination": "DXB",
  "departureDate": "2026-12-18",
  "returnDate": "2027-01-03",
  "adults": 2,
  "cabinClass": "economy",
  "maxStops": 1,
  "targetPrice": 900,
  "currency": "GBP"
}
```

#### Input example: several routes in one run

```json
{
  "origin": "CMN",
  "destination": "CDG",
  "departureDate": "2026-12-20",
  "additionalRoutes": [
    { "origin": "CMN", "destination": "MAD", "departureDate": "2026-12-20" },
    { "origin": "RAK", "destination": "LGW", "departureDate": "2026-12-21" }
  ],
  "directOnly": true
}
```

### Output example

```json
{
  "recordType": "flight",
  "itineraryId": "3f1c2a9b8d7e6f5a4b3c",
  "rank": 1,
  "price": 129,
  "currency": "USD",
  "pricePerTraveler": 129,
  "priceTier": "lowest",
  "belowTargetPrice": null,
  "airlines": ["JetBlue"],
  "airlineCode": "B6",
  "origin": "JFK",
  "destination": "LAX",
  "departureDate": "2026-12-01",
  "returnDate": null,
  "departureAt": "2026-12-01T07:00:00",
  "arrivalAt": "2026-12-01T10:25:00",
  "durationMinutes": 385,
  "stops": 0,
  "isDirect": true,
  "cabinClass": "economy",
  "tripType": "one-way",
  "segments": [
    {
      "fromAirport": { "code": "JFK", "name": "John F. Kennedy International Airport" },
      "toAirport": { "code": "LAX", "name": "Los Angeles International Airport" },
      "departureAt": "2026-12-01T07:00:00",
      "arrivalAt": "2026-12-01T10:25:00",
      "durationMinutes": 385,
      "aircraft": "Airbus A321"
    }
  ],
  "layoverAirports": [],
  "carbonGrams": 312000,
  "carbonVsTypicalPercent": -8.5,
  "googleFlightsUrl": "https://www.google.com/travel/flights/search?tfs=...",
  "scrapedAt": "2026-10-25T04:13:10.000Z"
}
```

Illustrative record; prices and schedules change constantly. The run also writes a `SUMMARY` record with successful and failed searches.

### Flight price monitoring

1. Save your input as a **task** (one task per route set).
2. **Schedule** it, for example daily at 06:00.
3. Read `belowTargetPrice` or the `route_summary.lowestPrice` from each run, and send it to Slack, email, or Google Sheets with an Apify integration or webhook.
4. Use `itineraryId` to follow a specific flight's fare over time.

Remember to move the departure date forward when it passes: Google Flights returns no fares for past dates.

### Run the Google Flights API via code

#### Python

```python
from apify_client import ApifyClient

client = ApifyClient("<YOUR_APIFY_TOKEN>")
run = client.actor("sonic_scraper/google-flights-price-monitor").call(run_input={
    "origin": "JFK", "destination": "LAX", "departureDate": "2026-12-01", "maxResultsPerSearch": 20,
})
for row in client.dataset(run["defaultDatasetId"]).iterate_items():
    if row["recordType"] == "flight":
        print(row["price"], row["airlines"], row["departureAt"], row["stops"])
```

#### JavaScript

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

const client = new ApifyClient({ token: process.env.APIFY_TOKEN });
const run = await client.actor('sonic_scraper/google-flights-price-monitor').call({
  origin: 'LHR', destination: 'JFK', departureDate: '2026-12-10', returnDate: '2026-12-17', targetPrice: 450,
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items.filter((r) => r.belowTargetPrice));
```

#### cURL

```bash
curl -X POST "https://api.apify.com/v2/acts/sonic_scraper~google-flights-price-monitor/run-sync-get-dataset-items" \
  -H "Authorization: Bearer $APIFY_TOKEN" -H "Content-Type: application/json" \
  -d '{"origin":"CDG","destination":"CMN","departureDate":"2026-12-20","maxResultsPerSearch":10}'
```

Also works with Make, Zapier, n8n, Google Sheets, and AI agents through the Apify MCP server.

### FAQ

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

No. Google has no public Flights API; this Actor reads the public Google Flights results.

#### Are these live prices?

Yes, each row is the fare Google Flights showed at `scrapedAt`. Always confirm the price with the airline or booking site before buying.

#### Why did a search return no flights?

Common causes: the departure date is in the past, the airport code is wrong, filters are too strict (direct only, airlines, max price), or Google has no flights for that route and date. Check the `SUMMARY` record for each search's error.

#### Can I search by city name or multi-city trips?

Not yet. Use IATA airport codes (`LON` city codes are not supported; use `LHR`, `LGW`, ...). Multi-city itineraries are not supported.

#### Does it return booking links or baggage fees?

No. `googleFlightsUrl` opens the same search on Google Flights, where booking options are listed.

#### Do I need a proxy?

Usually not. For large or very frequent schedules, enable an Apify residential proxy in **Proxy configuration**.

### Related Actors

- [Amazon Product Scraper & Price Tracker](https://apify.com/sonic_scraper/amazon-product-intelligence) - price-change tracking for products.
- [Shopify Product & Price Scraper](https://apify.com/sonic_scraper/shopify-product-price-monitor) - catalog and price snapshots from Shopify stores.

# Changelog

This Actor's version history is a separate document: https://apify.com/sonic_scraper/google-flights-price-monitor/changelog.md

# Actor input Schema

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

Three-letter IATA airport code, for example JFK, LHR, CDG, DXB, or CMN.

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

Three-letter IATA airport code.

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

Travel date in YYYY-MM-DD format. Leave empty to search a rolling date (today + 'Days ahead'), which keeps scheduled monitors valid.

## `departureDaysAhead` (type: `integer`):

Used only when Departure date is empty: search the date this many days from today.

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

Optional. Adding a return date creates a round-trip search.

## `departureDateEnd` (type: `string`):

Optional end date. The Actor searches every departure date in the range, up to 31 days.

## `additionalRoutes` (type: `array`):

Bulk-search up to 50 more routes in the same run.

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

Fare cabin to search.

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

Number of adult travelers.

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

Number of child travelers.

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

Number of infants traveling in their own seats.

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

Number of lap infants.

## `directOnly` (type: `boolean`):

Return only nonstop itineraries.

## `maxStops` (type: `integer`):

Maximum number of connections accepted.

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

Optional IATA airline codes such as AA, DL, BA, or AT.

## `maxPrice` (type: `number`):

Exclude itineraries above this total fare in the selected currency.

## `targetPrice` (type: `number`):

Marks results at or below your target with belowTargetPrice=true.

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

Maximum itinerary records saved for each route and date.

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

Three-letter ISO currency code.

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

Google language code, for example en-US, fr, de, or ar.

## `includeRouteSummary` (type: `boolean`):

Adds one summary row per search with lowest, median and direct-flight prices.

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

Maximum route searches running at the same time.

## `requestDelayMs` (type: `integer`):

Minimum delay between starting route searches.

## `onlyChanges` (type: `boolean`):

Compare with the previous run that used the same state key. Return only new itineraries and itineraries whose fare changed (changeType price_drop / price_increase, previousPrice, priceChange), and the route summary only when the route's lowest fare moved. Unchanged fares are not returned or billed. The first run returns everything as the baseline.

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

Name for the saved fare snapshot. Use a different key per monitored set of routes.

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

Optional. Enable an Apify residential proxy if Google limits a recurring or high-volume search.

## `debugMode` (type: `boolean`):

Write transport diagnostics to the run log.

## Actor input object example

```json
{
  "origin": "JFK",
  "destination": "LAX",
  "departureDaysAhead": 30,
  "additionalRoutes": [],
  "cabinClass": "economy",
  "adults": 1,
  "children": 0,
  "infantsInSeat": 0,
  "infantsOnLap": 0,
  "directOnly": false,
  "airlines": [],
  "maxResultsPerSearch": 100,
  "currency": "USD",
  "language": "en-US",
  "includeRouteSummary": true,
  "maxConcurrency": 2,
  "requestDelayMs": 500,
  "onlyChanges": false,
  "stateKey": "default",
  "proxyConfiguration": {
    "useApifyProxy": false
  },
  "debugMode": false
}
```

# Actor output Schema

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

Ranked flight itineraries and route-level price summaries.

## `summary` (type: `string`):

Search counts, result totals, and per-route errors.

# 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 = {
    "proxyConfiguration": {
        "useApifyProxy": false
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("sonic_scraper/google-flights-price-monitor").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 = { "proxyConfiguration": { "useApifyProxy": False } }

# Run the Actor and wait for it to finish
run = client.actor("sonic_scraper/google-flights-price-monitor").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 '{
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}' |
apify call sonic_scraper/google-flights-price-monitor --silent --output-dataset

```

## MCP server setup

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

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/3piLOAX6l8jl9BZkE/builds/LQqozFSaZCHNrlRxf/openapi.json
