# Google Flights Scraper - Prices, Airlines, Times & Routes (`automly/google-flights-scraper`) Actor

Scrape Google Flights by route and date: price, airlines, flight numbers, departure and arrival times, duration, stops, layovers, aircraft, legroom and carbon emissions. One way or round trip, any cabin, passengers, market and currency.

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

## Pricing

from $0.04 / 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

Google Flights Scraper is a tool that lets you scrape flight prices, airlines, times, routes and emissions from Google Flights for any origin, destination and date. Paste where you fly from and to, pick your dates, and export every itinerary to JSON, CSV or Excel. Start it below, or call it from the API.

⚡ **Fast** - reads many routes and dates at once
🌍 **Any market** - choose the country, language and currency (USD, EUR, GBP...)
🔓 **No login** - public flight data only, nothing to sign in to

### What is Google Flights Scraper?

Google Flights Scraper turns a list of routes and dates into a clean table of flights. For each search it returns the itineraries Google shows - the cheapest and most convenient options for that route - with the full fare, the airlines, flight numbers, departure and arrival times, total duration, number of stops, each layover, the aircraft, the legroom and the estimated carbon emissions. It works for one-way and round-trip searches, any cabin (economy, premium economy, business, first), any passenger mix, and any market and currency.

Use it to track fares over time, compare prices across dates and airports, feed a travel app or price-alert tool, or build a dataset of routes for analysis.

### What can Google Flights Scraper do?

- Search **many routes and dates in one run** - every origin is paired with every destination and date.
- Return **one row per itinerary** with price, airlines, flight numbers, times, duration, stops, layovers, aircraft, legroom and carbon.
- Handle **one-way and round-trip** searches, with your choice of **cabin** and **passengers** (adults, children, infants).
- Price results in **any currency and market** - set the country, language and currency.
- **Filter by stops** (nonstop, 1 stop, 2 stops) and **sort** by top flights, price, duration or departure time.
- Return a **Google Flights link** for every itinerary so you can open the exact result.

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

| ✈️ Flight | 🕑 Schedule | 💵 Price & more |
|-----------|-------------|-----------------|
| Airlines | Departure time | Price |
| Flight numbers | Arrival time | Currency |
| Stops | Total duration | Cabin class |
| Layovers (airport, city, length) | Departure & arrival airports | Carbon emissions |
| Aircraft type | Trip type (one-way / round) | Emissions vs typical |
| Legroom | Dates | Google Flights link |

### How to scrape Google Flights

1. Add one or more **origins** (airport or city codes like `JFK` or `LON`, or city names like `New York`).
2. Add one or more **destinations** the same way.
3. Add your **departure dates** (`YYYY-MM-DD`). For a round trip, set the trip type to round and add **return dates**.
4. Pick the **cabin**, **passengers**, **currency** and **market**, and optionally a **stops** filter or a **sort**.
5. Click **Start** and download the results as JSON, CSV or Excel - or open the **Google Flights link** on any row.

### How many results do you get?

For each search, the scraper returns the **full list** of itineraries Google has for that route and date - not just the handful shown first, but every option behind "View more flights" too. On busy routes that is **hundreds** of itineraries; on thin routes it is however many exist. Run several dates or nearby airports to widen the picture further.

A **round-trip** search returns the outbound options priced as the **round-trip total**, which is how Google presents them. To price a specific return flight, run the return leg as its own search.

### ⬇️ Input

| Field | Description |
|-------|-------------|
| From (origins) | Airport/city codes, city names, or place ids. One per line. |
| To (destinations) | Airport/city codes, city names, or place ids. One per line. |
| Departure dates | Outbound dates, `YYYY-MM-DD`. |
| Trip type | One way or round trip. |
| Return dates | Return dates for a round trip, `YYYY-MM-DD`. |
| Cabin class | Economy, premium economy, business or first. |
| Adults / Children / Infants | Passenger counts. |
| Currency / Country / Language | Market the prices are shown in. |
| Stops | Any, nonstop, 1 stop or 2 stops. |
| Sort by | Top flights, price, duration or departure time. |
| Max results | The most rows to save across all searches (0 = no limit). |

```json
{
  "origins": ["JFK", "Boston"],
  "destinations": ["LHR", "CDG"],
  "departureDates": ["2026-11-15"],
  "tripType": "oneway",
  "cabinClass": "economy",
  "adults": 1,
  "currency": "USD",
  "market": "US",
  "stops": "any",
  "maxResults": 100
}
```

### ⬆️ Output

Each row is one itinerary. Example:

```json
{
  "origin": "JFK",
  "destination": "LHR",
  "departureDate": "2026-11-15",
  "returnDate": null,
  "tripType": "oneway",
  "cabinClass": "economy",
  "price": 368,
  "currency": "USD",
  "airlines": ["Virgin Atlantic"],
  "stops": 0,
  "durationMinutes": 430,
  "departureAirport": "JFK",
  "departureAirportName": "John F. Kennedy International Airport",
  "departureTime": "2026-11-15T08:00",
  "arrivalAirport": "LHR",
  "arrivalAirportName": "Heathrow Airport",
  "arrivalTime": "2026-11-15T20:10",
  "layovers": [],
  "segments": [
    {
      "airline": "VS",
      "airlineName": "Virgin Atlantic",
      "flightNumber": "VS26",
      "departureAirport": "JFK",
      "arrivalAirport": "LHR",
      "departureTime": "2026-11-15T08:00",
      "arrivalTime": "2026-11-15T20:10",
      "durationMinutes": 430,
      "aircraft": "Airbus A330-900neo",
      "legroom": "31 in"
    }
  ],
  "carbonEmissionsGrams": 365000,
  "carbonVsTypicalPercent": -16,
  "googleFlightsUrl": "https://www.google.com/travel/flights/search?tfs=...",
  "source": "JFK -> LHR 2026-11-15",
  "scrapedAt": "2026-10-12T00:00:00Z"
}
```

