# ✈️ Google Flights Scraper (`skootle/google-flights-scraper`) Actor

Find the cheapest flights for any route in one API call. Returns 5 best fares + 25-50 alternates: airline, price, times, stops, layovers, bookable links. For travel agencies, AI flight agents, and price-tracking products. Export, run via API, schedule, or integrate with other tools.

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

## Pricing

from $5.00 / 1,000 flight itinerary records

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/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 hero](https://raw.githubusercontent.com/kesjam/skootle-actors-assets/main/heroes/google-flights-v2.png)

### TL;DR

Pull every flight Google returns for any route and date pair in one API call. Returns the 5 best fares plus 25-50 alternates per query: airline, price, departure / arrival times, stops, layover detail, and a bookable link per itinerary. Built for travel-agency price desks, AI flight-finding agents, price-tracking products like Hopper or Going, corporate T&E tools, and affiliate publishers running daily fare sweeps. One LAX→JFK round-trip search costs about $0.21 on the GOLD plan.

---

<!-- skootle:review-cta -->
> Try it on a single route, then let us know what you think in a [review](https://apify.com/skootle/google-flights-scraper/reviews).

---

### What does Google Flights Scraper do?

Today, the manual workflow is brutal. A travel-agency price-ops analyst opens google.com/travel/flights, types in LAX→JFK on June 15, copies the cheapest 5 fares into a spreadsheet, changes the date to June 16, copies again, and repeats 30 times to fill out a price calendar for one client trip. A price-tracking startup like Going hires people to do that across thousands of routes a day. An AI travel agent that can't get structured fare data has to screen-scrape Google itself and break every two weeks.

This actor collapses that workflow into a single API call per route and date pair. Send the route, dates, cabin class, and passenger mix; get back every itinerary Google returns with airlines, prices, times, stops, layovers, and a bookable link per fare.

Per query you also get one `price_insights` summary row with median, P10, P90, and price range across the itinerary set, so you can answer "is $210 LAX→JFK cheap?" in the same response.

For AI agents and LLM pipelines, every itinerary record carries an `agentMarkdown` field: a 4-bullet markdown card with airline, duration, price, and bookable link, ready to paste straight into a Claude or ChatGPT context with no formatting work. Records also carry a stable `itineraryId` so the same flight across multiple runs upserts cleanly.

### Why scrape Google Flights?

Google Flights changes prices every few minutes and aggregates fares from every major airline plus most OTAs. Buyers book at the prices Google shows. But Google doesn't expose a 30-day price grid for any route, so travel agencies, AI flight agents, price-tracking apps, and corporate T&E tools all rebuild it manually: open the page, type the route, change the date, copy the cheapest fare, repeat 30 times for one client trip.

Live fare data turns into client invoices, push-notification revenue, "you could have saved $400" upsells, and bookable answers in chat. SerpAPI charges ~$50 per 1,000 searches and skips booking links. Skyscanner's partner API is gated behind an application most teams never get into. Free actors return null-heavy junk: missing cabin class, empty layovers, ignored dates. This one collapses 30 manual searches into one API call with the bookable link attached.

### Who needs this?

- **Travel agency price-ops analysts** running nightly fare sweeps for client routes and emailing the cheapest options before the agent's morning standup
- **Price-tracking products** (Hopper, Going, Scott's Cheap Flights clones) ingesting daily fare snapshots across thousands of routes to power deal alerts
- **AI flight-finding agents** built on Claude, ChatGPT, n8n, or LangChain that need a real bookable answer, not a screenshot of Google
- **Corporate travel and T&E SaaS** (Navan, TripActions style) showing "you could have booked the same trip for $X" in the post-trip report
- **OTA and metasearch startups** building MVPs that need a live fare backbone before signing partnership deals with airlines
- **Affiliate publishers** running SEO content like "cheapest flights LAX→JFK in October" that needs fresh price data daily
- **Data and analytics teams** building route-level price-history datasets for forecasting, hedging, or M&A diligence

### How to use Google Flights Scraper

1. Open the **Input** tab on the actor page
2. Set `origin` and `destination` as 3-letter IATA codes (`LAX`, `JFK`, `LHR`, `NRT`)
3. Set `departureDate` in `YYYY-MM-DD` format
4. Optionally set `returnDate` (omit for one-way), `passengers`, `cabinClass`, and `stops`
5. Set `maxItems` (default 50; raise for production runs that need every alternate Google returns)
6. Click **Start** or call the actor via the Apify REST API or CLI

You can run on demand from the Console, schedule daily fare sweeps with Apify's cron scheduler, integrate with Make, Zapier, n8n, Slack, or Google Sheets, or pipe directly into a Claude or ChatGPT custom agent.

### How much will scraping Google Flights cost?

This actor is priced per event. Two events:

- **Actor Start**: $0.005 once per run
- **Itinerary record**: tiered, charged per record written (each `flight_itinerary` and `price_insights` row counts)

| Apify plan | $/1000 records |
|---|---|
| FREE | $12.00 |
| BRONZE | $10.00 |
| SILVER | $9.00 |
| GOLD | $8.00 |
| PLATINUM | $8.00 |
| DIAMOND | $8.00 |

A typical LAX→JFK round-trip query returns 25-50 itineraries plus 1 `price_insights` row. On the GOLD plan that costs roughly $0.21 per search. A daily price-tracking run across 100 routes runs about $21 per day on GOLD or $14 per day on PLATINUM / DIAMOND. The $5/month Apify free credit covers around 400 trial searches on the FREE plan.

You only pay for records actually saved. If a route returns no results, you don't pay for the empty.

### Is it legal to scrape Google Flights?

Yes for personal travel planning, internal price monitoring, agent workflows, and downstream analytics. The actor reads the same publicly rendered fare data that any web browser sees on google.com/travel/flights. It does not authenticate, does not bypass any technical access control, does not access logged-in or paid-tier data, and does not store personal Google account information.

For commercial redistribution (reselling raw fare grids as a competing meta-search product), Google's terms of service apply. Consult your own legal counsel.

### Examples

#### Example 1: One-way LAX→JFK on June 15, agency client trip

```json
{
  "origin": "LAX",
  "destination": "JFK",
  "departureDate": "2026-06-15",
  "passengers": { "adults": 1 },
  "maxItems": 25
}
````

#### Example 2: Family of four, business class, SFO→LHR round-trip

```json
{
  "origin": "SFO",
  "destination": "LHR",
  "departureDate": "2026-07-10",
  "returnDate": "2026-07-24",
  "passengers": { "adults": 2, "children": 2 },
  "cabinClass": "BUSINESS",
  "stops": "NONSTOP",
  "maxItems": 50
}
```

#### Example 3: Daily price-tracking sweep, ATL→MIA round-trip

```json
{
  "origin": "ATL",
  "destination": "MIA",
  "departureDate": "2026-08-01",
  "returnDate": "2026-08-08",
  "maxItems": 100
}
```

Schedule daily; diff the `priceUsd` field across runs to catch price drops and trigger deal alerts.

#### Example 4: Corporate T\&E, cheapest BOS→SFO option in week of June 1

```json
{
  "origin": "BOS",
  "destination": "SFO",
  "departureDate": "2026-06-01",
  "stops": "ONE_STOP_OR_FEWER",
  "cabinClass": "ECONOMY",
  "maxItems": 25
}
```

Drop the cheapest result into the post-trip "you could have saved" report.

#### Example 5: AI agent answering "cheapest flight Friday to Vegas"

```json
{
  "origin": "ORD",
  "destination": "LAS",
  "departureDate": "2026-05-15",
  "passengers": { "adults": 1 },
  "maxItems": 10
}
```

Pipe the top 3 results plus the `agentMarkdown` cards back into the chat reply.

#### Example 6: Affiliate SEO content, premium economy LHR→JFK

```json
{
  "origin": "LHR",
  "destination": "JFK",
  "departureDate": "2026-09-15",
  "returnDate": "2026-09-22",
  "cabinClass": "PREMIUM_ECONOMY",
  "maxItems": 50
}
```

#### Example 7: Award-fare research baseline, JFK→NRT business class

```json
{
  "origin": "JFK",
  "destination": "NRT",
  "departureDate": "2026-11-10",
  "returnDate": "2026-11-22",
  "cabinClass": "BUSINESS",
  "stops": "ANY",
  "maxItems": 50
}
```

### Input parameters

| Field | Type | Default | Description |
|---|---|---|---|
| `origin` | string (IATA) | required | 3-letter origin airport |
| `destination` | string (IATA) | required | 3-letter destination airport |
| `departureDate` | YYYY-MM-DD | required | Outbound date |
| `returnDate` | YYYY-MM-DD | `null` | Omit for one-way |
| `passengers` | object | `{adults:1}` | adults + children + infants |
| `cabinClass` | enum | `ECONOMY` | `ECONOMY`, `PREMIUM_ECONOMY`, `BUSINESS`, `FIRST` |
| `stops` | enum | `ANY` | `ANY`, `NONSTOP`, `ONE_STOP_OR_FEWER` |
| `currency` | string | `USD` | ISO 4217 |
| `fareCalendar30d` | bool | `false` | Reserved for v0.2 (30-day fan-out) |
| `resolveBookingUrls` | bool | `true` | v0.1: opaque token always returned; resolved deeplink lands in v0.2 |
| `maxItems` | int | `50` | Hard cap on itinerary records |
| `proxyConfiguration` | object | residential US | Apify proxy override |

### Google Flights output format

The dataset has two record types. Filter by `recordType`.

#### `flight_itinerary`

| Field | Type | Description |
|---|---|---|
| `outputSchemaVersion` | string | Date-stamped schema version (`'2026-05-09'`), pin downstream pipelines safely |
| `recordType` | literal | `'flight_itinerary'` |
| `itineraryId` | string | Stable ID for the itinerary; same flight across runs has same ID, drop into `INSERT ... ON CONFLICT DO UPDATE` |
| `origin`, `destination` | object | `{ iata, name, city }` for both ends |
| `departureDate`, `returnDate` | string / null | ISO date for outbound and return (return is null on one-way) |
| `priceUsd`, `priceCurrency` | number / string | Numeric fare in your chosen currency |
| `priceTier` | enum | `BEST` (Google's top picks) or `OTHER` (alternates), filter for `BEST` to surface only the recommended fares |
| `legs[]` | array | One per flight segment: `flightNumber`, `airline {iata, name, logoUrl}`, departure/arrival airports, ISO times, `durationMinutes`, `aircraft`, `legroomInches`, `oftenDelayed`, `bookableSeats` |
| `totalDurationMinutes`, `stops`, `layovers[]` | number / array | Layover detail with airport, duration, overnight flag |
| `baggage` | object | `{ carryOnIncluded, checkedIncluded, selfTransferRequired }`, typed booleans, not free-text marketing strings |
| `carbonGramsCo2`, `carbonVsRouteAvgPercent` | number / null | Sustainability fields for buyers who need them; ignore otherwise |
| `bookingToken`, `bookingUrlResolved`, `bookingProvider` | string / null | Token always present in v0.1; resolved deeplink to Expedia / airline direct lands in v0.2 |
| `agentMarkdown` | string | 4-bullet markdown card (✈️ airline, 💰 price, ⏱️ duration, 🔗 booking), paste into Claude / ChatGPT / Slack as-is |
| `fieldCompletenessScore` | int 0-100 | Self-filtering signal so downstream pipelines can drop sparse rows |
| `scrapedAt` | string | ISO 8601 |

#### `price_insights`

One row per query, summarizing the itinerary set. Use it to answer "is this fare cheap or expensive vs what Google returned today?":

| Field | Type | Description |
|---|---|---|
| `query` | object | `{ origin, destination, departureDate, returnDate }` echo of your input |
| `comps` | object / null | `{ n, medianUsd, p10Usd, p90Usd, rangeLowUsd, rangeHighUsd, typicalRange }`, n is sample size |

#### Output example (itinerary)

```json
{
  "recordType": "flight_itinerary",
  "outputSchemaVersion": "2026-05-09",
  "itineraryId": "a1b2c3d4e5f60718",
  "origin": { "iata": "LAX", "name": "Los Angeles International", "city": "Los Angeles" },
  "destination": { "iata": "JFK", "name": "John F. Kennedy International", "city": "New York" },
  "departureDate": "2026-06-15",
  "returnDate": null,
  "priceUsd": 219,
  "priceCurrency": "USD",
  "priceTier": "BEST",
  "legs": [{
    "flightNumber": "B6824",
    "airline": { "iata": "B6", "name": "JetBlue", "logoUrl": null },
    "departureAirport": "LAX",
    "arrivalAirport": "JFK",
    "departureTimeIso": "2026-06-15T22:25:00.000Z",
    "arrivalTimeIso": "2026-06-16T07:00:00.000Z",
    "durationMinutes": 335,
    "aircraft": null,
    "legroomInches": null,
    "oftenDelayed": false,
    "bookableSeats": null
  }],
  "totalDurationMinutes": 335,
  "stops": 0,
  "layovers": [],
  "baggage": { "carryOnIncluded": null, "checkedIncluded": null, "selfTransferRequired": false },
  "carbonGramsCo2": 250000,
  "carbonVsRouteAvgPercent": -8,
  "bookingToken": "Cj...long...base64...",
  "bookingUrlResolved": null,
  "bookingProvider": null,
  "agentMarkdown": "✈️ JetBlue B6824 · LAX→JFK\n💰 $219 (BEST)\n⏱️ 5h 35m nonstop\n🔗 bookingToken ready to resolve",
  "fieldCompletenessScore": 80,
  "scrapedAt": "2026-05-09T17:00:00.000Z"
}
```

### During the Actor run

A typical single-route query returns 10-50 itineraries in 6-10 seconds over Apify residential proxy. No login, no API key, no Google account required.

The actor writes three things to the key-value store at run end:

1. **`OUTPUT`**, compact run summary: query, itinerary count, error counts, finished timestamp
2. **`AGENT_BRIEFING`**, markdown digest with the top 10 cheapest itineraries ranked by completeness, ready to paste into an LLM context
3. The default dataset, exportable as CSV / JSON / JSONL / Excel

### FAQ

#### How is this different from SerpAPI's `google_flights`?

SerpAPI's `google_flights` is the gold-standard third-party API, and it costs roughly $50 per 1,000 searches with no resolved booking links. This actor lands at $8-12 per 1,000 records on tiered pricing, mirrors SerpAPI's `best_flights` / `other_flights` / `price_insights` shape so you can swap providers later, and ships agent-grade fields (`agentMarkdown`, `fieldCompletenessScore`, stable `itineraryId` hash) SerpAPI does not.

#### How is this different from johnvc's Google Flights actor?

johnvc's actor is the volume leader and a solid baseline. We differ on three axes: (1) we ship structured baggage as typed booleans instead of free-text "extensions", (2) we return ISO 8601 times with timezone instead of `"2026-06-15 23:25"` strings, (3) every itinerary carries a stable `itineraryId` SHA hash so cross-run dedupe works without writing custom keys. johnvc returns the raw `booking_token`; we'll resolve to a deeplink in v0.2.

#### Will this break when Google changes their UI?

You're insulated. Hand-tuned for this source, fixes ship the same week the source changes, typically within 24-48 hours. Issues are tracked on the actor page and resolved fast, and the daily auto-test catches regressions before you do.

#### Will the daily auto-test stay green?

Yes. The default `maxItems: 50` plus a typical 6-10 second runtime per query keeps the auto-test under the Apify 5-minute window with margin. We monitor the auto-test status daily.

#### Why do I sometimes get 0 itineraries?

Google occasionally rotates internal response shapes. The parser is defensive: it returns 0 itineraries instead of throwing on shape drift, so your pipeline gets a clean empty record instead of a crashed run. Open an issue with your input and we'll patch within 48 hours.

#### Why is `bookingUrlResolved` null in v0.1?

The two-hop deeplink resolver requires an additional follow-up call against a different Google endpoint that wasn't ready for v0.1. The raw `bookingToken` is always returned and you can resolve it yourself today; v0.2 will populate `bookingUrlResolved` and `bookingProvider` server-side.

#### Can I monitor only price drops since the last run?

Use the `itineraryId` as your dedupe key on the consumer side: re-running the same query produces the same `itineraryId` per itinerary, so a downstream sink can `INSERT ... ON CONFLICT DO UPDATE` on the price field and trigger an alert when it drops. A built-in watchlist mode is on the roadmap for v0.2.

#### Can I integrate with Make / Zapier / n8n / Slack?

Yes. Apify provides native integrations for all of those. From the actor page, click **Integrations** and pick your destination.

#### Can I use this with Python?

Yes. Use the [Apify Python client](https://docs.apify.com/api/client/python): `client.actor("skootle/google-flights-scraper").call(run_input={...})` and read the dataset.

#### What's the cheapest way to use this?

The $5/month Apify free credit covers around 400 itinerary records on the FREE plan, enough to validate the schema against your pipeline. For production volume, the GOLD plan at $8 per 1,000 records is the sweet spot; PLATINUM and DIAMOND match GOLD on this actor.

#### Why does this cost more than the free Google Flights actors?

The free actors return null-heavy or shallow output: dates ignored, layovers empty, baggage missing, no stable IDs. If you're feeding this into a customer-facing product or a daily AI-agent run, the per-record cost buys you reliability the free actors can't deliver, they break monthly when Google's response shape changes, you don't get notified, and your downstream pipeline silently goes empty.

#### Your feedback

Hit a bug or want a feature? Open an issue on the [Issues tab](https://apify.com/skootle/google-flights-scraper/issues/open) rather than the reviews page, and we'll fix it fast (typically within 48 hours).

### Why choose Google Flights Scraper

- **One API call replaces 30 manual searches**, every fare Google returns for your route and dates in 6-10 seconds
- **Bookable links per itinerary**, every result ships with the token (and v0.2 resolves to Expedia or airline direct)
- **5 BEST + 25-50 alternates per query**, Google's own top picks plus the long tail
- **Price comps in the same response**, the `price_insights` row tells you if today's cheapest is below median, P10, or P90
- **Watchlist-friendly for price drops**, stable IDs make daily-diff price-drop alerts trivial on the consumer side
- **SerpAPI-shape parity at a fraction of the cost**, ~$8 per 1,000 records vs SerpAPI's ~$50
- **AI agents can self-filter sparse rows** and paste `agentMarkdown` cards straight into Claude or ChatGPT
- **Safe to dedupe across re-runs**, stable `itineraryId` upserts cleanly
- **Schema doesn't break your pipeline**, versioned and date-stamped on every record

### Other Skootle actors you might want to check

- **[Reddit Subreddit Monitor](https://apify.com/skootle/reddit-subreddit-monitor)**, same agent-grade record schema, applied to Reddit posts and comments. Useful for travel-deal subreddit monitoring.
- **[Hacker News Watchlist](https://apify.com/skootle/hackernews-watchlist)**, daily HN top/new/best/ask/show stream with idempotent IDs and `agentMarkdown` for AI agent pipelines.
- **[SEC EDGAR Filings Monitor](https://apify.com/skootle/sec-edgar-filings)**, public-company filings stream for travel-industry analysts (Booking, Expedia, Airbnb, Marriott).

Export, run via API, schedule, or integrate with other tools.

### Support and contact

File issues on this actor's page (Issues tab), replies within 48 hours. For feature requests, drop them in the same tracker tagged `enhancement`.

# Actor input Schema

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

3-letter IATA airport code, e.g. LAX, JFK, LHR.

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

3-letter IATA airport code.

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

ISO date for outbound flight.

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

Optional ISO date. Omit (or leave blank) for one-way.

## `passengers` (type: `object`):

Adult/child/infant counts.

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

Cabin class.

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

Restrict by number of stops.

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

ISO currency code for prices, e.g. USD, EUR.

## `fareCalendar30d` (type: `boolean`):

When true, fans out 30 single-day searches around the departure date and returns a date-vs-price grid. v0.1: not yet implemented.

## `resolveBookingUrls` (type: `boolean`):

When true, attempts a server-side second hop to resolve Google's booking\_token into a real Expedia/Priceline/airline URL. Slower but ships the deeplink your buyer needs.

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

Maximum itinerary records to save.

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

Apify proxy settings. Default: residential, US.

## Actor input object example

```json
{
  "origin": "LAX",
  "destination": "JFK",
  "departureDate": "2026-06-15",
  "passengers": {
    "adults": 1,
    "children": 0,
    "infants": 0
  },
  "cabinClass": "ECONOMY",
  "stops": "ANY",
  "currency": "USD",
  "fareCalendar30d": false,
  "resolveBookingUrls": true,
  "maxItems": 50,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ],
    "apifyProxyCountry": "US"
  }
}
```

# Actor output Schema

## `datasetItems` (type: `string`):

Normalized flight itinerary records plus per-query price\_insights summary.

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

Compact OUTPUT object with item count, errors, diagnostics.

## `agentBriefing` (type: `string`):

Per-run markdown digest, drop into Claude/Codex/Slack as a single document.

# 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": "LAX",
    "destination": "JFK",
    "departureDate": "2026-06-15",
    "returnDate": "",
    "passengers": {
        "adults": 1,
        "children": 0,
        "infants": 0
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("skootle/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": "LAX",
    "destination": "JFK",
    "departureDate": "2026-06-15",
    "returnDate": "",
    "passengers": {
        "adults": 1,
        "children": 0,
        "infants": 0,
    },
}

# Run the Actor and wait for it to finish
run = client.actor("skootle/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": "LAX",
  "destination": "JFK",
  "departureDate": "2026-06-15",
  "returnDate": "",
  "passengers": {
    "adults": 1,
    "children": 0,
    "infants": 0
  }
}' |
apify call skootle/google-flights-scraper --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "✈️ Google Flights Scraper",
        "description": "Find the cheapest flights for any route in one API call. Returns 5 best fares + 25-50 alternates: airline, price, times, stops, layovers, bookable links. For travel agencies, AI flight agents, and price-tracking products. Export, run via API, schedule, or integrate with other tools.",
        "version": "0.1",
        "x-build-id": "ehrn42adxuyH8yUgM"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/skootle~google-flights-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-skootle-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/skootle~google-flights-scraper/runs": {
            "post": {
                "operationId": "runs-sync-skootle-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/skootle~google-flights-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-skootle-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",
                "required": [
                    "origin",
                    "destination",
                    "departureDate"
                ],
                "properties": {
                    "origin": {
                        "title": "Origin (IATA airport code)",
                        "pattern": "^[A-Za-z]{3}$",
                        "type": "string",
                        "description": "3-letter IATA airport code, e.g. LAX, JFK, LHR."
                    },
                    "destination": {
                        "title": "Destination (IATA airport code)",
                        "pattern": "^[A-Za-z]{3}$",
                        "type": "string",
                        "description": "3-letter IATA airport code."
                    },
                    "departureDate": {
                        "title": "Departure date (YYYY-MM-DD)",
                        "type": "string",
                        "description": "ISO date for outbound flight."
                    },
                    "returnDate": {
                        "title": "Return date (YYYY-MM-DD)",
                        "type": "string",
                        "description": "Optional ISO date. Omit (or leave blank) for one-way."
                    },
                    "passengers": {
                        "title": "Passengers",
                        "type": "object",
                        "description": "Adult/child/infant counts."
                    },
                    "cabinClass": {
                        "title": "Cabin class",
                        "enum": [
                            "ECONOMY",
                            "PREMIUM_ECONOMY",
                            "BUSINESS",
                            "FIRST"
                        ],
                        "type": "string",
                        "description": "Cabin class.",
                        "default": "ECONOMY"
                    },
                    "stops": {
                        "title": "Stops filter",
                        "enum": [
                            "ANY",
                            "NONSTOP",
                            "ONE_STOP_OR_FEWER"
                        ],
                        "type": "string",
                        "description": "Restrict by number of stops.",
                        "default": "ANY"
                    },
                    "currency": {
                        "title": "Currency (ISO 4217)",
                        "type": "string",
                        "description": "ISO currency code for prices, e.g. USD, EUR.",
                        "default": "USD"
                    },
                    "fareCalendar30d": {
                        "title": "30-day fare calendar (v0.2)",
                        "type": "boolean",
                        "description": "When true, fans out 30 single-day searches around the departure date and returns a date-vs-price grid. v0.1: not yet implemented.",
                        "default": false
                    },
                    "resolveBookingUrls": {
                        "title": "Resolve booking_token to OTA URL",
                        "type": "boolean",
                        "description": "When true, attempts a server-side second hop to resolve Google's booking_token into a real Expedia/Priceline/airline URL. Slower but ships the deeplink your buyer needs.",
                        "default": true
                    },
                    "maxItems": {
                        "title": "Max items",
                        "minimum": 1,
                        "maximum": 500,
                        "type": "integer",
                        "description": "Maximum itinerary records to save.",
                        "default": 50
                    },
                    "proxyConfiguration": {
                        "title": "Proxy configuration",
                        "type": "object",
                        "description": "Apify proxy settings. Default: residential, US.",
                        "default": {
                            "useApifyProxy": true,
                            "apifyProxyGroups": [
                                "RESIDENTIAL"
                            ],
                            "apifyProxyCountry": "US"
                        }
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
