# Google Flights Scraper: Fares, Price Calendar & Price Drops (`locaihost/google-flights`) Actor

Google Flights fares, flights, fares by date, cheapest destinations and booking sellers for any route. Keeps each fare's history and can return only fares that fell. One-way, round trip, multi-city. From $0.80 per 1,000 flights. No login.

- **URL**: https://apify.com/locaihost/google-flights.md
- **Developed by:** [locaihost data](https://apify.com/locaihost) (community)
- **Categories:** Travel, Agents, Automation
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.44 / 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: fares, price calendar and price drops

Search Google Flights for any route and get every flight with its fare, times, stops, airlines, layovers and emissions. Add the lowest fare for each day of the next year, the cheapest places to fly from an airport, and who sells each ticket at what price. Every run remembers the fares it saw, so the next run tells you what changed and can return only the fares that fell.

No login, no API key. A typical search answers in a few seconds.

### What can I get from Google Flights?

| Row type | What it holds | How to get it |
|---|---|---|
| `flight` | One flight option: fare, airlines, flight numbers, times, duration, stops, layovers, each leg with aircraft and legroom, emissions, Google's "low / typical / high" reading of the fare | Any search |
| `calendar-day` | The lowest fare for one departure day | `calendarDays` |
| `destination` | A place you can fly to from the origin, with its lowest fare | `destination: "anywhere"` |
| `booking` | The sellers of one flight (airline or agency) with each one's price, fare name and bag allowance (first and second checked bag, carry-on) | `bookingOptions` |
| `summary` | One free row per route: what was found, the lowest fare, how many fares fell, and Google's price trend for the search over about two months (`priceHistory`) | Always |

### How do I search a route?

```json
{
    "origin": "JFK",
    "destination": "LHR",
    "departureDate": "+30 days",
    "maxResults": 20
}
```

- `origin` and `destination` take an airport code (`SIN`), several codes (`JFK,EWR`), or a city name (`New York`, `Tokyo`).
- Dates are `YYYY-MM-DD` or relative: `tomorrow`, `+30 days`, `+2 weeks`, `+3 months`. Relative dates make a saved task work every day.
- Add `returnDate` for a round trip. The run lists outbound flights, then the return flights that go with the best outbound one (`returnFlightsFor` controls how many).
- `routes` runs up to 50 routes in one go. `multiCity` prices a trip of several legs as one ticket.
- Already have the search open on Google Flights? Paste its address into `flightUrl`. The route, dates, cabin and passengers come from the link (one-way, round trip or multi-city); filters and the other options still apply.

```json
{
    "flightUrl": "https://www.google.com/travel/flights/search?tfs=CB0QAhoeEgoyMDI2LTEyLTEwagcIARIDSkZLcgcIARIDTEhSQAFIAXABggENCP___________wEQAJgBAg",
    "maxResults": 20
}
```

### How do I track fares and get only price drops?

Run the same search on a schedule. From the second run on, every row carries:

| Field | Meaning |
|---|---|
| `previousPrice` | The fare on the previous run |
| `priceChange`, `priceChangePercent` | How far it moved |
| `lowestSeen`, `lowestSeenAt` | The lowest fare since your first run, and when |
| `firstSeenAt` | When this flight or date was first recorded |

Turn on `onlyPriceDrops` and a run returns, and charges for, only the flights, dates and destinations whose fare is lower than last time. `minDropPercent` ignores small moves. A daily watch on a route that did not move costs only the start of the run.

```json
{
    "origin": "SIN",
    "destination": "NRT",
    "departureDate": "2027-03-14",
    "returnDate": "2027-03-21",
    "calendarDays": 60,
    "onlyPriceDrops": true,
    "minDropPercent": 5
}
```

### How do I find the cheapest day to fly?

Set `calendarDays` (up to 365). You get one `calendar-day` row per departure day with the lowest fare, and the cheapest day is marked `isCheapest`. For round trips the stay length is kept the same as your dates. `calendarOnly` skips the flight list.

### How do I find the cheapest places to fly to?

Set `destination` to `anywhere`. You get one `destination` row per place with city, country, airport, lowest fare, airline, stops and flight time.

### Which filters are there?

Cabin (economy to first), passengers (adults, children, infants), most stops, airlines to include or leave out (codes, or the alliances `ONEWORLD`, `SKYTEAM`, `STAR_ALLIANCE`), highest price, longest trip, shortest and longest layover, departure and arrival hours, and sort order (best, cheapest, fastest, departure, arrival, lowest emissions). `currency`, `market` and `language` set the point of sale: fares and sellers can differ by country.

### What does a flight row look like?

```json
{
    "type": "flight",
    "direction": "outbound",
    "rank": 1,
    "price": 412,
    "priceLabel": "412 USD",
    "currency": "USD",
    "previousPrice": 455,
    "priceChange": -43,
    "priceChangePercent": -9.45,
    "lowestSeen": 412,
    "priceLevel": "low",
    "typicalPriceLow": 430,
    "typicalPriceHigh": 620,
    "isBest": true,
    "airlines": ["British Airways"],
    "flightNumbers": ["BA 178"],
    "departureAirport": "JFK",
    "departureTime": "2026-12-14T08:15",
    "arrivalAirport": "LHR",
    "arrivalTime": "2026-12-14T20:05",
    "durationMinutes": 410,
    "duration": "6 hr 50 min",
    "stops": 0,
    "emissionsKg": 356,
    "emissionsVsTypicalPercent": -12,
    "googleFlightsUrl": "https://www.google.com/travel/flights?tfs=..."
}
```

The numbers above show the shape of a row, not a quote.

### How much does it cost?

You pay per row returned: flights, fares by date, destinations and booking sellers each have their own small price, shown on the Pricing tab. Summary rows, routes with no flights, places that are not found and bad input are free. Set a maximum charge on a run and it stops cleanly when it gets there.

On the free plan a run returns up to 1,000 rows.

Measured runs (14 Nov 2026, build 0.1.9, Starter prices; the free summary row is not counted):

| Search | Paid rows | Run time | Cost |
|---|---|---|---|
| JFK to LHR one-way, 20 flights | 20 flights | 19 s | $0.016 |
| JFK to LHR, lowest fare for each of 60 days (`calendarOnly`) | 60 days | 17 s | $0.024 |
| JFK to anywhere, 20 destinations | 20 destinations | 20 s | $0.016 |
| SIN to BKK round trip, 50 outbound + return flights for the best 3 | 81 flights | 9 s | $0.065 |
| JFK to LHR, 5 flights plus sellers for 2 of them | 5 flights, 2 booking rows | 23 s | $0.008 |

### What are the limits?

- Fares are what Google Flights shows at the moment of the run for the chosen country and currency. They can change before you book.
- Google lists some airlines without fares (it shows "price unavailable"); those rows have `price: null`.
- Booking sellers are read for the first flights only (`maxBookingItineraries`, up to 20), because each one is another request.
- Fare history starts with your first run of a search. It is kept per search (route, dates, cabin, passengers, currency), in your own account.
- If Google refuses a request, the run ends with the rows it has and says so in the summary row. `browserFallback` and a proxy are there for that case.

### Can I use it from an AI agent or an automation?

Yes. Six fields cover most uses, a default run answers in seconds, and the output is flat JSON. Use it from the Apify API, schedules, webhooks, Make, n8n, or as a tool through Apify's MCP server.

### Is it allowed?

The Actor reads only what any visitor to Google Flights sees without signing in. It collects no personal data. You are responsible for how you use the results, including Google's terms and the laws that apply to you.

### Did it help?

A rating on the Store helps other people find it. If something is missing or wrong, open an issue on the Issues tab and we will answer within a day.

# Changelog

This Actor's version history is a separate document: https://apify.com/locaihost/google-flights/changelog.md

# Actor input Schema

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

Airport code (SIN), several codes (JFK,EWR), or a city name (New York).

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

Airport code or city name. Write "anywhere" to get the cheapest destinations from the origin.

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

YYYY-MM-DD, or a relative date such as "+30 days", "+2 weeks" or "tomorrow". Empty means 30 days from today.

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

Leave empty for a one-way trip. YYYY-MM-DD or a relative date such as "+37 days".

## `flightUrl` (type: `string`):

Optional. Paste the address of a Google Flights search (it contains "tfs="). Its route, dates, cabin and passengers replace the four fields above; filters and other options below still apply.

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

Most flights returned per route and direction, 1 to 500.

## `onlyPriceDrops` (type: `boolean`):

Every run remembers each fare. With this on, a run returns (and charges) only flights, dates and destinations whose fare is lower than last time. Good for a daily schedule.

## `minDropPercent` (type: `integer`):

With the option above: ignore drops smaller than this.

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

A list of routes, each {"origin","destination","departureDate","returnDate"}. Up to 50. Used in addition to the route above.

## `multiCity` (type: `array`):

Legs of one trip priced together, each {"origin","destination","date"}, for example London to Paris, then Paris to Rome.

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

Round trips: for how many of the first outbound flights the matching return flights are listed (0 to 20). Each one is another request.

## `calendarDays` (type: `integer`):

Adds one row per departure day with the lowest fare, for this many days from the departure date (0 to 365). 0 turns it off.

## `calendarOnly` (type: `boolean`):

Skip the flight list and return only the fares by date.

## `bookingOptions` (type: `boolean`):

For the first flights, list who sells the ticket (airline or agency) and at what price.

## `maxBookingItineraries` (type: `integer`):

1 to 20.

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

Passengers aged 12 and over.

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

Aged 2 to 11.

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

Under 2, own seat.

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

Under 2, on an adult's lap.

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

Cabin class.

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

Most stops allowed.

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

Two-character airline codes (BA, SQ) or alliances (ONEWORLD, SKYTEAM, STAR_ALLIANCE).

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

Two-character airline codes to leave out.

## `maxPrice` (type: `integer`):

In the chosen currency.

## `maxDurationHours` (type: `integer`):

Total travel time per direction.

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

Leave out flights with a shorter connection.

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

Leave out flights with a longer connection.

## `departureTimeFrom` (type: `integer`):

0 to 23.

## `departureTimeTo` (type: `integer`):

0 to 23, this hour included.

## `arrivalTimeFrom` (type: `integer`):

0 to 23.

## `arrivalTimeTo` (type: `integer`):

0 to 23, this hour included.

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

Order of each flight list.

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

Three-letter code, for example USD, EUR, SGD.

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

Two-letter country code. Fares and sellers can differ by country.

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

Language of airport and airline names, for example en, de, pt-BR.

## `browserFallback` (type: `boolean`):

Slower and uses more compute. Only needed if runs report being blocked.

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

Optional. The default connection works for most runs.

## Actor input object example

```json
{
  "origin": "JFK",
  "destination": "LHR",
  "departureDate": "+30 days",
  "maxResults": 20,
  "onlyPriceDrops": false,
  "minDropPercent": 0,
  "routes": [],
  "returnFlightsFor": 1,
  "calendarDays": 0,
  "calendarOnly": false,
  "bookingOptions": false,
  "maxBookingItineraries": 3,
  "adults": 1,
  "children": 0,
  "infantsInSeat": 0,
  "infantsOnLap": 0,
  "cabin": "economy",
  "maxStops": "any",
  "sortBy": "best",
  "currency": "USD",
  "market": "US",
  "language": "en",
  "browserFallback": false,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

## `flights` (type: `string`):

One row per flight with fare, times, stops and the fare's history.

## `calendar` (type: `string`):

Lowest fare per departure day.

## `all` (type: `string`):

Every row, including destinations, sellers and the free summary rows.

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

Rows per type, requests and the run's outcome.

# 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",
    "departureDate": "+30 days",
    "maxResults": 20,
    "routes": [],
    "proxyConfiguration": {
        "useApifyProxy": false
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("locaihost/google-flights").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",
    "departureDate": "+30 days",
    "maxResults": 20,
    "routes": [],
    "proxyConfiguration": { "useApifyProxy": False },
}

# Run the Actor and wait for it to finish
run = client.actor("locaihost/google-flights").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",
  "departureDate": "+30 days",
  "maxResults": 20,
  "routes": [],
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}' |
apify call locaihost/google-flights --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,locaihost/google-flights"
        }
    }
}
```

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/obtFa7dnb7PcwyM0E/builds/chlBg5gzepulQSqxe/openapi.json
