# Find the cheapest day to fly London to New York

**Use case:** 

Prices a one-week round trip from London to New York for every departure day in a two-week window starting three weeks from today. Sort by price to see which day is cheapest, with the airline, times, stops and layovers for each fare. The dates move with the calendar, so the task never goes stale. It stops at $0.50.

## Input

```json
{
  "tripType": "round-trip",
  "origins": [
    "LON"
  ],
  "destinations": [
    "NYC"
  ],
  "departureDates": [
    "+21",
    "+22",
    "+23",
    "+24",
    "+25",
    "+26",
    "+27",
    "+28",
    "+29",
    "+30",
    "+31",
    "+32",
    "+33",
    "+34"
  ],
  "tripLengthNights": [
    7
  ],
  "adults": 1,
  "children": 0,
  "infantsInSeat": 0,
  "infantsOnLap": 0,
  "cabinClass": "economy",
  "maxStops": "any",
  "alliance": "any",
  "currency": "USD",
  "dryRun": false,
  "maxResults": 500,
  "maxCostUsd": 0.5,
  "searchOrder": "route-then-date",
  "requestDelayMs": 1000,
  "proxy": {
    "useApifyProxy": true
  },
  "proxyTier": "datacenter",
  "maxConcurrency": 4,
  "maxRequestRetries": 4,
  "requestTimeoutSecs": 30,
  "debug": false
}
```

## Output

```json
{
  "price": {
    "label": "Price",
    "format": "number"
  },
  "currency": {
    "label": "Currency",
    "format": "string"
  },
  "origin": {
    "label": "From",
    "format": "string"
  },
  "destination": {
    "label": "To",
    "format": "string"
  },
  "airline": {
    "label": "Airline",
    "format": "string"
  },
  "stops": {
    "label": "Stops",
    "format": "integer"
  },
  "departureTime": {
    "label": "Departs",
    "format": "string"
  },
  "arrivalTime": {
    "label": "Arrives",
    "format": "string"
  },
  "durationMinutes": {
    "label": "Duration (min)",
    "format": "integer"
  },
  "cabinClass": {
    "label": "Cabin",
    "format": "string"
  },
  "priceBasis": {
    "label": "Price covers",
    "format": "string"
  },
  "searchUrl": {
    "label": "Google Flights search",
    "format": "string"
  }
}
```

## About this Actor

This example demonstrates how to use [Google Flights Scraper: Failed Runs Cost Nothing](https://apify.com/montyburrows/google-flights.md) with a specific input configuration. Visit the [Actor detail page](https://apify.com/montyburrows/google-flights.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/montyburrows/google-flights.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`).
