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

Google Flights scraper API for flight prices and itineraries on the routes and dates you choose, one-way or round trip: fare, airlines, flight numbers, times, stops, layovers and emissions, plus Google's price outlook. Filters for stops, airlines, price, times and layovers. $0.047 per 1,000 flights.

- **URL**: https://apify.com/dami_studio/google-flights-scraper.md
- **Developed by:** [Dami's Studio](https://apify.com/dami_studio) (community)
- **Categories:** Travel
- **Features:** Limited permissions
- **Stats:** 1 total users, 0 monthly users, 100.0% runs succeeded, 1 bookmarks
- **User rating**: 5.00 out of 5 stars

## Pricing

from $0.05 / 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.

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 for flight prices on the routes and dates you choose: give it airports or cities and get one row per flight**, with the fare, airlines, flight numbers, departure and arrival times, stops, layovers and emissions.

One-way or round trip, for one date or every day of a month. Each row also carries Google's own read of the route's prices that day: low, typical or high, with the usual range.

Fares are what Google Flights shows at the moment of the run. They move during the day, so a schedule that runs every morning gives you the trend.

| | |
|---|---|
| **Input** | Airport or city codes and dates (JFK to LAX on 2026-12-10), route lines, or links copied from Google Flights |
| **Output** | One row per flight: price, currency, airlines, flight numbers, times with time zones, duration, stops, layovers, each segment with aircraft and legroom, emissions, Google's price outlook |
| **Ceiling** | 100 searches per run, 500 flights per search |
| **Speed** | About 70 flights from four searches in 4 to 6 seconds (measured on our runs) |
| **Account needed** | None from you |
| **Price** | $0.047 per 1,000 flights, the same rate on every plan. The free plan's $5 a month covers about 106,000 flights |

| Using an AI agent? | |
|---|---|
| Actor | `dami_studio/google-flights-scraper` |
| Set one field | `routes`, labelled "More routes" in the Console: one line per search, such as JFK-LAX 2026-12-10 |
| Cap the bill | `maxTotalChargeUsd` on the run, for example `0.10`: it never charges past that |
| MCP, one link | `https://mcp.apify.com/?tools=fetch-actor-details,dami_studio/google-flights-scraper` |
| How often | Daily, to follow a route's fares toward a trip date |

### 🔍 What Google Flights Scraper does

It runs each search the way you would on Google Flights and writes down the flights Google lists for it: the best flights first, then the rest, each with its exact fare and the trip leg by leg.

Round trips come two ways. By default each outbound flight carries the round-trip price Google shows for it. Set "Return flights for" and the run also opens the first few outbound flights and lists the return flights that go with each, priced as a pair.

The filters are applied to every row before it is written: stops, airlines in or out, highest price, longest journey, departure and arrival windows, layover length, and the airports a trip may or may not connect in. A flight that fails one is left out and not charged.

### 📋 What data you get from each Google Flights flight

| What you get | Field |
|---|---|
| The fare and what it covers | `price`, `currency`, `priceCovers` |
| Who flies it | `airline`, `airlineCodes`, `flightNumbers` |
| Where and when, in local time and with the time zone | `departureAirport`, `arrivalAirport`, `departureDateTime`, `arrivalDateTime`, `departureDate`, `departureTime`, `arrivalDate`, `arrivalTime` |
| How long and how many stops | `durationMinutes`, `stops` |
| Each connection | `layovers` (airport, city, minutes, change of airport) |
| Each flight of the trip | `segments` (flight number, airline, airports, times, minutes, aircraft, legroom, emissions, other flight numbers it is sold under) |
| Emissions next to the route's typical figure | `emissionsKg`, `typicalEmissionsKg`, `emissionsVsTypicalPercent` |
| Google's read of today's prices | `priceLevel`, `lowestPrice`, `typicalPrice`, `typicalPriceLow`, `typicalPriceHigh`, `priceHistory` (optional) |
| Where it sits in Google's list | `rank`, `isBestFlight` |
| The search | `origin`, `destination`, `searchDepartureDate`, `searchReturnDate`, `tripType`, `leg`, `cabinClass`, `adults`, `children`, `searchUrl` |
| Return flights | `outboundFlightNumbers`, `outboundDepartureDateTime` on each return row |

### ▶️ How to scrape Google Flights prices

1. Open [Google Flights Scraper](https://apify.com/dami_studio/google-flights-scraper) and click **Try for free**.
2. Type airport or city codes into **From** and **To**, such as JFK and LAX.
3. Set **Departure date**, and **Return date** for a round trip. **Last departure date** searches every day up to it.
4. Pick any filters, then **Start**.
5. Open the **Output** tab, or export the rows as CSV, Excel or JSON.

An empty run returns one free sample row showing the shape of the output.

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

$0.047 per 1,000 flights, the same rate on every plan. The free plan's $5 a month covers about 106,000 flights.

Not charged: the sample row, note rows, and flights your filters leave out. The price outlook and the segments on each row cost nothing extra.

### 📥 What you give it

| Field | What it does | Default |
|---|---|---|
| `origin`, `destination` | Airport or city codes; several, comma-separated, are searched together | none (prefill JFK to LAX) |
| `departureDate`, `returnDate` | `YYYY-MM-DD`, or `+14` for 14 days from the run; no return date means one way | 30 days from today; none |
| `tripLengthDays` | A round trip without a return date: come back this many days later | none |
| `departureDateTo` | Search every day up to this date, at most 31 days | none |
| `routes` | More searches, one per line: `JFK-LAX 2026-12-10`, `LHR-JFK 2026-12-10 2026-12-17` for a round trip, `JFK-MIA +14`, or `JFK-LAX` for 30 days ahead | none |
| `startUrls` | Links copied from Google Flights' address bar after a search loads | none |
| `adults`, `children` | Travellers; prices are for the whole party | 1, 0 |
| `cabinClass` | `economy`, `premium_economy`, `business`, `first` | `economy` |
| `currency`, `country`, `language` | `USD`, `US`, `en` and so on | `USD`, `US`, `en` |
| `maxStops` | `any`, `0`, `1`, `2` | `any` |
| `airlines`, `excludeAirlines` | Two-character airline codes | none |
| `maxPrice`, `maxDurationHours` | Highest fare for the party, longest journey each way | none |
| `departureTimeRange`, `arrivalTimeRange` | `HH:MM-HH:MM`, outbound | none |
| `returnDepartureTimeRange`, `returnArrivalTimeRange` | `HH:MM-HH:MM`, return flights | none |
| `minLayoverMinutes`, `maxLayoverMinutes` | Connection length | none |
| `connectingAirports`, `excludeConnectingAirports` | Airport codes | none |
| `sortBy` | `best`, `price`, `fastest`, `departure`, `arrival`, `emissions` | `best` |
| `maxFlightsPerSearch` | Flights per search after filters, up to 500 | 100 |
| `returnFlightsFor` | On a round trip, list the return flights of this many outbound flights, up to 10 | 0 |
| `includePriceHistory` | Add Google's price graph for the search, one figure a day for about 60 days | off |
| `maxItems` | Flights in the whole run | no limit |

A code that is not an airport or city, a date written another way, or a time window like `25:00-26:00` stops the run before any search, with a free row saying which field to fix. A bad line in `routes` gets its own free row and the other lines still run.

```json
{
  "origin": "BOS",
  "destination": "HNL",
  "departureDate": "2026-12-12",
  "maxStops": "1",
  "sortBy": "price",
  "maxFlightsPerSearch": 30
}
```

### 📤 What you get back

A flight from a real run on 7 November 2026, with its two segments:

```json
{
  "recordType": "flight",
  "tripType": "one-way",
  "leg": "outbound",
  "origin": "BOS",
  "destination": "HNL",
  "rank": 5,
  "isBestFlight": false,
  "price": 276.5,
  "currency": "USD",
  "airline": "Alaska",
  "flightNumbers": ["AS 389", "AS 845"],
  "departureDateTime": "2026-12-12T18:13:00-05:00",
  "arrivalDateTime": "2026-12-13T21:53:00-10:00",
  "durationMinutes": 1960,
  "stops": 1,
  "layovers": [
    { "airport": "SAN", "airportName": "San Diego International Airport", "city": "San Diego", "durationMinutes": 1180, "changeOfAirport": false }
  ],
  "segments": [
    { "flightNumber": "AS 389", "departureAirport": "BOS", "arrivalAirport": "SAN", "departureDateTime": "2026-12-12T18:13:00-05:00", "arrivalDateTime": "2026-12-12T21:55:00-08:00", "durationMinutes": 402, "aircraft": "Boeing 737MAX 9 Passenger", "legroom": "31 in", "emissionsKg": 297 },
    { "flightNumber": "AS 845", "departureAirport": "SAN", "arrivalAirport": "HNL", "departureDateTime": "2026-12-13T17:35:00-08:00", "arrivalDateTime": "2026-12-13T21:53:00-10:00", "durationMinutes": 378, "aircraft": "Airbus A330", "legroom": "31 in", "emissionsKg": 333 }
  ],
  "emissionsKg": 630,
  "typicalEmissionsKg": 604,
  "emissionsVsTypicalPercent": 4,
  "priceCovers": "one way, 1 passenger",
  "priceLevel": "low",
  "lowestPrice": 277,
  "typicalPriceLow": 310,
  "typicalPriceHigh": 640
}
```

| Field | How to read it |
|---|---|
| `price` | For the whole party, in `currency`; on a round trip it covers both ways |
| `departureDateTime`, `arrivalDateTime` | Local time at that airport, with its offset from UTC |
| `lowestPrice`, `typicalPrice...` | Google's figures for the search, rounded; the same on every row of one search, empty on return rows |
| `legroom` | Empty when Google lists none, often in premium cabins |
| `searchUrl` | Opens the same search on Google Flights |

### 🧾 Reading the output

Real rows have `recordType` `flight`. The free sample row has `_sample: true`. Note rows have `ok: false`, cost nothing and carry an `errorCode`:

- `BAD_INPUT`: a field or a route line was unusable. `details` says which.
- `NO_RESULTS`: the search ran, and Google listed no flight for it, or none matched your filters.
- `NOT_SERVED`: Google Flights did not answer this search during the run. Run it again later.
- `TIME_LIMIT`: the run's time limit came first; flights before it are delivered.
- `COST_LIMIT`: your maximum cost was reached.
- `UNEXPECTED_ERROR`: something broke on our side; please report it.

To keep only flights, filter on `recordType` being `flight`. To see return flights alone, filter on `leg` being `return`.

### 💡 What people use it for

- Anyone watching a trip they have to book: a daily run on one route and date, sorted by price, to buy when `priceLevel` turns `low`.
- Travel planners comparing a month of departure dates with "Last departure date", to see which days cost less.
- Analysts tracking fares across many routes for a market or an airline, from `routes` lines.
- Sustainability teams choosing flights by `emissionsKg` next to the route's typical figure.

A small recipe: put ten routes in `routes`, set `sortBy` to `price` and `maxFlightsPerSearch` to 1, schedule it daily, and keep the rows: one fare per route per day.

### 🚧 What it does not do

- It reads fares; it doesn't book or hold a seat.
- Up to 100 searches per run and 500 flights per search.
- Prices are those Google shows to a visitor from the country you set, at the time of the run.
- It is not an official Google tool. Dami's Studio is independent and is not affiliated with or endorsed by Google, or by any other company named on this page.

### 🧭 Which travel scraper do you need?

| If you want | Use |
|---|---|
| Flight prices and schedules from Google Flights | This one |
| Hotel prices for your dates from Google Hotels | [Google Hotels Scraper](https://apify.com/dami_studio/google-hotels-scraper) |
| Hotel prices and rooms on Booking.com | [Booking.com Hotels Scraper](https://apify.com/dami_studio/booking-hotels-scraper) |
| Hotels, rooms and guest reviews on Agoda | [Agoda Hotels Scraper](https://apify.com/dami_studio/agoda-hotels-scraper) |
| Holiday rentals with prices and ratings | [Airbnb Listings Scraper](https://apify.com/dami_studio/airbnb-listings-scraper) |

### ❓ Questions people ask

#### Do I need a Google account to scrape Google Flights?

No. You don't need a Google account. The run reads what a signed-out visitor sees on Google Flights.

#### Why don't my prices match what I see on Google Flights?

Fares change during the day, and Google prices by the country you browse from. Set `country` and `currency` to yours, open the row's `searchUrl` in a private browser window, and compare with a run started at the same moment.

#### Can I see which day has the lowest fare?

Yes. Set "Last departure date" up to 31 days after the departure date, `sortBy` to `price` and `maxFlightsPerSearch` to 1. You get the first flight by price for each day; on a round trip the trip length stays the same.

#### How do I call it from code or an AI assistant?

Use the actor's API tab, or connect an assistant through `https://mcp.apify.com/?tools=fetch-actor-details,dami_studio/google-flights-scraper`. In Python:

```python
from apify_client import ApifyClient

client = ApifyClient("<YOUR_APIFY_TOKEN>")
run = client.actor("dami_studio/google-flights-scraper").call(
    run_input={"origin": "JFK", "destination": "LAX", "departureDate": "2026-12-10", "maxFlightsPerSearch": 20},
    max_total_charge_usd=0.10,
)
for row in client.dataset(run["defaultDatasetId"]).iterate_items():
    if row.get("ok") is False:
        continue
    print(row["price"], row["airline"], row["flightNumbers"], row["departureDateTime"])
```

#### Is scraping Google Flights legal?

The data is public: the run reads Google Flights the way a signed-out visitor sees it, with no account and nothing private. Fares and schedules are about flights, not people. Google's own terms still apply to what you do with the data. Apify's write-up on [the legality of web scraping](https://blog.apify.com/is-web-scraping-legal/) covers the general picture. We are not lawyers.

### 🆘 If something breaks

Open the **Issues** tab and include the run's link and the input you used. We read every report.

# Actor input Schema

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

Airport or city code, such as JFK, LHR or NYC. Several codes, separated by commas, are searched together the way Google Flights does (JFK, EWR).

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

Airport or city code, such as LAX, CDG or LON. Several codes, separated by commas, are searched together.

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

Written YYYY-MM-DD, for example 2026-12-10, or +14 for 14 days from the day the run starts. Leave it empty and the run searches 30 days from today.

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

For a round trip, written YYYY-MM-DD or +21 (days from the day the run starts). Leave it empty for one way. Round-trip prices cover both ways.

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

For a round trip without a return date: come back this many days after leaving. With an empty departure date, a scheduled run keeps searching the same trip a month ahead.

## `departureDateTo` (type: `string`):

Search every day from the departure date up to this one, at most 31 days, to compare fares day by day. On a round trip the trip length stays the same. Written YYYY-MM-DD or +40 (days from the day the run starts).

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

One search per line, written like JFK-LAX 2026-12-10, with a second date for a round trip: LHR-JFK 2026-12-10 2026-12-17. A date can be +14 (days from the day the run starts); a line with no date searches 30 days ahead. Up to 100 searches a run in all.

## `startUrls` (type: `array`):

Links copied from the address bar after a search on Google Flights has loaded. Each is searched as it is, with the filters below applied to its flights.

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

Travellers aged 12 and over. Prices are for the whole party.

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

Children aged 2 to 11, with a seat.

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

The cabin to price.

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

Prices in this currency, a three-letter code such as USD, EUR, GBP or JPY.

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

Search as a visitor from this country, a two-letter code such as US, GB or DE. Fares and the airlines shown can differ by country.

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

Language for airport and airline names, such as en, de or pt-BR.

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

The most stops on each way of the trip.

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

Two-character airline codes, such as DL, BA or U2. Every flight of a trip has to be on one of them.

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

Two-character airline codes. A trip with any flight on one of them is left out.

## `maxPrice` (type: `number`):

Leave out trips that cost more, in the currency above, for the whole party.

## `maxDurationHours` (type: `number`):

Leave out trips that take longer, layovers included, for each way.

## `departureTimeRange` (type: `string`):

Outbound departure window in local time, written HH:MM-HH:MM, such as 06:00-12:00. A window like 22:00-06:00 runs past midnight.

## `arrivalTimeRange` (type: `string`):

Outbound arrival window in local time, written HH:MM-HH:MM.

## `returnDepartureTimeRange` (type: `string`):

For the return flights (see "Return flights for"), written HH:MM-HH:MM.

## `returnArrivalTimeRange` (type: `string`):

For the return flights, written HH:MM-HH:MM.

## `minLayoverMinutes` (type: `integer`):

Leave out trips with a connection shorter than this.

## `maxLayoverMinutes` (type: `integer`):

Leave out trips with a connection longer than this.

## `connectingAirports` (type: `array`):

Airport codes. Trips with a stop elsewhere are left out; non-stop trips stay.

## `excludeConnectingAirports` (type: `array`):

Airport codes. Trips that stop in any of them are left out.

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

The order of each search's flights. "Google's order" puts Google's best flights first.

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

The most flights to return from each search, after the filters and the order.

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

On a round trip, also list the return flights for this many of the first outbound flights, with the total price of each pair. Each return flight is one more row. 0 lists outbound flights only.

## `includePriceHistory` (type: `boolean`):

Add Google's price graph for the search to every outbound row: one figure a day for about the last 60 days.

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

The most flights in the whole run. Leave it empty for no total limit.

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

Optional: your own proxies. Runs work without them.

## Actor input object example

```json
{
  "origin": "JFK",
  "destination": "LAX",
  "adults": 1,
  "children": 0,
  "cabinClass": "economy",
  "currency": "USD",
  "country": "US",
  "language": "en",
  "maxStops": "any",
  "sortBy": "best",
  "maxFlightsPerSearch": 20,
  "returnFlightsFor": 0,
  "includePriceHistory": false
}
```

# Actor output Schema

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

One row per flight Google Flights lists for each search. A search with no flight matching it, a search not served, or a run cut short writes one free row saying so.

# 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": "LAX",
    "maxFlightsPerSearch": 20
};

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

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

```

## MCP server setup

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