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

Scrape Google Flights for live fares, airlines, layovers, durations, baggage and CO2 emissions on any route. One-way & round-trip, all cabins, multi-passenger. Track prices and pull only new flights or price drops. No browser, no API key.

- **URL**: https://apify.com/scrapesage/google-flights-scraper.md
- **Developed by:** [Scrape Sage](https://apify.com/scrapesage) (community)
- **Categories:** Travel, Automation, Developer tools
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per event

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/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

## Google Flights Scraper — Flight Prices, Routes, Airlines & Fare Monitoring

Scrape **live flight prices from [Google Flights](https://www.google.com/travel/flights)** for any route and date — **no browser, no API key, no login**. For every flight you get the **price**, **airline(s)**, **number of stops**, **departure & arrival airports/times/dates**, **total duration**, **baggage allowance**, and Google's **price insight** (is this fare low, typical or high?).

Turn on **monitoring mode** and a scheduled run becomes a **price-drop watcher** — it surfaces only fares that changed or new flights that appeared.

### Why this Google Flights scraper?

Most flight scrapers drive a slow, flaky headless browser, charge a start fee, or return a thin "cheapest price" number. This actor reads Google Flights' own server-rendered results directly, so it's **fast, cheap and reliable**, and it ships the **richest flight record in the category**.

| Data | Typical flight scrapers | This actor |
|---|---|---|
| Price + currency | ✅ | ✅ |
| Airline(s) operating the flight | partial | ✅ |
| Stops (nonstop / 1 / 2…) | partial | ✅ |
| Departure & arrival **airport, time AND date** | ❌ | ✅ |
| Total **duration** (text + minutes) | ❌ | ✅ |
| Overnight / arrives-next-day flag | ❌ | ✅ |
| Carry-on & checked **baggage** included | ❌ | ✅ |
| "Best flights" vs the full list | ❌ | ✅ |
| **Price insight** (low/typical/high + usual range) | ❌ | ✅ |
| One-way **and** round-trip (both legs) | partial | ✅ |
| All cabins (economy → first) & multi-passenger | partial | ✅ |
| Bulk routes in one run | ❌ | ✅ |
| **Price-change monitoring** | ❌ | ✅ |
| No browser · no API key · no start fee | ❌ | ✅ |

### Use cases

- **Fare price monitoring & drop alerts** — watch a route (or a whole list of routes) on a schedule and get notified the moment a fare drops. The #1 recurring use case.
- **Travel agencies & OTAs** — feed live fares into quotes, dashboards and comparison tools.
- **Deal sites & newsletters** — find and publish the cheapest fares across many routes automatically.
- **Corporate travel & expense** — benchmark fares for policy compliance and budgeting.
- **Market & route analysis** — compare airlines, durations, stops and price levels across dates and city pairs.
- **AI travel assistants** — give an LLM clean, structured fare data to plan and book trips.

### How to use

1. [Sign up for Apify](https://console.apify.com/sign-up) — the free plan is enough to try this actor.
2. Open the **Google Flights Scraper** and enter an **origin**, **destination** and **depart date** (IATA codes like `JFK`, `LAX`). Add a **return date** for a round trip, or paste several routes in the **Routes** field.
3. Click **Start** and watch flights stream into the dataset table.
4. **Export** as JSON, CSV, Excel, XML or RSS — or pull results via the [Apify API](https://docs.apify.com/api/v2).

### Input

```json
{
    "origin": "JFK",
    "destination": "LAX",
    "departDate": "2026-09-15",
    "tripType": "one_way",
    "cabinClass": "economy",
    "adults": 1,
    "currency": "USD",
    "includePriceInsights": true,
    "monitorMode": false,
    "proxyConfiguration": { "useApifyProxy": true }
}
````

Or scrape many routes at once:

```json
{
    "routes": [
        "JFK-LAX-2026-09-15",
        "SFO-LHR-2026-10-01-2026-10-12",
        "BOS-NRT-2026-11-05"
    ],
    "cabinClass": "economy",
    "currency": "USD",
    "monitorMode": true,
    "monitorKey": "my-watchlist"
}
```

- **origin / destination** — 3-letter IATA airport or city codes (`JFK`, `LHR`, `NYC`, `LON`).
- **departDate / returnDate** — `YYYY-MM-DD` (future dates). A return date makes it a round trip.
- **tripType** — `one_way` or `round_trip`. Round trips scrape both legs (each as a reliable one-way query, tagged `leg: outbound / return`).
- **routes** — bulk list, one route per line: `ORIGIN-DESTINATION-DEPART[-RETURN]`.
- **startUrls** — paste Google Flights URLs directly (best for one-way links).
- **cabinClass** — `economy`, `premium`, `business`, `first`.
- **stops** — `any`, `nonstop`, `one_or_fewer`, `two_or_fewer`.
- **adults / children / infantsInSeat / infantsOnLap** — passenger counts.
- **currency / market** — pricing currency (ISO code) and country market.
- **maxResultsPerRoute** — cap flights per search (0 = all; lower it to control cost when watching many routes).
- **onlyBestFlights** — return only Google's highlighted "best" flights.
- **includePriceInsights** — add one summary record per search (default on).
- **monitorMode / monitorKey** — only emit price changes & new flights (see below).
- **proxyConfiguration** — Apify datacenter proxy by default (fast + cheap).

### Output

By default you get one clean table of **flights**, plus optional **price-insight** summary rows (toggle the dataset views to switch).

A flight record (`type: "flight"`):

```json
{
    "type": "flight",
    "tripType": "one_way",
    "leg": "oneway",
    "tripGroup": "JFK-LAX-2026-09-15",
    "origin": "JFK",
    "destination": "LAX",
    "departSearchDate": "2026-09-15",
    "price": 220,
    "currency": "USD",
    "priceText": "220 US dollars",
    "isFromPrice": true,
    "airlines": ["JetBlue"],
    "mainAirline": "JetBlue",
    "stops": 0,
    "stopsText": "Nonstop",
    "departureAirport": "JFK",
    "departureAirportName": "John F. Kennedy International Airport",
    "departureTime": "9:40 PM",
    "departureDate": "2026-09-15",
    "departureDateTime": "2026-09-15T21:40:00",
    "arrivalAirport": "LAX",
    "arrivalAirportName": "Los Angeles International Airport",
    "arrivalTime": "12:52 AM",
    "arrivalDate": "2026-09-16",
    "arrivalDateTime": "2026-09-16T00:52:00",
    "arrivesNextDay": true,
    "durationText": "6 hr 12 min",
    "durationMinutes": 372,
    "carryOnBags": 1,
    "checkedBags": 0,
    "isBest": true,
    "cabinClass": "economy",
    "googleFlightsUrl": "https://www.google.com/travel/flights/search?tfs=...",
    "scrapedAt": "2026-06-17T12:00:00.000Z"
}
```

A price-insight record (`type: "priceInsight"`) carries `cheapestPrice`, `medianPrice`, `highestPrice`, `optionsFound`, `priceLevel` (`low`/`typical`/`high`), `usualRange` and a `bookingTip`.

> **Round trips:** each direction is searched separately and returned with `leg: "outbound"` / `leg: "return"`, sharing one `tripGroup`. The cheapest round trip is the cheapest outbound + cheapest return — exact for the many fares/carriers that price each direction independently. (Times are shown in each airport's local time; `durationMinutes` is the authoritative flight length.)

### Monitoring — only price changes & new flights

Turn on **monitorMode** and the actor remembers every flight it has emitted — keyed by route, airline, times, stops **and price** — in a named key-value store (set by **monitorKey**). On the next run it returns **only records it hasn't seen before**:

- a **fare changes** → the flight re-appears (its price is part of the signature) = a **price-drop / price-change alert**;
- a **new flight** is added to a route → it appears;
- nothing changed → nothing is emitted.

It pairs with **[Apify Schedules](https://docs.apify.com/platform/schedules)**: the schedule starts the run on a cron, monitoring mode dedupes against prior runs — so a daily watch only ever surfaces fresh fares.

### Automate & schedule

Run this actor on autopilot and pull results into your own stack:

- **[Apify API](https://docs.apify.com/api/v2)** — start runs, fetch datasets and manage schedules over REST.
- **[apify-client for JavaScript](https://docs.apify.com/api/client/js/)** and **[apify-client for Python](https://docs.apify.com/api/client/python/)** — official SDKs.
- **[Schedules](https://docs.apify.com/platform/schedules)** — run it hourly/daily to track fares over time.
- **[Webhooks](https://docs.apify.com/platform/integrations/webhooks)** — trigger downstream actions (price-drop email, Slack alert, booking workflow) the moment a run finishes.

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

const client = new ApifyClient({ token: 'MY_APIFY_TOKEN' });

const run = await client.actor('scrapesage/google-flights-scraper').call({
    routes: ['JFK-LAX-2026-09-15', 'SFO-LHR-2026-10-01-2026-10-12'],
    currency: 'USD',
    monitorMode: true,
    monitorKey: 'my-watchlist',
});

const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(`Got ${items.length} flights`);
```

### Integrate with any app

Connect the dataset to 5,000+ apps — no code required:

- **[Make](https://docs.apify.com/platform/integrations/make)** — multi-step automation scenarios.
- **[Zapier](https://docs.apify.com/platform/integrations/zapier)** — push price drops straight into email, Sheets or Slack.
- **[Slack](https://docs.apify.com/platform/integrations/slack)** — get notified when a watched fare drops.
- **[Google Drive / Sheets](https://docs.apify.com/platform/integrations/drive)** — auto-export every run to a spreadsheet.
- **[Airbyte](https://docs.apify.com/platform/integrations/airbyte)** — pipe results into your data warehouse.
- **[GitHub](https://docs.apify.com/platform/integrations/github)** — trigger runs from commits or releases.

### Use with AI assistants (MCP)

The output is clean, LLM-ready JSON. Call this actor from Claude, ChatGPT or any agent framework through the **[Apify MCP server](https://docs.apify.com/platform/integrations/mcp)** — ask your assistant to "find the cheapest nonstop from New York to LA on Sept 15 and watch it for price drops" and let it run the scraper for you.

### More scrapers from scrapesage

Build a complete **travel & market-intelligence stack**:

- [airbnb-scraper](https://apify.com/scrapesage/airbnb-scraper) — Airbnb listings, prices & availability
- [trip-com-scraper](https://apify.com/scrapesage/trip-com-scraper) — hotel prices, rooms & reviews
- [getyourguide-scraper](https://apify.com/scrapesage/getyourguide-scraper) — tours, activities & attraction tickets
- [tours-activities-scraper](https://apify.com/scrapesage/tours-activities-scraper) — multi-platform tours & tickets (Civitatis, Tiqets)
- [google-trends-scraper](https://apify.com/scrapesage/google-trends-scraper) — search-demand & travel-trend intelligence
- [google-news-scraper](https://apify.com/scrapesage/google-news-scraper) — news articles, real URLs & monitoring
- [yahoo-finance-scraper](https://apify.com/scrapesage/yahoo-finance-scraper) — live quotes, FX rates & market data
- [eventbrite-scraper](https://apify.com/scrapesage/eventbrite-scraper) — events plus organizer leads

### Tips

- **Use the Routes field** to watch many city pairs/dates in one run — ideal for scheduled price monitoring.
- **Cap cost** with `maxResultsPerRoute` and `onlyBestFlights` when you only care about the cheapest options.
- **Currencies**: set any ISO currency (`USD`, `EUR`, `GBP`, …). Result text stays in English so parsing is always reliable.
- **Search a few weeks/months ahead** — fares populate best for dates that aren't immediate or far past the booking window.
- **Round-trip combined fares**: search each leg as one-way (this actor does that automatically) for the most reliable, no-browser results.

### FAQ

**Does it need the Google Flights API or a key?** No. Google Flights has no public API; this actor reads the public results page directly — no key, no login, no browser.

**Which airports/cities can I search?** Any 3-letter IATA airport code (`JFK`, `LAX`, `CDG`) or metro/city code (`NYC`, `LON`, `TYO`).

**Can it monitor prices and alert me?** Yes — turn on `monitorMode` and create a [Schedule](https://docs.apify.com/platform/schedules); each run emits only changed/new fares, and a [webhook](https://docs.apify.com/platform/integrations/webhooks) or [Zapier zap](https://docs.apify.com/platform/integrations/zapier) can push drops to email/Slack.

**Does it do round trips?** Yes. Each direction is scraped as a reliable one-way query and tagged `leg: outbound / return` under a shared `tripGroup`.

**A field is empty — why?** Some flights don't publish baggage details, and price insights only appear when Google shows them. Fields are blank only when Google didn't surface that data — never because the scraper skipped it.

**Can I export to Google Sheets, CSV or Excel?** Yes — one click in the dataset view, or automatically on every run via the [Google Drive integration](https://docs.apify.com/platform/integrations/drive).

**Is scraping Google Flights legal?** This actor collects publicly available data only. You're responsible for using the data in compliance with applicable laws and Google's terms.

### Need help?

Open an issue on the actor's **Issues** tab, or visit the [Apify help center](https://help.apify.com/). Feature requests are welcome — this actor is actively maintained.

# Actor input Schema

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

Origin airport or city code, e.g. <code>JFK</code>, <code>LHR</code>, <code>NYC</code> (city), <code>LON</code> (city). 3-letter IATA codes only. Used with <b>Destination</b> + <b>Depart date</b> for a single search.

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

Destination airport or city code, e.g. <code>LAX</code>, <code>CDG</code>, <code>TYO</code>. 3-letter IATA codes only.

## `departDate` (type: `string`):

Outbound date in <code>YYYY-MM-DD</code> format. Must be a future date.

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

Optional return date in <code>YYYY-MM-DD</code> format. Set this (or pick <b>Round trip</b>) to also scrape the return leg. Each leg is searched as a reliable one-way query and tagged <code>leg: outbound / return</code>.

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

<b>One way</b> = outbound only. <b>Round trip</b> = scrape both legs (requires a return date).

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

Scrape many routes/dates in one run. One route per line as <code>ORIGIN-DESTINATION-DEPART\[-RETURN]</code>, e.g. <code>JFK-LAX-2026-09-15</code> (one way) or <code>SFO-LHR-2026-10-01-2026-10-12</code> (round trip). Perfect for watching a set of routes on a schedule.

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

Paste Google Flights result URLs directly (<code>google.com/travel/flights...</code>). Best for one-way links — round-trip/multi-city links load results client-side and may return an empty page, so use the structured route fields above for those.

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

Seating class to price.

## `stops` (type: `string`):

Filter by number of stops.

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

Number of adult passengers (12+).

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

Number of children (2–11).

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

Infants in their own seat.

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

Infants on lap.

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

Currency for prices (3-letter ISO code). Common: USD, EUR, GBP, CAD, AUD, INR, JPY, MXN, BRL, CHF.

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

Google country market (2-letter code, e.g. <code>us</code>, <code>gb</code>, <code>de</code>). Affects which fares/agents are shown. Result text stays in English for reliable parsing.

## `maxResultsPerRoute` (type: `integer`):

Cap flights returned per route/leg (0 = all flights Google shows, typically 20–60). Lower it to control cost when monitoring many routes.

## `onlyBestFlights` (type: `boolean`):

Return only Google's top/'best' flights (the highlighted few with the best price/duration balance) and skip the long 'other flights' list.

## `includePriceInsights` (type: `boolean`):

Emit one extra record per route/leg (type = "priceInsight") with cheapest / median / highest price, Google's price level (low/typical/high), the usual price range and a booking tip.

## `monitorMode` (type: `boolean`):

Remember every flight (route + airline + times + stops + PRICE) across runs in a named key-value store, and emit ONLY records not seen before. Because price is part of the signature, a fare change re-surfaces — turning a scheduled run into a price-drop watcher. Pairs with Apify Schedules.

## `monitorKey` (type: `string`):

Names the memory used by monitoring mode. Use a distinct key per saved watch so different route sets keep separate state.

## `deduplicateResults` (type: `boolean`):

Skip identical flight options already emitted in this run (recommended).

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

How many times to retry a search (each with a fresh proxy IP) before giving up.

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

Proxy settings. Google Flights serves clean results to Apify datacenter proxy, so the default is datacenter (fast + cheap). Switch to RESIDENTIAL if you hit blocks on heavy runs.

## Actor input object example

```json
{
  "origin": "JFK",
  "destination": "LAX",
  "departDate": "2026-09-15",
  "tripType": "one_way",
  "routes": [
    "JFK-LAX-2026-09-15",
    "BOS-SFO-2026-10-02"
  ],
  "cabinClass": "economy",
  "stops": "any",
  "adults": 1,
  "children": 0,
  "infantsInSeat": 0,
  "infantsOnLap": 0,
  "currency": "USD",
  "market": "us",
  "maxResultsPerRoute": 0,
  "onlyBestFlights": false,
  "includePriceInsights": true,
  "monitorMode": false,
  "monitorKey": "default",
  "deduplicateResults": true,
  "maxRetries": 4,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

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

All scraped records in the default dataset. Each row is tagged with a `type` (`flight` or `priceInsight`); use the Flights and Price insights dataset views to filter the columns.

# 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",
    "departDate": "2026-09-15",
    "routes": [
        "JFK-LAX-2026-09-15",
        "BOS-SFO-2026-10-02"
    ],
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("scrapesage/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",
    "departDate": "2026-09-15",
    "routes": [
        "JFK-LAX-2026-09-15",
        "BOS-SFO-2026-10-02",
    ],
    "proxyConfiguration": { "useApifyProxy": True },
}

# Run the Actor and wait for it to finish
run = client.actor("scrapesage/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",
  "departDate": "2026-09-15",
  "routes": [
    "JFK-LAX-2026-09-15",
    "BOS-SFO-2026-10-02"
  ],
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}' |
apify call scrapesage/google-flights-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=scrapesage/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 live fares, airlines, layovers, durations, baggage and CO2 emissions on any route. One-way & round-trip, all cabins, multi-passenger. Track prices and pull only new flights or price drops. No browser, no API key.",
        "version": "0.1",
        "x-build-id": "gva6naI5mhMsDS28y"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/scrapesage~google-flights-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-scrapesage-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/scrapesage~google-flights-scraper/runs": {
            "post": {
                "operationId": "runs-sync-scrapesage-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/scrapesage~google-flights-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-scrapesage-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 (IATA code)",
                        "type": "string",
                        "description": "Origin airport or city code, e.g. <code>JFK</code>, <code>LHR</code>, <code>NYC</code> (city), <code>LON</code> (city). 3-letter IATA codes only. Used with <b>Destination</b> + <b>Depart date</b> for a single search."
                    },
                    "destination": {
                        "title": "Destination (IATA code)",
                        "type": "string",
                        "description": "Destination airport or city code, e.g. <code>LAX</code>, <code>CDG</code>, <code>TYO</code>. 3-letter IATA codes only."
                    },
                    "departDate": {
                        "title": "Depart date",
                        "type": "string",
                        "description": "Outbound date in <code>YYYY-MM-DD</code> format. Must be a future date."
                    },
                    "returnDate": {
                        "title": "Return date (round trip)",
                        "type": "string",
                        "description": "Optional return date in <code>YYYY-MM-DD</code> format. Set this (or pick <b>Round trip</b>) to also scrape the return leg. Each leg is searched as a reliable one-way query and tagged <code>leg: outbound / return</code>."
                    },
                    "tripType": {
                        "title": "Trip type",
                        "enum": [
                            "one_way",
                            "round_trip"
                        ],
                        "type": "string",
                        "description": "<b>One way</b> = outbound only. <b>Round trip</b> = scrape both legs (requires a return date).",
                        "default": "one_way"
                    },
                    "routes": {
                        "title": "Routes (bulk)",
                        "type": "array",
                        "description": "Scrape many routes/dates in one run. One route per line as <code>ORIGIN-DESTINATION-DEPART[-RETURN]</code>, e.g. <code>JFK-LAX-2026-09-15</code> (one way) or <code>SFO-LHR-2026-10-01-2026-10-12</code> (round trip). Perfect for watching a set of routes on a schedule.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "startUrls": {
                        "title": "Start URLs (paste Google Flights links)",
                        "type": "array",
                        "description": "Paste Google Flights result URLs directly (<code>google.com/travel/flights...</code>). Best for one-way links — round-trip/multi-city links load results client-side and may return an empty page, so use the structured route fields above for those.",
                        "items": {
                            "type": "object",
                            "required": [
                                "url"
                            ],
                            "properties": {
                                "url": {
                                    "type": "string",
                                    "title": "URL of a web page",
                                    "format": "uri"
                                }
                            }
                        }
                    },
                    "cabinClass": {
                        "title": "Cabin class",
                        "enum": [
                            "economy",
                            "premium",
                            "business",
                            "first"
                        ],
                        "type": "string",
                        "description": "Seating class to price.",
                        "default": "economy"
                    },
                    "stops": {
                        "title": "Max stops",
                        "enum": [
                            "any",
                            "nonstop",
                            "one_or_fewer",
                            "two_or_fewer"
                        ],
                        "type": "string",
                        "description": "Filter by number of stops.",
                        "default": "any"
                    },
                    "adults": {
                        "title": "Adults",
                        "minimum": 1,
                        "maximum": 9,
                        "type": "integer",
                        "description": "Number of adult passengers (12+).",
                        "default": 1
                    },
                    "children": {
                        "title": "Children",
                        "minimum": 0,
                        "maximum": 8,
                        "type": "integer",
                        "description": "Number of children (2–11).",
                        "default": 0
                    },
                    "infantsInSeat": {
                        "title": "Infants in seat",
                        "minimum": 0,
                        "maximum": 8,
                        "type": "integer",
                        "description": "Infants in their own seat.",
                        "default": 0
                    },
                    "infantsOnLap": {
                        "title": "Infants on lap",
                        "minimum": 0,
                        "maximum": 8,
                        "type": "integer",
                        "description": "Infants on lap.",
                        "default": 0
                    },
                    "currency": {
                        "title": "Currency",
                        "type": "string",
                        "description": "Currency for prices (3-letter ISO code). Common: USD, EUR, GBP, CAD, AUD, INR, JPY, MXN, BRL, CHF.",
                        "default": "USD"
                    },
                    "market": {
                        "title": "Market (country)",
                        "type": "string",
                        "description": "Google country market (2-letter code, e.g. <code>us</code>, <code>gb</code>, <code>de</code>). Affects which fares/agents are shown. Result text stays in English for reliable parsing.",
                        "default": "us"
                    },
                    "maxResultsPerRoute": {
                        "title": "Max flights per search",
                        "minimum": 0,
                        "type": "integer",
                        "description": "Cap flights returned per route/leg (0 = all flights Google shows, typically 20–60). Lower it to control cost when monitoring many routes.",
                        "default": 0
                    },
                    "onlyBestFlights": {
                        "title": "Only the best flights",
                        "type": "boolean",
                        "description": "Return only Google's top/'best' flights (the highlighted few with the best price/duration balance) and skip the long 'other flights' list.",
                        "default": false
                    },
                    "includePriceInsights": {
                        "title": "Add price-insight summary per search",
                        "type": "boolean",
                        "description": "Emit one extra record per route/leg (type = \"priceInsight\") with cheapest / median / highest price, Google's price level (low/typical/high), the usual price range and a booking tip.",
                        "default": true
                    },
                    "monitorMode": {
                        "title": "Monitoring mode — only price changes & new flights",
                        "type": "boolean",
                        "description": "Remember every flight (route + airline + times + stops + PRICE) across runs in a named key-value store, and emit ONLY records not seen before. Because price is part of the signature, a fare change re-surfaces — turning a scheduled run into a price-drop watcher. Pairs with Apify Schedules.",
                        "default": false
                    },
                    "monitorKey": {
                        "title": "Monitor key",
                        "type": "string",
                        "description": "Names the memory used by monitoring mode. Use a distinct key per saved watch so different route sets keep separate state.",
                        "default": "default"
                    },
                    "deduplicateResults": {
                        "title": "Deduplicate within a run",
                        "type": "boolean",
                        "description": "Skip identical flight options already emitted in this run (recommended).",
                        "default": true
                    },
                    "maxRetries": {
                        "title": "Max retries per search",
                        "minimum": 1,
                        "maximum": 6,
                        "type": "integer",
                        "description": "How many times to retry a search (each with a fresh proxy IP) before giving up.",
                        "default": 4
                    },
                    "proxyConfiguration": {
                        "title": "Proxy configuration",
                        "type": "object",
                        "description": "Proxy settings. Google Flights serves clean results to Apify datacenter proxy, so the default is datacenter (fast + cheap). Switch to RESIDENTIAL if you hit blocks on heavy runs.",
                        "default": {
                            "useApifyProxy": true
                        }
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