### Use cases

- **Fare tracking** - run the same routes on a schedule and watch prices move.
- **Price comparison** - compare dates, nearby airports and cabins side by side.
- **Travel apps and alerts** - feed live flight options into your own product.
- **Market research** - build a dataset of routes, airlines and prices.
- **Emissions reporting** - capture carbon estimates for corporate travel.

### Use with AI agents (MCP)

This scraper works as a tool for AI agents. An agent can ask, in plain words, "find economy flights from JFK to London on 2026-11-15" and pass:

```json
{ "origins": ["JFK"], "destinations": ["London"], "departureDates": ["2026-11-15"], "maxResults": 20 }
```

### ❓ FAQ

**How much does it cost?**
See the Pricing tab on this page. You pay for each flight saved, plus a small fee for each route and date searched. A search for a place that does not exist costs nothing.

**How many flights will I get per search?**
The complete list Google has for the route and date, including everything behind "View more flights" - often hundreds on busy routes. Run more dates or nearby airports for an even wider view.

**Can I search round trips?**
Yes. Set the trip type to round and add return dates. The price shown is the round-trip total for each outbound option.

**Can I use city names instead of codes?**
Yes - common city names like `New York` or `London` work, and so do 3-letter airport or city codes like `JFK` or `LON`. For smaller places, use the airport code.

**Do I need to log in?**
No. This scraper reads public Google Flights data only.

**Is this affiliated with Google?**
No. Google Flights is a trademark of Google LLC. This is an independent tool and is not affiliated with or endorsed by Google.

**Something looks wrong - what do I do?**
Open an issue on the Issues tab with your input and what you expected, and it will be looked into.

# Actor input Schema

## `origins` (type: `array`):

Where to fly from: 3-letter airport or city codes like JFK or LON, city names like New York, or Google place ids like /m/02_286. One per line. Every origin is paired with every destination and date.

## `destinations` (type: `array`):

Where to fly to: airport or city codes like LHR or PAR, city names, or place ids. One per line.

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

Outbound dates in YYYY-MM-DD, e.g. 2026-11-15. One per line.

## `tripType` (type: `string`):

One way, or round trip. For a round trip, add return dates below.

## `returnDates` (type: `array`):

Return dates in YYYY-MM-DD for a round trip, e.g. 2026-11-22. Each return date is paired with each departure date (pairs where the return is on or before departure are skipped).

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

The travel class to price.

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

Adult passengers (age 18+). At least one.

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

Children (age 2-17).

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

Infants with their own seat.

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

Infants travelling on an adult's lap.

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

Currency for prices, e.g. USD, EUR, GBP.

## `market` (type: `string`):

Two-letter country the results are priced for, e.g. US, GB, DE.

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

Two-letter language for names, e.g. en, es, de.

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

Keep only itineraries with at most this many stops.

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

Order of the rows within each search.

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

The most rows this run saves, across all searches. Set 0 for no limit.

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

The default works for most runs. If results come back empty, try a different proxy option.

## Actor input object example

```json
{
  "origins": [
    "JFK"
  ],
  "destinations": [
    "LHR"
  ],
  "departureDates": [
    "2026-11-15"
  ],
  "tripType": "oneway",
  "cabinClass": "economy",
  "adults": 1,
  "children": 0,
  "infantsInSeat": 0,
  "infantsOnLap": 0,
  "currency": "USD",
  "market": "US",
  "language": "en",
  "stops": "any",
  "sortBy": "top",
  "maxResults": 100,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

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

No description

## `details` (type: `string`):

No description

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

No description

## `report` (type: `string`):

No description

# 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 = {
    "origins": [
        "JFK"
    ],
    "destinations": [
        "LHR"
    ],
    "departureDates": [
        "2026-11-15"
    ],
    "currency": "USD",
    "market": "US",
    "language": "en",
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("automly/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 = {
    "origins": ["JFK"],
    "destinations": ["LHR"],
    "departureDates": ["2026-11-15"],
    "currency": "USD",
    "market": "US",
    "language": "en",
    "proxyConfiguration": { "useApifyProxy": True },
}

# Run the Actor and wait for it to finish
run = client.actor("automly/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 '{
  "origins": [
    "JFK"
  ],
  "destinations": [
    "LHR"
  ],
  "departureDates": [
    "2026-11-15"
  ],
  "currency": "USD",
  "market": "US",
  "language": "en",
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}' |
apify call automly/google-flights-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,automly/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/IHzQZPWOvXykg8dzX/builds/lputRsewaSrw0LYJe/openapi.json
