# Google Flights Fare Tracker | Compare Dates (`datascraperes/google-flights-fare-tracker`) Actor

Compare Google Flights fares across up to 14 departure dates for one airport pair. Export prices, flight numbers, departure times, stops, and segments.

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

## Pricing

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

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

Compare **Google Flights fares by route and departure date**. Enter two airport codes to collect prices, schedules, stops and flight numbers in a structured Dataset.

### What this Actor does

Search Google Flights for one airport pair across up to 14 consecutive departure dates. Each Dataset row represents one priced departure option, including its segments and the fare shown for the traveling party. With a return date, the search shows outbound choices and the corresponding round-trip quotes.

### Use cases

- Compare fares for your route across nearby departure dates.
- Track price changes with repeat searches and use the observation timestamp to compare snapshots.
- Export flight numbers, stops and arrival times for routes within your price or duration limit.

### How to use

1. Enter the two required fields in the Input tab, **Departure airport** and **Arrival airport**. Use three-letter airport codes such as MAD and BCN.
2. Open an optional section to change dates, traveler details or filters. The prefilled Madrid–Barcelona example checks one-way nonstop flights in EUR 30 days from today, with a limit of 5 results, 150 minutes and EUR 250.
3. Click **Start**. Open the Dataset for fares and the run report for the outcome by date.

### Input

The smallest API input is `{"origin":"MAD","destination":"BCN"}`. Those two IATA codes are the only required fields. The form groups the other settings in expandable sections.

- **Travel dates (optional)**. Leave `departureDate` blank for 30 days from today (UTC) and `returnDate` blank for one-way. Enter dates as `YYYY-MM-DD`. The return must be on or after departure, and all dates must fall within 330 days. `daysToSearch` accepts 1–14 and defaults to 1. Any return date advances with the departure date.
- **Travelers, cabin and currency (optional)**. Omitted values select one adult, zero children, Economy and USD. The total party can include up to nine travelers. Fares can be shown in USD, EUR or GBP.
- **Filters and result limit (optional)**. Omit `maxStops`, `maxDurationMinutes` or `maxPrice` to remove that filter. Enter 0 stops for nonstop flights. The duration covers the outbound option and the fare covers the whole party. `maxResultsPerDate` accepts 1–100 and defaults to 20, ordered by fare within each date.

The complete example below uses the form's prefilled values.

```json
{
  "origin": "MAD",
  "destination": "BCN",
  "departureDate": "",
  "returnDate": "",
  "daysToSearch": 1,
  "maxResultsPerDate": 5,
  "currency": "EUR",
  "adults": 1,
  "children": 0,
  "cabin": "economy",
  "maxStops": 0,
  "maxDurationMinutes": 150,
  "maxPrice": 250
}
```

### Output

The default Dataset contains one row per unique priced departure option. Local departure and arrival times refer to the airports shown in each segment. Export the Dataset as JSON or CSV. Optional details such as aircraft, seat pitch or estimated emissions may be missing.

The run report records the status and saved result count. `completed` means every requested date was processed and may include dates with zero matching fares. For input rejected during a run, the log identifies the fields to correct and `RUN_REPORT` records `invalid_input` with details in `inputIssues`. The run ends normally with zero search requests and zero billable results. Apify may also show an input validation message in the Console or API before starting the run.

`incomplete` identifies unfinished or unverified work, and `stopped_by_budget` means the spending limit stopped collection. When Google Flights is unavailable, a response cannot be fully read, or the run approaches its time limit, the Actor can end with a warning and retain confirmed rows in the Dataset. See `RUN_REPORT` for the reason and check `collectionComplete` before relying on coverage of every requested date.

This item was collected in a Google Flights search:

```json
{
  "id": "24e6de74a640449788c881800aba8aa8e7558ac106f643f94c78e8e80a87d84c",
  "origin": "MAD",
  "destination": "BCN",
  "departureDate": "2026-12-18",
  "returnDate": null,
  "departureLocal": "2026-12-18T21:05",
  "arrivalLocal": "2026-12-18T22:30",
  "tripType": "one-way",
  "cabin": "economy",
  "adults": 1,
  "children": 0,
  "price": 67,
  "currency": "EUR",
  "stops": 0,
  "durationMinutes": 85,
  "airlines": [
    "Air Europa"
  ],
  "bucket": "best",
  "emissionsGrams": 59000,
  "segments": [
    {
      "origin": "MAD",
      "originName": "Adolfo Suárez Madrid-Barajas Airport",
      "destination": "BCN",
      "destinationName": "Josep Tarradellas Barcelona-El Prat Airport",
      "departureLocal": "2026-12-18T21:05",
      "arrivalLocal": "2026-12-18T22:30",
      "durationMinutes": 85,
      "airlineCode": "UX",
      "airlineName": "Air Europa",
      "flightNumber": "7707",
      "aircraft": "Boeing 737",
      "seatPitch": "29 in"
    }
  ],
  "searchUrl": "https://www.google.com/travel/flights/search?tfs=CBwQAhoeEgoyMDI2LTEyLTE4agcIARIDTUFEcgcIARIDQkNOQgEBSAFwAYIBCwj___________8BmAEC&hl=en&curr=EUR&ucbcb=1",
  "observedAt": "2026-11-18T11:25:49+00:00"
}
```

