# Find the cheapest days to fly on any route (Google Flights)

**Use case:** 

Prices every departure date over the next 60 days on Google Flights and returns the cheapest fare of each day, with the airline, flight numbers, stops, duration and Google's price level, plus a flag on the cheapest date. Round trips keep the same trip length. Swap in your own route, trip length, currency and country, or schedule it to watch a route.

## Input

```json
{
  "origin": "NYC",
  "destination": "LON",
  "departureDate": "+14",
  "returnDate": "+7",
  "adults": 1,
  "children": 0,
  "infantsInSeat": 0,
  "infantsOnLap": 0,
  "cabinClass": "economy",
  "maxStops": "any",
  "sortBy": "best",
  "maxResultsPerSearch": 30,
  "returnFlightsForTop": 0,
  "cheapestDatesDays": 60,
  "currency": "USD",
  "country": "US"
}
```

## Output

```json
{
  "rowType": {
    "label": "Row type: flight, return_flight or cheapest_date",
    "format": "string"
  },
  "departureDate": {
    "label": "Departure date searched",
    "format": "string"
  },
  "returnDate": {
    "label": "Return date searched (round trips)",
    "format": "string"
  },
  "price": {
    "label": "Price (total for all passengers)",
    "format": "number"
  },
  "currency": {
    "label": "Currency of the price",
    "format": "string"
  },
  "airlines": {
    "label": "Airlines",
    "format": "array"
  },
  "flightNumbers": {
    "label": "Flight numbers",
    "format": "array"
  },
  "departureTime": {
    "label": "Departure, local time",
    "format": "string"
  },
  "arrivalTime": {
    "label": "Arrival, local time",
    "format": "string"
  },
  "duration": {
    "label": "Total duration",
    "format": "string"
  },
  "stops": {
    "label": "Stops",
    "format": "number"
  },
  "layoverAirports": {
    "label": "Layover airports",
    "format": "array"
  },
  "priceLevel": {
    "label": "Google's price insight: low, typical or high",
    "format": "string"
  },
  "googleFlightsUrl": {
    "label": "Google Flights link (booking options when the itinerary is complete)",
    "format": "string"
  }
}
```

## How it works

### 1. Sign up on Apify or log in

The Google Flights Scraper API ✈️ (flight prices, cheapest dates) Actor is ready to run with the inputs already set for "Find the cheapest days to fly on any route (Google Flights)". [Sign up or log in](https://console.apify.com/create-task-from-example/zhcHio7lmgrFpaDi1) and you'll land in Apify Console with a copy of this exact task.

### 2. Start the "Find the cheapest days to fly on any route (Google Flights)" task

The Google Flights Scraper API ✈️ (flight prices, cheapest dates) Actor will start running based on the input automatically. You can also change all the input fields, like from (airport or city code), to (airport or city code), and more, to match your specific use case.

### 3. Receive the "Find the cheapest days to fly on any route (Google Flights)" output

Monitor the progress in real time. You will be notified as soon as your dataset is complete and ready for review. Each result includes data such as row type: flight, return_flight or cheapest_date, departure date searched, return date searched (round trips), and more.

### 4. Integrate into your workflow

The final output is delivered in JSON, CSV, or Excel format, ready to be plugged into your workflow. You can also [run the "Find the cheapest days to fly on any route (Google Flights)" task via API](https://apify.com/tagadanar/google-flights-scraper.md).

## About this Actor

This example demonstrates how to use [Google Flights Scraper API ✈️ (flight prices, cheapest dates)](https://apify.com/tagadanar/google-flights-scraper.md) with a specific input configuration. Visit the [Actor detail page](https://apify.com/tagadanar/google-flights-scraper.md) to learn more, explore other use cases, and run it yourself.


## How to integrate an Actor?

This Task's input is already configured above. Use it as-is rather than inventing a new one.

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 full API examples (JavaScript, Python, CLI, MCP, OpenAPI), see this Task's Actor page: https://apify.com/tagadanar/google-flights-scraper.md

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`).
