# Google Flights Scraper - Fares, Airlines & Schedules (`sweet_stickball/google-flights-scraper`) Actor

Scrape Google Flights fares for a route and date: price, airline, flight numbers, departure and arrival times, duration, stops and layovers. Flight price scraper for one-way or round-trip searches.

- **URL**: https://apify.com/sweet_stickball/google-flights-scraper.md
- **Developed by:** [CrawlKit](https://apify.com/sweet_stickball) (community)
- **Categories:** Travel
- **Stats:** 2 total users, 1 monthly users, 75.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.17 / 1,000 flights

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Google Flights Scraper - Fares, Airlines & Schedules

Scrape Google Flights search results for one route and date: current prices, airlines, durations, layovers, flight numbers and schedules. Supports one-way and round-trip searches, cabin class and number of stops. Returns structured flat JSON.

### Input

| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| `origin` | string | Yes | — | IATA airport code (e.g. JFK, CDG) |
| `destination` | string | Yes | — | IATA airport code (e.g. LAX, LHR) |
| `date` | string | Yes | — | Departure date (YYYY-MM-DD) |
| `returnDate` | string | No | — | Return date for round-trip |
| `maxResults` | integer | No | 50 | Max flights to return (1–200) |
| `travelClass` | string | No | economy | economy, premium_economy, business, first |
| `stops` | string | No | any | any, nonstop, one_stop, two_plus |

### Output example

```json
{
    "airline": "Icelandair",
    "price": 669,
    "currency": "USD",
    "duration": 660,
    "stops": 1,
    "departureTime": "2026-12-01T13:00",
    "arrivalTime": "2026-12-01T18:00",
    "origin": "CDG",
    "destination": "JFK",
    "departureAirport": "Aéroport de Paris-Charles de Gaulle",
    "arrivalAirport": "John F. Kennedy International Airport",
    "departureAirportCode": "CDG",
    "arrivalAirportCode": "JFK",
    "layovers": "KEF",
    "flightNumber": "FI543, FI615",
    "aircraft": "Boeing 767, Boeing 737MAX 9 Passenger",
    "scrapedAt": "2026-10-21T12:00:00+00:00"
}
```

Times are airport-local (`YYYY-MM-DDTHH:MM`), `duration` is in minutes, prices are in USD. For round trips, `price` is the round-trip total shown for each outbound flight. `price` is `null` when Google shows no fare.

### Pricing

Pay-per-event, **no start fee**: **$0.17 per 1,000 flights** on the Apify Free plan, with lower prices on paid plans. Each flight pushed to the dataset is one event.

| Event | Free | Starter | Scale | Business | Enterprise |
|-------|------|---------|-------|----------|------------|
| Flight (`RESULT`) | $0.17 | $0.17 | $0.17 | $0.17 | $0.17 |

Prices in USD per 1,000 events.

### Features

- **Cabin & stops filters** — passed to the Google Flights search
- **Round-trip pricing** — with `returnDate`, each outbound flight carries the round-trip total price
- **Flat JSON output** — every field at top level for easy analysis
- **IATA codes** — origin and destination are 3-letter airport codes

### Limitations

- Prices are in USD.
- Departure and arrival times are local to each airport (no time zone offset).
- Searches are one-way unless `returnDate` is set. Round-trip searches return the outbound flights with the round-trip total; return flights are not listed separately.
- Results are limited to what Google Flights shows on the first results page for the search, capped by `maxResults`.
- If Google returns no parseable flights after the retries (including with a residential proxy), the run ends FAILED.

### Related Actors

- [Airbnb Scraper - Listings, Prices & Ratings](https://apify.com/sweet_stickball/airbnb-scraper) — Scrape Airbnb search results for any location: listing name, price per night, total price, rating, review count, room type, beds, badges and coordinates, with optional dates and currency.
- [Booking.com Scraper - Hotel Prices, Ratings & Availability](https://apify.com/sweet_stickball/booking-scraper) — Scrape Booking.com hotel search results for any city: hotel name, total and nightly price, rating, review count, stars, district, coordinates and free cancellation, for your dates and currency.
- [Google Shopping Scraper - Product Prices & Sellers](https://apify.com/sweet_stickball/google-shopping-scraper) — Scrape Google Shopping results: product titles, prices, old prices, sellers, ratings, review counts and images in 12 countries.
- [Google Trends Scraper - Interest Over Time & Related Queries](https://apify.com/sweet_stickball/google-trends-scraper) — Scrape Google Trends: interest over time and related queries for up to 5 compared keywords, by country, time range and category.

# Actor input Schema

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

IATA airport code for departure (e.g. JFK, LAX, CDG).

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

IATA airport code for arrival (e.g. LAX, LHR, NRT).

## `date` (type: `string`):

Departure date in YYYY-MM-DD format. Optional: defaults to 30 days from today. Must not be in the past.

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

Return date in YYYY-MM-DD format. Leave empty for one-way flights.

## `maxResults` (type: `integer`):

Maximum number of flight results to return.

## `travelClass` (type: `string`):

Cabin class for the flight search.

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

Filter by number of stops.

## Actor input object example

```json
{
  "origin": "JFK",
  "destination": "LAX",
  "maxResults": 10,
  "travelClass": "economy",
  "stops": "any"
}
```

# Actor output Schema

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

Dataset items shown with the 'results' view.

# 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",
    "maxResults": 10
};

// Run the Actor and wait for it to finish
const run = await client.actor("sweet_stickball/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",
    "maxResults": 10,
}

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

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

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

```

## CLI example

```bash
echo '{
  "origin": "JFK",
  "destination": "LAX",
  "maxResults": 10
}' |
apify call sweet_stickball/google-flights-scraper --silent --output-dataset

```

## MCP server setup

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

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/uY1WQVUUo0GbZSXui/builds/rMhlaE2wQT3R5IvFx/openapi.json
