# Google Flights Scraper & API: Prices, One-Way & Round-Trip (`quarra/google-flights-price-scraper`) Actor

Flight offers from Google Flights for your trips: one-way or round trip, dates, passengers, cabin, stops and airlines. Each offer with its price and currency, airlines, flight numbers, stops, layovers, times, durations, aircraft and CO2. Several trips per run.

- **URL**: https://apify.com/quarra/google-flights-price-scraper.md
- **Developed by:** [Quarra Labs](https://apify.com/quarra) (community)
- **Categories:** Travel, E-commerce
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.65 / 1,000 flight offers

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 Price Scraper: One-Way & Round-Trip Fares

Flight offers from Google Flights for the trips you give: one way or round trip, your dates, passengers, cabin, stops
and airlines. Each offer comes with its price and currency, airlines, flight numbers, stops and layovers, departure and
arrival times, durations, aircraft, legroom and CO2 estimate. Several trips in one run. No account, no API key. Export
as JSON, CSV or Excel, or read it through the Apify API.

**$0.90 per 1,000 flights** ($0.65 on Gold plans and above), plus a start fee of $0.002 per run. Offers without a
price, trips with no flight and trips that fail are not charged.

### Quick start

1. Add trips in **Trips**, one per line: `LAX-JFK`, `LAX-JFK 2026-12-10` or `LAX-JFK 2026-12-10 2026-12-17`.
2. Pick the **Departure date** (and a **Return date** for round trips) for lines without their own dates.
3. Click **Start** and read the flights in the run's **Output** tab.

Run it every day on the same routes (Apify schedules) to follow how fares move. Like any Apify Actor, it can also be
run through the Apify API and connected to webhooks, Make, Zapier, n8n or Apify's MCP server for AI agents.

### What it is used for

- **Fare tracking**: the price of each flight on a route, day after day, before your dates.
- **Route research**: which airlines fly a route, nonstop or not, at what times, on which aircraft.
- **Travel tools and agents**: real fares for a trip, ready to compare, in one API call.

### What you get

| | |
|---|---|
| Price for all passengers and its currency, as Google Flights shows it | yes |
| One way, or round trip (outbound flights with the round-trip price, then return options) | yes |
| Airlines, flight numbers, operating airline | yes |
| Departure and arrival airports and local times, total duration | yes |
| Stops: airport, city, layover time, overnight, change of airport | yes |
| Each flight: aircraft, legroom, duration, overnight, CO2 | yes |
| CO2 of the itinerary against the typical CO2 for the route | yes |
| Whether Google Flights lists it among its "best" flights | yes |
| Whether prices for the trip are low, typical or high right now | yes |
| Separate tickets (self-transfer) | yes |

### Inputs

- **Trips**: airport codes (IATA), then optional dates. `LAX-JFK` uses the dates set below; `LAX-JFK 2026-12-10` is a
  one-way trip on that day; `LAX-JFK 2026-12-10 2026-12-17` (or `… 2026-12-10 to 2026-12-17`) is a round trip.
  Relative dates work too, with their unit (`LAX-JFK 30 days 37 days`). Dates are written `YYYY-MM-DD`: a date like
  `12/20` or `10/12/2026` is refused rather than guessed (month or day first? which year?), and so is a number without
  a unit. City codes work too (`NYC-LON`, `PAR-ROM`): all the airports of the city. Up to 2,000 trips per run; a trip
  given twice is read once.
- **Departure date** and **Return date (round trip)**: for trips without their own dates. Absolute (`2026-12-10`) or
  relative (`30 days`). Google Flights shows flights up to 329 days ahead (about 11 months).
- **Return flights for the cheapest outbound flights** (round trips): Google Flights lists the outbound flights first,
  each with its round-trip price. The return options of the cheapest outbound flights are listed too, each with the
  round-trip total (1 by default, up to 10; 0 = outbound flights only).
- **Adults** and **Children** (2 to 11): 9 passengers at most. Prices are the total for all passengers. Infants
  (under 2) are not supported (see Limits).
- **Cabin**: economy, premium economy, business or first.
- **Stops**: any, nonstop only, 1 stop or fewer, 2 stops or fewer.
- **Only these airlines** / **Not these airlines**: 2-letter airline codes (`AA`, `DL`, `B6`) or an alliance
  (`STAR_ALLIANCE`, `SKYTEAM`, `ONEWORLD`).
- **Currency**: 3-letter code (`USD`, `EUR`, `GBP`…).
- **Max results**: the exact number of charged flights the run delivers.

Example, through the API:

```json
{
  "trips": ["LAX-JFK 2026-12-10 2026-12-17", "SFO-ORD 2026-12-12"],
  "adults": 2,
  "cabinClass": "economy",
  "maxStops": "nonstop",
  "currency": "USD",
  "returnFlightsFor": 2,
  "maxItems": 200
}
```

### Output

One record per flight offer in the dataset. A shortened record:

```json
{
  "type": "flight",
  "status": "ok",
  "offerId": "3f1c0b7e9a2d4c58e611",
  "input": "LAX-JFK 2026-12-10",
  "tripType": "oneWay",
  "leg": "oneWay",
  "from": "LAX",
  "to": "JFK",
  "departureDate": "2026-12-10",
  "price": 205,
  "currency": "USD",
  "priceCovers": "oneWay",
  "passengers": {"adults": 1, "children": 0, "infantsInSeat": 0, "infantsOnLap": 0},
  "cabinClass": "economy",
  "isBest": true,
  "priceLevel": "typical",
  "airlines": ["JetBlue"],
  "flightNumbers": ["B6 2824"],
  "stops": 0,
  "totalDurationMinutes": 323,
  "departureTime": "2026-12-10T08:00",
  "arrivalTime": "2026-12-10T16:23",
  "layovers": [],
  "emissionsGrams": 436000,
  "typicalEmissionsGrams": 333000,
  "emissionsVsTypicalPercent": 31,
  "segments": [
    {"airline": "JetBlue", "flightNumber": "B6 2824", "from": "LAX", "to": "JFK", "departure": "2026-12-10T08:00",
     "arrival": "2026-12-10T16:23", "durationMinutes": 323, "aircraft": "Airbus A320", "legroom": "33 inches"}
  ],
  "googleFlightsUrl": "https://www.google.com/travel/flights?tfs=…",
  "scrapedAt": "2026-10-21T07:00:00Z"
}
```

Fields that need a word of explanation:

- `status`: `ok` (delivered, charged), `noPrice` (free: Google Flights lists the flight without a price). Free
  `noFlights` records say that a trip has no flight with your filters; free `error` records say why a trip could not be
  read (`retryable` says if a later run may work).
- `price`: the total for all passengers. For round trips, `priceCovers` is `roundTrip`: the price is the round-trip
  total, on outbound records (the cheapest round trip with that outbound flight) as on return records (that outbound
  flight with that return).
- `leg`: `oneWay`, `outbound`, or `return`. A return record names its outbound flight in `outboundFlight`.
- `currency`: read from Google Flights for each price, never assumed. When Google Flights does not offer the currency
  you asked for, the prices come in the one it used and the run's notes say so.
- `selfTransfer`: `true` when the price is for separate tickets, bought one by one. On a return record, that
  outbound and that return are separate tickets (Google Flights says "Separate tickets"). On an outbound record, the
  cheapest round trip with that outbound flight is made of separate tickets.
- `googleFlightsUrl`: the same search on Google Flights, to open in a browser.
- Times are local to each airport.

The run summary (counts per trip, why the run stopped, errors) is the `OUTPUT` record of the run's key-value store.

### Pricing

Pay per event:

| Event | Price |
|---|---|
| Flight offer with its price | $0.90 per 1,000 ($0.80 Bronze, $0.75 Silver, $0.65 Gold and above) |
| Run start | $0.002 per GB of memory (1 GB minimum; $0.002 at the default 256 MB) |

Higher Apify plans pay less per result. Never charged: offers without a price, trips with no flight, error records.
Set **Maximum cost per run** in the run options and the run stops before going over it.

### Limits

- Fares are those Google Flights shows in the United States, in English (the currency is yours to pick).
- One-way and round trips; multi-city trips are not supported.
- Searches with infants (under 2) are not supported: Google Flights does not give the complete list of flights with
  infants here, and a partial list would mislead. A run that asks for infants stops before any search.
- Google Flights shows the flights of its first results page for a search (often 30 or more); it does not list every
  fare of every booking site.
- Return options are read for the cheapest outbound flights you choose (up to 10 per trip).
- Fares move from one minute to the next: two runs a few minutes apart can differ.
- Connection settings are not used: every run reads Google Flights through the standard connection, and the run's
  notes say so.

### FAQ

**Do I need a Google account?** No.

**Is the price per person?** No: it is the total for all the passengers you set, as Google Flights shows it.

**Why is the start fee per GB of memory?** That is how Apify counts a run start. The Actor runs at 256 MB, so you pay
one start: $0.002.

**Can I try it on the free Apify plan?** Yes: the free plan's monthly credit covers thousands of flights.

**What if the run is restarted by the platform (migration or reboot)?** It resumes where it was: flights already in the
dataset are not delivered or charged again.

**Is it legal?** It collects fares that Google Flights shows to any visitor. Check the rules that apply to your use of
the data.

**Does the Actor send anything to Quarra?** Only when a run fails or runs out of time: the Actor, its build, the error
type, the line of our code where it happened, and the memory and time the run was given, so we can fix it fast. Never
your input, your results, your account or the run ID.

# Actor input Schema

## `trips` (type: `array`):

Airport or city codes (IATA), then optional dates: 'LAX-JFK' (uses the dates below), 'LAX-JFK 2026-12-10' (one way), 'LAX-JFK 2026-12-10 2026-12-17' (round trip). Relative dates work too, with their unit: 'LAX-JFK 30 days 37 days'. Write dates as YYYY-MM-DD (12/20 is refused, not guessed). Up to 2,000 trips per run.

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

For trips without their own date. A date (2026-12-10) or a relative one ('30 days'). Google Flights shows flights up to 329 days ahead (about 11 months).

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

Set it for round trips: trips without their own dates come back on this date. Leave empty for one-way trips.

## `returnFlightsFor` (type: `integer`):

Round trips: Google Flights lists outbound flights first, each with its round-trip price. Set how many of the cheapest outbound flights also get their return flights listed (each return option with the round-trip total). 0 = outbound flights only.

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

Prices are the total for all passengers.

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

Children aged 2 to 11. 9 passengers in all at most. Infants (under 2) are not supported.

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

Cabin searched.

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

Most stops per direction.

## `includeAirlines` (type: `array`):

2-letter airline codes (AA, DL, B6) or an alliance (STAR_ALLIANCE, SKYTEAM, ONEWORLD).

## `excludeAirlines` (type: `array`):

2-letter airline codes or an alliance.

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

3-letter code (USD, EUR, GBP…). Each price comes with the currency Google Flights actually used.

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

Total number of charged flights the run delivers, counted exactly. Free records (errors, flights without a price, trips with no flight) are not counted.

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

Connection. Keep the default (automatic): other settings are not needed and are not used. Costs are included in the price.

## Actor input object example

```json
{
  "trips": [
    "LAX-JFK"
  ],
  "departureDate": "30 days",
  "returnFlightsFor": 1,
  "adults": 1,
  "children": 0,
  "cabinClass": "economy",
  "maxStops": "any",
  "currency": "USD",
  "maxItems": 20,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

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

Every record with all its fields, and free records with the reason.

## `overview` (type: `string`):

One line per offer: price, airlines, times, stops.

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

Counts per trip, why the run stopped, errors.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

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

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "trips": [
        "LAX-JFK"
    ],
    "departureDate": "30 days",
    "adults": 1,
    "maxItems": 20,
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("quarra/google-flights-price-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 = {
    "trips": ["LAX-JFK"],
    "departureDate": "30 days",
    "adults": 1,
    "maxItems": 20,
    "proxyConfiguration": { "useApifyProxy": True },
}

# Run the Actor and wait for it to finish
run = client.actor("quarra/google-flights-price-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 '{
  "trips": [
    "LAX-JFK"
  ],
  "departureDate": "30 days",
  "adults": 1,
  "maxItems": 20,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}' |
apify call quarra/google-flights-price-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,quarra/google-flights-price-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/flRYuLsR7aH8WG5rg/builds/lW7ldtCaXfqp21Omn/openapi.json
