# Google Flights Scraper: Prices, Airlines and Times (`oski/google-flights-prices-scraper`) Actor

Scrape Google Flights for any route and date. Get price, currency, airline, flight numbers, departure and arrival times, duration, stops and layovers, one way or round trip, economy to first. Type LHR-JFK or London to New York. No login, no browser. Pay per flight, $10 per 1,000.

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

## Pricing

from $9.70 / 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 Prices Scraper

Flight prices, airlines, flight numbers, departure and arrival times, duration, stops and layovers from Google Flights for any route, date and cabin. One way or round trip, in the currency you choose. Pay only for flights delivered. No login, no browser, no API key.

Tired of flight scrapers that time out or come back empty? This one reads Google's own results data over a plain connection in about a second a route, retries the page when Google sends it without results, and ends every run with a status line that says exactly what came back and why.

### What you get

One row per itinerary:

| Field | Example |
|---|---|
| `route`, `origin`, `destination` | LHR-JFK, LHR, JFK |
| `depart_date`, `return_date`, `trip_type` | 2026-11-10, null, one way (the dates Google priced; what you asked for is in `requested_depart_date` and `requested_return_date`) |
| `origin_airport`, `destination_airport` | the airport Google attached to a city name (Berlin gives BER) |
| `airline`, `airlines`, `flight_numbers` | JetBlue, \["JetBlue"], \["B62220"] |
| `depart_airport`, `arrive_airport` | LHR, JFK |
| `depart_at`, `arrive_at` | 2026-11-10T07:25, 2026-11-10T10:32 (local times) |
| `duration_min`, `stops` | 487, 0 |
| `layovers` | \[{"airport": "BCN", "name": ..., "city": "Barcelona", "minutes": 335}] |
| `legs` | one entry per flight: number, airline, airports, times, duration, aircraft, legroom, emissions |
| `price`, `price_text`, `currency`, `price_for` | 409, "GBP 409", GBP, one way |
| `cabin`, `passengers` | economy, 1 |
| `aircraft`, `legroom`, `emissions_kg` | Airbus A321neo, 32 in, 549 |
| `rank` | best or other (Google's own grouping) |
| `search_url`, `scraped_at` | the Google Flights search and the run time |

Plus one free `SUMMARY` row per route (flights delivered, requested, available, currency, and a reason when nothing came back).

### Use cases

- **Fare monitoring:** schedule a daily run for your routes and chart the cheapest fare.
- **Price comparison content:** "cheapest flights London to New York in November" tables with live prices.
- **Travel agencies and corporate travel:** price a batch of trips for several dates and cabins in one run.
- **Market research:** which airlines fly a route, how often, with how many stops, at what price.
- **Alerts:** run it with your own threshold logic and message yourself when a fare drops.

### How to use it

1. Type your routes, one per line: airport codes (LHR-JFK), city names (London to New York, Winston-Salem to Boston) or a pasted Google Flights search link. The same search typed twice runs once.
2. Pick a departure date (empty means four weeks ahead). Add a return date for round-trip totals, or leave it empty for one-way prices.
3. Choose cabin (economy, business or first; Google's search does not read premium economy), number of adults and a currency if you want one.
4. Start the run. Download the dataset as JSON, CSV or Excel, or read it through the API.

### Prices: what they mean

- With no return date the price is a **one-way fare**. With a return date it is the **round-trip total** for the outbound flight shown, as Google displays it. The `price_for` field says which.
- Prices are totals for the number of adults you set.
- Currency follows your Currency field, or the country's currency when it is empty (United Kingdom gives GBP). The code is always in `currency`.
- A few flights carry no fare on Google ("Price unavailable"). They are delivered with `price` null and are free.
- Dates can be up to 330 days ahead. The rows carry the dates Google priced, and the SUMMARY row says so if they differ from the request.
- Google groups results into "best" and "other" flights; both are delivered, in Google's order, with the group in `rank`.

### How many flights and what it costs

Google lists 10 to 60 itineraries per route and date. Each route is one search.

| Flights delivered | Cost |
|---|---|
| 100 | about $1.00 |
| 1,000 | about $10 |

Price: a small fee per run plus a fee per flight delivered with a fare. Flights without a fare and routes that return nothing are free.

### Tips for bigger runs

- Run many routes in one go: they are fetched in parallel.
- To price several dates for the same route, add the route once per run and schedule runs per date, or pass each date as its own run through the API.
- For a daily fare series, schedule the actor with fixed dates so runs compare like with like.

### Scheduling and API

Schedule it in the Apify console (Schedules > Create) or call it:

```bash
curl -X POST "https://api.apify.com/v2/acts/oski~google-flights-prices-scraper/run-sync-get-dataset-items?token=YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"routes": ["LHR-JFK", "LHR-LAX"], "departDate": "2026-11-10", "returnDate": "2026-11-17", "currency": "GBP"}'
```

### If something looks wrong

| Status line says | What it means | What to do |
|---|---|---|
| Input problem: Add at least one route | The routes field was empty | Add a route like LHR-JFK |
| Input problem: "X" is not a route | A line had only one place | Type two places, origin and destination |
| Input problem: Return date must be on or after the departure date | Dates were reversed | Swap them |
| Google did not understand the route | Google could not read the places as typed | Check the spelling or use airport codes such as LHR-JFK |
| Google listed no flights for it on that date | Google has no itineraries for that pair and date | Check the airport codes or try another date |
| Google sent the page without its results three times | Google served a results-less page on every try | Run again later; it is a transient Google behaviour |
| Google showed a consent page or a captcha | Google asked for consent or refused the exit IP | Run again; if it repeats, choose the RESIDENTIAL proxy group |
| Fewer flights than listed | The route had more flights than your maximum | Raise "Flights per route" |
| Input problem: ... is a link but not a Google Flights search link | A hotel, explore or other site's link was pasted | Paste a google.com/travel/flights link or type the route |
| Input problem: ... is more than 330 days ahead | The search names month and day only | Pick a date within 330 days |
| Stopped early because the run reached its maximum cost | Your per-run cost cap was hit; unstarted routes have a SUMMARY row saying so | Raise the cap under Run options |
| I wanted one-way prices but got round trip | A return date was set | Clear the return date |

### Sibling actors

- Google Hotels Prices Scraper: hotel names, nightly prices, ratings and amenities for any destination and dates.

# Actor input Schema

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

One route per line as airport codes (LHR-JFK) or city names (London to New York). A pasted Google Flights search link also works and is fetched exactly as pasted, with its own dates and passengers.

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

Leave empty for four weeks from today. Typed dates such as 10/11/2026 or relative values such as "7 days" work too. Up to 330 days ahead.

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

Leave empty for one-way prices. With a return date every price is the round-trip total for the outbound flight shown.

## `passengers` (type: `integer`):

Prices are totals for this many adult passengers.

## `cabin` (type: `string`):

Cabin class to price. Premium economy is not offered because Google Flights search does not read it.

## `maxFlightsPerRoute` (type: `integer`):

Google lists its best flights first, then the rest, usually 10 to 60 per route. 50 flights cost about $0.50.

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

3-letter code such as GBP, USD or EUR. Leave empty for the currency of the country below.

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

The Google country edition to ask (the gl parameter). It sets the default currency and can change which fares Google shows.

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

Apify datacenter proxy is enough (tested clean). Choose the RESIDENTIAL group only if Google starts refusing; it adds about $0.003 per search page.

## `concurrency` (type: `integer`):

How many routes run in parallel.

## Actor input object example

```json
{
  "routes": [
    "LHR-JFK",
    "Manchester to Dublin",
    "https://www.google.com/travel/flights?q=flights%20from%20BER%20to%20LHR%20on%20december%203%20one%20way"
  ],
  "passengers": 1,
  "cabin": "economy",
  "maxFlightsPerRoute": 50,
  "currency": "GBP",
  "country": "GB",
  "proxyConfiguration": {
    "useApifyProxy": true
  },
  "concurrency": 3
}
```

# Actor output Schema

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

One row per itinerary: route, date, airline, flight numbers, departure and arrival, duration, stops, price and Google rank; plus one free SUMMARY row per route.

## `allFields` (type: `string`):

Every field for each itinerary, including currency, price basis (one way or round trip total), layovers, legs, cabin, passengers, aircraft, legroom, emissions and the search link.

# 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": [
        "LHR-JFK",
        "London to Dubai",
        "SFO-LAX"
    ],
    "maxFlightsPerRoute": 50
};

// Run the Actor and wait for it to finish
const run = await client.actor("oski/google-flights-prices-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 = {
    "routes": [
        "LHR-JFK",
        "London to Dubai",
        "SFO-LAX",
    ],
    "maxFlightsPerRoute": 50,
}

# Run the Actor and wait for it to finish
run = client.actor("oski/google-flights-prices-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 '{
  "routes": [
    "LHR-JFK",
    "London to Dubai",
    "SFO-LAX"
  ],
  "maxFlightsPerRoute": 50
}' |
apify call oski/google-flights-prices-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,oski/google-flights-prices-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/6UIx4FEne7sLwYFcY/builds/PiVHKc2hGlvNfTyFl/openapi.json
