# Google Flights Price Calendar — Cheapest Fare Every Day (`thenetaji/google-flights-price-calendar`) Actor

The cheapest Google Flights fare for every departure date across up to 93 days, for a one-way trip or a round trip of a fixed length. Find the cheapest day to fly from one run instead of searching date by date.

- **URL**: https://apify.com/thenetaji/google-flights-price-calendar.md
- **Developed by:** [The Netaji](https://apify.com/thenetaji) (community)
- **Categories:** Travel, Automation, Business
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.08 / 1,000 days

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 Price Calendar

The Google Flights Price Calendar returns the lowest fare Google Flights shows for every departure date in a window of up to 93 days, as one row per date. It answers which day is cheapest to fly in a single run, for a one-way trip or for a round trip of a fixed length.

### Accepted input

- `origin` and `destination`: three-letter IATA airport codes such as `JFK` and `LAX`; several airports may be joined with commas.
- `startDate` and `endDate`: the first and last departure dates. `endDate` defaults to 30 days after `startDate`; a window longer than 93 days is shortened to 93, and the dropped dates are listed in the log.
- `tripLengthDays`: `0` for one-way fares, or the number of days between departure and return for round-trip fares.
- `adults`, `children`, `infantsInSeat`, `infantsOnLap`, `cabin`, `stops` and `currency`, as on Google Flights.

```json
{
  "origin": "JFK",
  "destination": "LAX",
  "startDate": "2026-12-01",
  "endDate": "2026-12-31",
  "tripLengthDays": 7
}
```

### Response fields

`departure_date`, `return_date`, `price`, `currency`, `origin`, `destination` and `trip_length_days`.

```json
{
  "departure_date": "2026-12-01",
  "return_date": "2026-12-08",
  "price": 367,
  "currency": "USD",
  "origin": "JFK",
  "destination": "LAX",
  "trip_length_days": 7
}
```

On a one-way calendar `return_date` and `trip_length_days` are null. `price` is the total for all passengers and, on a round trip, covers both directions.

### Behaviour on partial results

Google does not price every date; dates without a fare are left out of the dataset and are not charged, so a 31-day window can return fewer than 31 rows. The fares are the calendar figures Google shows before a search and can differ slightly from the price of a specific flight on that day.

### Related Actors

The [Google Flights Scraper](https://apify.com/thenetaji/google-flights-scraper) lists every flight for a chosen date, with booking options per airline and agency.

# Actor input Schema

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

Departure airport as a three-letter IATA code, such as JFK. Several airports, comma separated, search them together: JFK,EWR,LGA.

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

Arrival airport as a three-letter IATA code, or several comma separated.

## `startDate` (type: `string`):

First day of the calendar.

## `endDate` (type: `string`):

Last day of the calendar, at most 93 days after the first. Defaults to 30 days after it.

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

Leave at 0 for one-way fares. Set it for round-trip fares that return this many days after each departure.

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

Adult passengers. Prices are the total for everyone travelling.

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

Passengers aged 2 to 11.

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

Infants under 2 with their own seat.

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

Infants under 2 on an adult's lap. At most one per adult.

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

Travel class.

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

Most stops allowed.

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

Three-letter currency code for every price, such as USD, EUR or INR.

## Actor input object example

```json
{
  "origin": "JFK",
  "destination": "LAX",
  "startDate": "2026-12-01",
  "endDate": "2027-01-31",
  "tripLengthDays": 0,
  "adults": 1,
  "children": 0,
  "infantsInSeat": 0,
  "infantsOnLap": 0,
  "cabin": "economy",
  "stops": "any",
  "currency": "USD"
}
```

# Actor output Schema

## `dataset` (type: `string`):

All records scraped by this run

# 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",
    "startDate": "2026-12-01",
    "endDate": "2026-12-31"
};

// Run the Actor and wait for it to finish
const run = await client.actor("thenetaji/google-flights-price-calendar").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",
    "startDate": "2026-12-01",
    "endDate": "2026-12-31",
}

# Run the Actor and wait for it to finish
run = client.actor("thenetaji/google-flights-price-calendar").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",
  "startDate": "2026-12-01",
  "endDate": "2026-12-31"
}' |
apify call thenetaji/google-flights-price-calendar --silent --output-dataset

```

## MCP server setup

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

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/0I2kr2iZqiiZaHSRF/builds/efndKnXh2qyc3kb5Y/openapi.json
