# Google Flights Scraper | Prices by Route & Dates (`genial_candlestand/google-flights-scraper-api`) Actor

Get Google Flights offers: total price, airline, flight numbers, departure and arrival times, stops, duration and CO2. Many routes and dates per run, one-way or round trip, cabin and stops filters, optional price calendar. No login.

- **URL**: https://apify.com/genial_candlestand/google-flights-scraper-api.md
- **Developed by:** [Flowo](https://apify.com/genial_candlestand) (community)
- **Categories:** Travel, Automation
- **Features:** Limited permissions
- **Stats:** 1 total users, 1 monthly users, 90.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.38 / 1,000 flight results

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

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

## What's an Apify Actor?

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

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

## How to integrate an Actor?

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

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

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

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

# README

## Google Flights Scraper — Flight Prices by Route and Dates

![Google Flights Scraper | Prices by Route & Dates](https://api.apify.com/v2/key-value-stores/Ll7RrWtDkZYOrBvfE/records/google-flights-flight-and-hotel-prices-banner-89557b5d.png)

Get every flight Google Flights lists for a route and date: total price and currency, airline and flight numbers, departure and arrival times, duration, stops and layovers, plus aircraft, legroom and CO2. Search many routes and departure dates in one run, one-way or round trip, with passenger, cabin, stops and airline filters.

### What does Google Flights Scraper do?

The actor takes routes such as `JFK-LAX` and one or more departure dates, and returns one row per flight itinerary: the full list Google shows (usually 50–150 flights per search, more for city-to-city searches), not only the first page. Each row also carries Google's price level (low, typical or high) with the typical price range of the route.

Optional extras add a cheapest-price-per-day calendar and, for one-way searches, the sellers (airlines and agencies) with price, fare name and booking link for the top flights. It suits travel apps, fare monitoring, price research and analysts who need structured flight prices without copying them by hand.

This actor covers flights only. It does not search hotels.

### How to scrape Google Flights prices

![How Google Flights Scraper works: Builds a Google Flights search for each route and date; Requests Google's flight results over plain HTTP; Switches to a new IP when Google refuses one; Returns one ro](https://api.apify.com/v2/key-value-stores/Ll7RrWtDkZYOrBvfE/records/google-flights-flight-and-hotel-prices-how-e7aaa1f4.png)

Price per event by Apify plan:

| Event | Free | Bronze | Silver | Gold and above |
|---|---|---|---|---|
| Flight result | $0.55 per 1,000 | $0.495 per 1,000 | $0.44 per 1,000 | $0.385 per 1,000 |
| Actor start | $0.00005 | $0.00005 | $0.00005 | $0.00005 |

A test run with the API example input below returned 235 rows in 15 s.

1. Open the actor in Apify Console and enter one or more **Routes** (`JFK-LAX`, one per line).
2. Add **Departure dates** as `YYYY-MM-DD` or `+30` (30 days from today). For a round trip set **Return date** or **Trip length in days**.
3. Choose passengers, cabin class, stops, airlines and sorting if needed.
4. Optionally set **Price calendar days** or **Booking options for top N flights**.
5. Click **Start** and download the dataset as JSON, CSV or Excel, or read it through the API.

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

You pay per result row (a flight, a calendar day or a booking option) plus a small actor start fee. Searches that Google rejects and routes without flights are not charged. Examples at the pay-per-event price of $0.55 per 1,000 rows (start fee of a few hundredths of a cent not included):

| Scenario | Rows | Cost |
|---|---|---|
| One route, one date, about 100 flights | ~100 | ~$0.06 |
| 5 routes × 3 dates, about 100 flights each | ~1,500 | ~$0.83 |
| Daily monitor of the 20 cheapest flights on 10 routes (cheapest first, max 20 per search) | 200 per day | ~$0.11 per day |
| One-way route with a 61-day price calendar | 61 | ~$0.03 |

The row limit **Max result rows** (default 1,000) caps the spend of a run.

### Input

![Google Flights Scraper input example: Routes, Departure dates, Adults, Children, Infants in seat, Infants on lap, Cabin class](https://api.apify.com/v2/key-value-stores/Ll7RrWtDkZYOrBvfE/records/google-flights-flight-and-hotel-prices-input-2ea62c65.png)

The main fields:

| Field | Meaning |
|---|---|
| `routes` | ORIGIN-DESTINATION, IATA codes; several airports per side (`JFK,EWR,LGA-MIA`) or Google city ids |
| `departureDates` | `YYYY-MM-DD` or `+N` days; up to about 329 days ahead |
| `returnDate` / `tripLengthDays` | Round trip (use one of them) |
| `adults`, `children`, `infantsInSeat`, `infantsOnLap` | Passengers, at most 9 in total |
| `cabinClass` | economy, premiumEconomy, business, first |
| `maxStops`, `airlines`, `sortBy`, `maxFlightsPerSearch` | Filters and ordering |
| `priceCalendarDays`, `bookingOptionsForTopFlights` | Extra rows |
| `country`, `currency`, `language` | Market, price currency, names |
| `maxItems` | Maximum rows per run |

Example:

```json
{
  "routes": ["JFK-LAX", "LHR-CDG"],
  "departureDates": ["+30", "+37"],
  "cabinClass": "economy",
  "maxStops": "nonstop",
  "sortBy": "price",
  "maxFlightsPerSearch": 20,
  "currency": "USD"
}
```

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

![Google Flights Scraper output example: From, To, Departs, Arrives, Airline](https://api.apify.com/v2/key-value-stores/Ll7RrWtDkZYOrBvfE/records/google-flights-flight-and-hotel-prices-output-e71046f2.png)

| Field | Description |
|---|---|
| `rowType` | flight, calendarDay or bookingOption |
| `price`, `currency` | Total for all passengers (both directions for round trips) |
| `priceLevel`, `lowestPrice`, `typicalPriceLow`, `typicalPriceHigh` | Google's price insight for the search |
| `airline`, `airlineCode`, `flightNumbers` | Carrier and flights |
| `departureAirport`, `departureAt`, `arrivalAirport`, `arrivalAt` | Airports and local times |
| `durationMinutes`, `stops`, `layovers` | Trip length and connections |
| `aircraft`, `legroom`, `co2Grams`, `co2TypicalGrams`, `co2DiffPercent` | Aircraft, legroom and emissions |
| `isBest`, `position` | Google's best-flights flag and rank |
| `url`, `searchUrl` | Google Flights links to the itinerary and to the search |
| `seller`, `sellerIsAirline`, `fareName`, `bookingUrl` | Booking option rows |

Real example (shortened):

```json
{
  "rowType": "flight",
  "id": "B6 723@2026-12-03",
  "origin": "JFK",
  "destination": "LAX",
  "departureDate": "2026-12-03",
  "tripType": "oneWay",
  "position": 1,
  "isBest": true,
  "price": 159,
  "currency": "USD",
  "priceLevel": "typical",
  "typicalPriceLow": 90,
  "typicalPriceHigh": 320,
  "airline": "JetBlue",
  "flightNumbers": "B6 723",
  "departureAt": "2026-12-03T13:59",
  "arrivalAt": "2026-12-03T17:17",
  "durationMinutes": 378,
  "stops": 0,
  "aircraft": "Airbus A320",
  "legroom": "33 in",
  "co2Grams": 426000
}
```

### Use cases

- **Fare monitoring:** schedule daily runs with `+30` dates and Cheapest first to track the lowest prices on your routes.
- **Finding the cheapest day:** use the price calendar to see the lowest fare for each of up to 61 departure days.
- **Price comparison across markets:** run the same route with different `country` and `currency` values, as prices and sellers can differ by market.
- **Travel app and research datasets:** collect itineraries with times, stops, aircraft and CO2 for analysis.
- **Booking-source checks:** list the sellers and fare names for the top flights of a one-way search.

### Limitations

- Dates must be from today to about 329 days ahead; others are skipped with a warning.
- Calendar rows work for one-way searches with airport codes only; booking options work for one-way searches only. Round trips skip them with a warning.
- Metro codes such as NYC or LON are not accepted; list the airports or use Google city ids.
- Price level and typical range can be empty on rare routes, in searches with infants and in some sorted or filtered searches. A flight listed without a price has `price` null.
- `isBest` is true only with Sort by = Best.
- Flights only; no hotels, multi-city trips or cheapest-destination exploration.

### Tips and troubleshooting

- Keep the default Apify datacenter proxy. Google refuses some IPs; the actor switches to a new one automatically. Residential IPs are mostly refused.
- Use `maxFlightsPerSearch` with Sort by = Cheapest first to keep only the cheapest N flights per search.
- For several departure dates on a round trip use `tripLengthDays`; use either it or `returnDate`, not both.
- 0 rows: check that the airports differ, codes are valid IATA codes and dates are within range; the run log names the problem.
- An unknown airline code makes Google reject the search; the log warning names the code.
- Prices are totals for all passengers; set `adults`, `children` and infants accordingly.

### API, MCP and integrations

Run the actor from your code with the same JSON input as in Console. Your API token is in [Console → Settings → API & Integrations](https://console.apify.com/settings/integrations).

**Python** (`pip install apify-client`):

```python
from apify_client import ApifyClient

client = ApifyClient("YOUR_APIFY_TOKEN")
run = client.actor("genial_candlestand/google-flights-scraper-api").call(run_input={"routes": ["JFK-LAX", "LHR-CDG"], "departureDates": ["+30"]})
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)
```

**Node.js** (`npm install apify-client`):

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

const client = new ApifyClient({ token: 'YOUR_APIFY_TOKEN' });
const run = await client.actor('genial_candlestand/google-flights-scraper-api').call({"routes": ["JFK-LAX", "LHR-CDG"], "departureDates": ["+30"]});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items);
```

**HTTP** — one request runs the actor and returns the results (runs up to 5 minutes; longer ones: [run asynchronously](https://docs.apify.com/api/v2/act-runs-post)):

```bash
curl -X POST "https://api.apify.com/v2/acts/genial_candlestand~google-flights-scraper-api/run-sync-get-dataset-items?token=YOUR_APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"routes":["JFK-LAX","LHR-CDG"],"departureDates":["+30"]}'
```

**AI agents (MCP).** Add the actor as a tool of the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp). Claude Code:

```bash
claude mcp add --transport http apify "https://mcp.apify.com?tools=genial_candlestand/google-flights-scraper-api"
```

Claude Desktop, Cursor or VS Code: `{"mcpServers": {"apify": {"url": "https://mcp.apify.com?tools=genial_candlestand/google-flights-scraper-api"}}}`. Then ask, for example:

- "Get the 20 cheapest nonstop flights from JFK to LAX departing in 30 days"
- "Find round-trip LHR to CDG flights for 7 days in economy, prices in EUR"
- "Show the cheapest price per day for JFK to LHR over the next 60 days"

**Integrations.** Run it on a schedule with [Apify Schedules](https://docs.apify.com/platform/schedules) and send the results to Google Sheets, Slack, Zapier, Make, n8n or your webhook — see [Apify integrations](https://docs.apify.com/platform/integrations).

### FAQ

**Is it legal to scrape Google Flights?**<br>
The actor reads publicly visible flight offers and prices; it collects no personal data. You are responsible for how you use the data and for complying with applicable law and the source's terms.

**Can I search round trips?**<br>
Yes. Set `returnDate` or `tripLengthDays`. Prices are totals for both directions.

**Does it need a login or API key?**<br>
No.

**Does it return hotel prices?**<br>
No, flights only. See Google Hotels Scraper below for hotels.

### Also useful

- [Google Hotels Scraper](https://apify.com/genial_candlestand/google-hotels-scraper) — add hotel prices, ratings and amenities for the same trip dates
- [Airbnb Scraper](https://apify.com/genial_candlestand/airbnb-listings-prices-scraper) — compare apartment prices at your destination for the same dates
- [Google Trends Trending Now Scraper](https://apify.com/genial_candlestand/google-trending-now-scraper) — see what people search for right now by country

# Actor input Schema

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

One route per line as ORIGIN-DESTINATION with IATA airport codes, e.g. JFK-LAX. Several airports per side: JFK,EWR,LGA-MIA. Metro codes such as NYC are not accepted. Every route is searched on every departure date.

## `departureDates` (type: `array`):

One date per line: YYYY-MM-DD, or +N for N days from today (e.g. +30), handy for scheduled runs. Up to about 329 days ahead.

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

Set it for a round trip: YYYY-MM-DD or +N days from today. Leave empty for one-way. Use either this or Trip length, not both. Prices of round trips are totals for both directions.

## `tripLengthDays` (type: `integer`):

Round trip with the return N days after each departure date, e.g. 7. Use it instead of Return date when you search several departure dates. Leave empty for one-way.

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

Adult passengers. Adults, children and infants together: at most 9. Prices are totals for all passengers.

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

Children aged 2–11. Counts towards the 9-passenger limit.

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

Infants under 2 with their own seat. Counts towards the 9-passenger limit. Google often lists fewer flights and no price level for searches with infants.

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

Infants under 2 on an adult's lap: at most one per adult. Counts towards the 9-passenger limit, like every other passenger (8 adults + 1 lap infant works, 9 + 1 does not).

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

Travel class searched.

## `maxStops` (type: `string`):

Maximum number of stops per direction.

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

Only flights of these airlines: two-character IATA airline codes, one per line, e.g. UA, LH. Empty = all airlines. An unknown code makes Google reject the search (a warning names it).

## `sortBy` (type: `string`):

Order of the flights. With Best, Google's top picks come first (isBest = true); every other order has no best list, so isBest is false for all rows.

## `maxFlightsPerSearch` (type: `integer`):

Keep only the first N flights of each route and date in the chosen order. Combine with Sort by = Cheapest first to get the N cheapest flights. Empty = the full list.

## `priceCalendarDays` (type: `integer`):

Also return the cheapest price for each of N departure days starting at the departure date (one row per day, up to 61). 0 = off. One-way searches with airport codes only: skipped with a warning for round trips and city ids. Days beyond ~329 days from today are left out.

## `bookingOptionsForTopFlights` (type: `integer`):

Also return where to buy the first N flights of each search: one row per seller (airline or agency) with its price, fare name and booking link. 0 = off. One-way searches only (also with several airports or a city id per side): skipped with a warning for round trips. Each option is one result row.

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

Language of airline, airport and aircraft names, as a code like en, de or pt-BR. Unknown codes are ignored by Google (English).

## `country` (type: `string`):

Country (market) Google Flights searches from: two-letter ISO code like US, DE, JP. Prices and sellers can differ by market.

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

Currency of the prices: three-letter ISO 4217 code like USD, EUR, JPY. Google answers unsupported currencies in USD; every row says the currency it really is in.

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

Stop after this many rows in total (flights, calendar days and booking options). Every row is one charged result.

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

Apify datacenter proxy (the default) works best: the actor switches to a new IP when Google refuses one. Residential IPs are mostly refused by Google Flights and are not recommended.

## Actor input object example

```json
{
  "routes": [
    "JFK-LAX",
    "LHR-CDG"
  ],
  "departureDates": [
    "+30"
  ],
  "adults": 1,
  "children": 0,
  "infantsInSeat": 0,
  "infantsOnLap": 0,
  "cabinClass": "economy",
  "maxStops": "any",
  "sortBy": "best",
  "priceCalendarDays": 0,
  "bookingOptionsForTopFlights": 0,
  "language": "en",
  "country": "US",
  "currency": "USD",
  "maxItems": 1000,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

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

Dataset with all result rows (flights, calendar days, booking options)

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

Flights in the overview 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 = {
    "routes": [
        "JFK-LAX",
        "LHR-CDG"
    ],
    "departureDates": [
        "+30"
    ],
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("genial_candlestand/google-flights-scraper-api").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 = {
    "routes": [
        "JFK-LAX",
        "LHR-CDG",
    ],
    "departureDates": ["+30"],
    "proxyConfiguration": { "useApifyProxy": True },
}

# Run the Actor and wait for it to finish
run = client.actor("genial_candlestand/google-flights-scraper-api").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 '{
  "routes": [
    "JFK-LAX",
    "LHR-CDG"
  ],
  "departureDates": [
    "+30"
  ],
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}' |
apify call genial_candlestand/google-flights-scraper-api --silent --output-dataset

```

## MCP server setup

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

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/MpFyWzhrsIE0MaNOp/builds/aBDfN7pUPi3iYB4ys/openapi.json