### Pricing

The pay-per-event price includes platform usage during the run. One verified flight result saved in the default Dataset counts as one event. Starting a run, checking a date without matching fares and filtering out an option are free. Check the Pricing tab for your plan's current price.

### Related Actors

| Actor | Best for |
|---|---|
| [Tripadvisor Places & Ratings Data Scraper](https://apify.com/datascraperes/tripadvisor-places-scraper) | Discover hotels, restaurants and attractions at your destination. |
| [Tripadvisor Reviews Scraper with Place Data](https://apify.com/datascraperes/tripadvisor-reviews-data-scraper) | Compare traveler reviews of destination hotels and activities. |

### Limits and data quality

Results reflect the priced departure options Google Flights returned at the time of the search. Availability, fare and optional details can change. The row limit is a ceiling per date. Round-trip searches do not enumerate return itineraries. The Actor supports one airport pair per run and does not search multi-city trips or provide seller booking links.

### Frequently asked questions

#### What does the fare include for a round-trip search?

It is the round-trip quote Google Flights displayed alongside the outbound option for the requested dates and traveling party. Open the Google Flights search link in the row to check current choices and fares.

#### What does a completed search with zero rows mean?

The returned options did not contain a priced match for the selected search and filters. Check the dates, route, stops and maximum fare, then run another search if needed.

### Responsible use

Use the Actor in compliance with applicable laws and the terms of the services you access.

### Support

Open an issue in the Actor's **Issues** tab with the run ID and a reproducible input.

For fare comparison and CSV export examples in Python, JavaScript and cURL, see the [Google Flights Fare Tracker integration examples](https://github.com/datacrawler-edu/google-flights-fare-tracker-python).

# Actor input Schema

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

Enter a three-letter IATA airport code such as MAD for Madrid.

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

Enter a different three-letter IATA airport code such as BCN for Barcelona.

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

Choose the first departure date in YYYY-MM-DD format. Leave blank for 30 days from today (UTC).

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

Leave blank for a one-way search. Choose a date on or after departure to see outbound options with round-trip fares.

## `daysToSearch` (type: `integer`):

Use 1 to search a single date. With multiple dates, any return date moves forward by the same offset. Keep all dates within 330 days of today (UTC).

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

Enter the number of adults. The default is 1.

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

Enter the number of children. The default is 0. Up to 9 travelers can travel together.

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

Choose a cabin class. The default is Economy.

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

Choose the currency for fares and the maximum fare filter. The example uses EUR. The default is USD.

## `maxStops` (type: `integer`):

Use 0 for nonstop flights. Leave this filter blank to allow any number of stops.

## `maxDurationMinutes` (type: `integer`):

Enter the total flight time including connections. Leave this filter blank to allow any duration.

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

Enter the maximum fare for the whole traveling party in the selected currency. Leave this filter blank to allow any fare.

## `maxResultsPerDate` (type: `integer`):

Set how many qualifying fares to save for each date, lowest price first. The example uses 5. The default is 20.

## Actor input object example

```json
{
  "origin": "MAD",
  "destination": "BCN",
  "departureDate": "",
  "returnDate": "",
  "daysToSearch": 1,
  "adults": 1,
  "children": 0,
  "cabin": "economy",
  "currency": "EUR",
  "maxStops": 0,
  "maxDurationMinutes": 150,
  "maxPrice": 250,
  "maxResultsPerDate": 5
}
```

# Actor output Schema

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

No description

## `runReport` (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": "MAD",
    "destination": "BCN",
    "departureDate": "",
    "returnDate": "",
    "daysToSearch": 1,
    "adults": 1,
    "children": 0,
    "cabin": "economy",
    "currency": "EUR",
    "maxStops": 0,
    "maxDurationMinutes": 150,
    "maxPrice": 250,
    "maxResultsPerDate": 5
};

// Run the Actor and wait for it to finish
const run = await client.actor("datascraperes/google-flights-fare-tracker").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": "MAD",
    "destination": "BCN",
    "departureDate": "",
    "returnDate": "",
    "daysToSearch": 1,
    "adults": 1,
    "children": 0,
    "cabin": "economy",
    "currency": "EUR",
    "maxStops": 0,
    "maxDurationMinutes": 150,
    "maxPrice": 250,
    "maxResultsPerDate": 5,
}

# Run the Actor and wait for it to finish
run = client.actor("datascraperes/google-flights-fare-tracker").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": "MAD",
  "destination": "BCN",
  "departureDate": "",
  "returnDate": "",
  "daysToSearch": 1,
  "adults": 1,
  "children": 0,
  "cabin": "economy",
  "currency": "EUR",
  "maxStops": 0,
  "maxDurationMinutes": 150,
  "maxPrice": 250,
  "maxResultsPerDate": 5
}' |
apify call datascraperes/google-flights-fare-tracker --silent --output-dataset

```

## MCP server setup

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

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/3vcfmLtNWqBPfe0nb/builds/eTwqelLDdspYVHNjQ/openapi.json
