# Google Flights Scraper (`mina_safwat/google-flights-scraper`) Actor

Scrapes Google Flights fares. Any route and dates, every cabin, full filter set, prices in the currency you choose, and per-leg detail including aircraft and CO2.

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

## Pricing

from $2.00 / 1,000 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?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

Scrape **Google Flights** fares for any route — every itinerary with prices in your currency, full per-leg detail, and the complete filter set. No browser, no API key, no login.

### What does Google Flights Scraper do?

This Actor searches [Google Flights](https://www.google.com/travel/flights) exactly as you would — origin, destination, dates, passengers, cabin — and returns the results as structured data. For each itinerary you get the fare, airlines, number of stops, total journey time, layover airports, CO2 emissions, and a breakdown of every leg with departure and arrival times, flight duration, and aircraft type.

Searches finish in seconds.

### Why use Google Flights Scraper?

- **Fare monitoring** — track a route daily and catch price drops on a schedule.
- **Travel dashboards** — feed live fares into an internal tool or a comparison site.
- **Route research** — compare carriers, stop counts, and journey times across dates.
- **Sustainability reporting** — every itinerary carries its CO2 estimate and the typical figure for that route.

Running it on Apify adds scheduling, an API, integrations (Sheets, Slack, Zapier, S3), and run monitoring.

### How to use Google Flights Scraper

1. Enter an **Origin** and **Destination** as 3-letter airport codes, e.g. `JFK` and `LHR`.
2. Pick a **Departure date**. Add a **Return date** for a round trip, or leave it empty for one-way.
3. Set passengers and **Cabin**.
4. Choose a **Currency**, add any filters you want, and click **Start**.

Results appear in the Output tab as they are scraped, and download as JSON, CSV, Excel, or XML.

### Input

Origin, destination, and departure date are required. Everything else is optional.

| Field | Description |
| --- | --- |
| `origin` / `destination` | 3-letter IATA airport codes. |
| `departure_date` | `YYYY-MM-DD`, in the future and within the next year. |
| `return_date` | Adding it makes the search a round trip. |
| `adults`, `children`, `infants_in_seat`, `infants_on_lap` | Passenger mix. Children are 2–11; infants are under 2. |
| `seat_class` | Economy, Premium economy, Business, or First. |
| `currency` | All fares converted to it. |
| `max_results` | Stops after this many itineraries. |

#### Filters

**Max stops** (0 for non-stop only) · **Max price** · **Airlines** (2-letter codes, or `ONEWORLD` / `SKYTEAM` / `STAR_ALLIANCE`) · **Carry-on and checked bags** (only fares including them) · **Departure and arrival time windows** · **Max trip duration** · **Min and max layover** · **Hide self-transfer itineraries** · **Exclude basic economy** · **Lower emissions only**

### Output

```json
{
  "price": 913,
  "currency": "EUR",
  "airlines": ["ITA"],
  "stops": 1,
  "is_direct": false,
  "total_duration_minutes": 385,
  "origin": "CAI",
  "destination": "LHR",
  "departure_time": "2026-10-15T17:55:00",
  "arrival_time": "2026-10-16T09:30:00",
  "layover_airports": ["FCO"],
  "carbon_emission_grams": 656000,
  "carbon_typical_for_route_grams": 709000,
  "seat_class": "Economy",
  "trip_type": "round-trip",
  "direction": "round-trip",
  "legs": [
    {
      "from_airport_code": "CAI",
      "from_airport": "Cairo International Airport",
      "to_airport_code": "FCO",
      "to_airport": "Leonardo da Vinci International Airport",
      "departure_time": "2026-10-15T17:55:00",
      "arrival_time": "2026-10-15T20:30:00",
      "duration_minutes": 215,
      "aircraft": "Airbus A321neo"
    }
  ]
}
```

You can download the dataset in various formats such as JSON, HTML, CSV, or Excel.

#### Data fields

| Field | Description |
| --- | --- |
| `price`, `currency` | The fare Google shows for this itinerary. |
| `airlines` | Carriers operating the journey. |
| `stops`, `is_direct`, `layover_airports` | Connection detail. |
| `origin`, `destination`, `departure_time`, `arrival_time` | Endpoints of the journey, as ISO timestamps in local time. |
| `total_duration_minutes` | Gate to gate, including layovers. |
| `carbon_emission_grams`, `carbon_typical_for_route_grams` | This itinerary's CO2 against the typical figure for the route. |
| `legs` | Every flight in order, with airports, times, duration, and aircraft type. |
| `direction` | `one-way`, `round-trip`, or `outbound` / `return` — see below. |

### How round trips are priced

For a round trip, you get the **outward** flights, each priced for the **whole return journey** — exactly what you see on Google Flights before you choose your flight home. So the price covers both directions, while the flight details describe the journey out.

One exception: when your party includes children, Google does not give a combined return fare. The Actor then searches each direction on its own and labels every row `outbound` or `return`, with one-way prices. The run log tells you when this happens. Two one-way fares often add up to more than a return ticket, so treat those as a guide and check the airline's own site.

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

One search returns every matching itinerary at once, so the cost depends on how many routes and dates you look up — not on how many flights come back. Searching one route for one date is about as cheap as a run gets.

### Tips

- **Non-stop only:** set **Max stops** to `0` rather than filtering the results afterwards.
- **Watch a route over time:** schedule the Actor daily with the same input and the dataset becomes a price history.
- **Compare dates:** run a separate search for each departure date. Google prices one date at a time, not a range.
- **Fares move.** A quoted fare is what Google shows at that moment and can change before you book.

### FAQ and support

**Does it need a Google account or an API key?** No. It reads only publicly visible search results.

**Why did a search return nothing?** The route may have no service on that date, or your filters may be too tight — a `max_price` below every available fare returns an empty result rather than an error.

**Are these bookable prices?** They are the fares Google displays, excluding seat selection, bags beyond what you filtered for, and airline-specific fees. Always confirm on the airline's site before booking.

**Is scraping Google Flights legal?** This Actor collects publicly available data and no personal information. You are responsible for how you use the data, including compliance with Google's terms. Consult a lawyer if you are unsure.

Found a bug or want a field that is missing? Open an issue on the Actor's Issues tab.

### SEO Keywords

google flights scraper, scrape flight prices, flight fare tracker, airfare price monitoring, google flights api, cheap flight data, travel price scraping, airline ticket price scraper, flight route data, fare comparison tool

# Actor input Schema

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

3-letter IATA code of the departure airport, e.g. "JFK", "LHR", "CAI".

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

3-letter IATA code of the arrival airport, e.g. "LHR".

## `departure_date` (type: `string`):

YYYY-MM-DD, in the future and within the next year. Leave empty to search roughly a month from today.

## `return_date` (type: `string`):

YYYY-MM-DD. Leave empty for a one-way search. With a return date, results are outbound itineraries priced for the complete round trip — that is how Google Flights presents them.

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

Passengers aged 12 and over.

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

Passengers aged 2 to 11.

## `infants_in_seat` (type: `integer`):

Under 2, occupying their own seat.

## `infants_on_lap` (type: `integer`):

Under 2, travelling on an adult’s lap.

## `seat_class` (type: `string`):

Cabin to price. Higher cabins return fewer results on some routes.

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

Currency all fares are converted to.

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

Language of airline and airport names in the output.

## `max_results` (type: `integer`):

Stops after this many itineraries.

## `max_stops` (type: `integer`):

0 for non-stop only, 1 for up to one stop, and so on. Leave empty for any.

## `max_price` (type: `integer`):

Highest fare to return, in the selected currency.

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

Restrict to these carriers by 2-letter IATA code, e.g. "BA", "AF". Alliance codes ONEWORLD, SKYTEAM, and STAR\_ALLIANCE also work. Leave empty for all.

## `carry_on_bags` (type: `integer`):

Only show fares including this many carry-on bags.

## `checked_bags` (type: `integer`):

Only show fares including this many checked bags.

## `earliest_departure_hour` (type: `integer`):

0-23, local time at the origin.

## `latest_departure_hour` (type: `integer`):

0-23, local time at the origin.

## `earliest_arrival_hour` (type: `integer`):

0-23, local time at the destination.

## `latest_arrival_hour` (type: `integer`):

0-23, local time at the destination.

## `max_duration_minutes` (type: `integer`):

Total journey time per leg, including layovers.

## `min_layover_minutes` (type: `integer`):

Reject connections shorter than this.

## `max_layover_minutes` (type: `integer`):

Reject connections longer than this.

## `hide_self_transfer` (type: `boolean`):

Exclude separate tickets and self-transfers, where you re-check bags and bear the risk of a missed connection yourself.

## `exclude_basic_economy` (type: `boolean`):

Drop the most restrictive fare class.

## `less_emissions_only` (type: `boolean`):

Only itineraries Google flags as below-average CO2 for the route.

## `proxy_country` (type: `string`):

Comma-separated 2-letter codes, rotated across retries. Residential proxies are recommended — Google rate-limits datacentre IPs.

## Actor input object example

```json
{
  "origin": "JFK",
  "destination": "LHR",
  "adults": 1,
  "children": 0,
  "infants_in_seat": 0,
  "infants_on_lap": 0,
  "seat_class": "Economy",
  "currency": "USD",
  "language": "en-US",
  "max_results": 50,
  "airlines": [],
  "carry_on_bags": 0,
  "checked_bags": 0,
  "hide_self_transfer": false,
  "exclude_basic_economy": false,
  "less_emissions_only": false,
  "proxy_country": "US,GB,DE,NL,FR"
}
```

# Actor output Schema

## `dataset` (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 = {
    "origin": "JFK",
    "destination": "LHR"
};

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

# Run the Actor and wait for it to finish
run = client.actor("mina_safwat/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": "LHR"
}' |
apify call mina_safwat/google-flights-scraper --silent --output-dataset

```

## MCP server setup

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