# Find the cheapest flight dates between two cities

**Use case:** 

Get Hopper's whole-month cheapest-dates calendar and buy-now/wait price prediction for any route.

## Input

```json
{
  "origin": "JFK",
  "destination": "LAX",
  "departureDate": "30 days",
  "returnDate": "",
  "adults": 1,
  "children": 0,
  "includePrediction": true,
  "includeCalendar": true,
  "maxItems": 100,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

## Output

```json
{
  "type": {
    "label": "Record type",
    "format": "text"
  },
  "origin": {
    "label": "Origin",
    "format": "text"
  },
  "destination": {
    "label": "Destination",
    "format": "text"
  },
  "departure_date": {
    "label": "Departure date",
    "format": "text"
  },
  "return_date": {
    "label": "Return date",
    "format": "text"
  },
  "trip_type": {
    "label": "Trip type",
    "format": "text"
  },
  "price_total": {
    "label": "Price",
    "format": "number"
  },
  "price_display": {
    "label": "Price (display)",
    "format": "text"
  },
  "currency": {
    "label": "Currency",
    "format": "text"
  },
  "primary_carrier": {
    "label": "Primary airline",
    "format": "text"
  },
  "carrier_codes": {
    "label": "Airline codes",
    "format": "array"
  },
  "stops": {
    "label": "Stops",
    "format": "number"
  },
  "duration_minutes": {
    "label": "Duration (min)",
    "format": "number"
  },
  "layover_minutes": {
    "label": "Layover (min)",
    "format": "number"
  },
  "departure_time": {
    "label": "Departs",
    "format": "text"
  },
  "arrival_time": {
    "label": "Arrives",
    "format": "text"
  },
  "fare_brand": {
    "label": "Fare brand",
    "format": "text"
  },
  "labels": {
    "label": "Labels",
    "format": "array"
  },
  "is_cheapest": {
    "label": "Cheapest",
    "format": "boolean"
  },
  "segments": {
    "label": "Segments",
    "format": "array"
  },
  "fare_id": {
    "label": "Fare ID",
    "format": "text"
  },
  "slice_id": {
    "label": "Slice ID",
    "format": "text"
  },
  "prediction_recommendation": {
    "label": "Prediction",
    "format": "text"
  },
  "prediction_headline": {
    "label": "Prediction headline",
    "format": "text"
  },
  "calendar_date": {
    "label": "Calendar date",
    "format": "text"
  },
  "calendar_price_level": {
    "label": "Price level",
    "format": "text"
  },
  "prediction_body": {
    "label": "Prediction detail",
    "format": "text"
  },
  "prediction_dealness": {
    "label": "Dealness",
    "format": "text"
  },
  "prediction_lowest_price": {
    "label": "Lowest price",
    "format": "text"
  },
  "prediction_forecast_target_price": {
    "label": "Forecast target",
    "format": "text"
  }
}
```

## About this Actor

This example demonstrates how to use [Hopper Flight Search API scraper](https://apify.com/rl1987/hopper-api-scraper.md) with a specific input configuration. Visit the [Actor detail page](https://apify.com/rl1987/hopper-api-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/rl1987/hopper-api-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`).
