# Cheapflights Flight Prices Scraper – Fares & Routes (`boring_internet_explorer/cheapflights-scraper`) Actor

Scrape Cheapflights flight prices for any origins and destinations: one-way or round trip, any cabin, flexible dates and passengers. Returns airlines, stops, durations, per-leg flight details and every booking option with provider and price.

- **URL**: https://apify.com/boring_internet_explorer/cheapflights-scraper.md
- **Developed by:** [Boring Internet Explorer](https://apify.com/boring_internet_explorer) (community)
- **Security:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.50 / 1,000 results

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.
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

## ✈️ Cheapflights Flight Prices Scraper — Flights Worldwide

### ❓ What is this scraper?

This scraper extracts flight offers from **Cheapflights** (cheapflights.com), the flight search engine that compares fares from hundreds of airlines and travel agencies. It works for any route in the world.

Enter one or more origins and one or more destinations and the scraper searches every origin and destination pair separately, saving up to the number of flights you choose for each pair. Prices are returned in US dollars.

The extracted data is normalized into a structured format, making it easy to use for analysis, integrations, or storage.

***

### ⚡ Why this scraper?

- ✈️ **Many routes in one run** – list several origins and several destinations and get every combination
- 🎯 **Dedicated flight inputs** – trip type, dates, flexible dates, cabin, passengers, stops and sort order
- 🔢 **A limit per search** – `maxItems` applies to each origin and destination pair, so one busy route cannot use up the others
- 🧾 **Full itinerary detail** – every leg, flight number, airline, aircraft, layover and duration
- 💰 **Every booking option** – the provider, price and booking link for each flight
- 🌍 **Place names or codes** – type `JFK`, `JFK,EWR`, `NYC` or `Dubai`

Perfect for:

- Fare monitoring and price tracking dashboards
- Travel agencies comparing routes and providers
- Airline and OTA competitive pricing analysis
- Travel startups and deal sites
- Market research on air routes worldwide

***

### 🔎 Supported searches

| Search                        | Example input                                                                 |
| ----------------------------- | ----------------------------------------------------------------------------- |
| One-way                       | `"tripType": "oneway"`, `"departureDate": "2026-11-10"`                       |
| Round trip                    | `"departureDate": "2026-11-10"`, `"returnDate": "2026-11-17"`                 |
| Many routes                   | `"origins": ["DXB", "LHR"]`, `"destinations": ["JFK", "PAR"]` runs 4 searches |
| Several airports as one place | `"origins": ["JFK,EWR"]`                                                      |
| City names                    | `"origins": ["Dubai"]`, `"destinations": ["london"]`                          |
| Flexible dates                | `"flexibleDates": "plusminusthree"`                                           |
| Cabin and stops               | `"cabin": "business"`, `"stops": "nonstop"`                                   |

***

### 📥 Input

| Field                   | Type    | Default     | Description                                                                               |
| ----------------------- | ------- | ----------- | ----------------------------------------------------------------------------------------- |
| `origins`               | array   | `["JFK"]`   | Departure airports or cities (IATA code, comma-separated airports, or a place name)       |
| `destinations`          | array   | `["LON"]`   | Arrival airports or cities, same formats as origins                                       |
| `tripType`              | string  | `roundtrip` | `roundtrip` or `oneway`                                                                   |
| `departureDate`         | string  | `30 days`   | Departure date: `YYYY-MM-DD` or days from today (`14 days`, `2 weeks`), within one year   |
| `returnDate`            | string  | `37 days`   | Return date for round trips, same formats as departure date                               |
| `flexibleDates`         | string  | `exact`     | `exact`, `plusminusone`, `plusminustwo`, `plusminusthree`                                 |
| `cabin`                 | string  | `economy`   | `economy`, `premiumEconomy`, `business`, `first`                                          |
| `adults`                | integer | `1`         | Adults, 1-9                                                                               |
| `children`              | integer | `0`         | Children aged 2-11                                                                        |
| `infantsInSeat`         | integer | `0`         | Infants with their own seat                                                               |
| `infantsOnLap`          | integer | `0`         | Infants on an adult's lap (at most one per adult)                                         |
| `stops`                 | string  | `any`       | `any`, `nonstop`, `upTo1`, `upTo2`                                                        |
| `sortBy`                | string  | `best`      | `best`, `cheapest`, `quickest`, `earliestDeparture`, `latestDeparture`, `earliestArrival` |
| `includeBookingOptions` | boolean | `true`      | Add every provider and price for each flight                                              |
| `maxItems`              | integer | `5`         | Maximum flights saved **per origin and destination pair**                                 |
| `proxyConfiguration`    | object  | no proxy    | Proxy settings                                                                            |

Example:

```json
{
  "origins": ["JFK", "EWR"],
  "destinations": ["LON", "PAR"],
  "tripType": "roundtrip",
  "departureDate": "2026-11-10",
  "returnDate": "2026-11-17",
  "cabin": "economy",
  "adults": 1,
  "sortBy": "cheapest",
  "maxItems": 5,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

***

### 📤 Output

Each flight is stored as one record in the default dataset:

```json
{
  "scrapedAt": "2026-10-10T13:51:34.519Z",
  "url": "https://www.cheapflights.com/flight-search/JFK-LON/2026-11-10/2026-11-17/f9be80f73a33b9c7583d08aa0ede8ff2d?viewRank=2",
  "title": "JFK → STN · Aer Lingus, Ryanair · 1 stop · 10h 15m",
  "price": 683,
  "currency": "USD",
  "country": "United States",
  "market": "us",
  "searchUrl": "https://www.cheapflights.com/flight-search/JFK-LON/2026-11-10/2026-11-17?sort=bestflight_a",
  "origin": "JFK",
  "destination": "LON",
  "tripType": "roundtrip",
  "departureDate": "2026-11-10",
  "returnDate": "2026-11-17",
  "cabin": "economy",
  "adults": 1,
  "children": 0,
  "infantsInSeat": 0,
  "infantsOnLap": 0,
  "rank": 2,
  "resultId": "9be80f73a33b9c7583d08aa0ede8ff2d",
  "isBest": false,
  "isCheapest": true,
  "isCheapestDirect": false,
  "priceMode": "per-person",
  "provider": "Mytrip",
  "maxStops": 1,
  "totalDurationMinutes": 1369,
  "airlines": ["Aer Lingus", "Ryanair"],
  "legs": [
    {
      "origin": "JFK",
      "destination": "STN",
      "departure": "2026-11-10T17:00:00",
      "arrival": "2026-11-11T08:15:00",
      "durationMinutes": 615,
      "stops": 1,
      "airlines": ["Aer Lingus", "Ryanair"],
      "segments": [
        {
          "airline": "Aer Lingus",
          "airlineCode": "EI",
          "flightNumber": "EI104",
          "origin": "JFK",
          "destination": "DUB",
          "departure": "2026-11-10T17:00:00",
          "arrival": "2026-11-11T04:30:00",
          "durationMinutes": 390,
          "aircraft": "Airbus A330-300",
          "layoverMinutes": 145
        },
        {
          "airline": "Ryanair",
          "airlineCode": "FR",
          "flightNumber": "FR204",
          "origin": "DUB",
          "destination": "STN",
          "departure": "2026-11-11T06:55:00",
          "arrival": "2026-11-11T08:15:00",
          "durationMinutes": 80,
          "aircraft": "Boeing 737-800 (winglets)",
          "layoverMinutes": null
        }
      ]
    },
    {
      "origin": "STN",
      "destination": "JFK",
      "departure": "2026-11-17T08:55:00",
      "arrival": "2026-11-17T16:29:00",
      "durationMinutes": 754,
      "stops": 1,
      "airlines": ["Ryanair", "Aer Lingus"],
      "segments": [
        {
          "airline": "Ryanair",
          "airlineCode": "FR",
          "flightNumber": "FR203",
          "origin": "STN",
          "destination": "DUB",
          "departure": "2026-11-17T08:55:00",
          "arrival": "2026-11-17T10:15:00",
          "durationMinutes": 80,
          "aircraft": "Boeing 737 MAX 8",
          "layoverMinutes": 205
        },
        {
          "airline": "Aer Lingus",
          "airlineCode": "EI",
          "flightNumber": "EI109",
          "origin": "DUB",
          "destination": "JFK",
          "departure": "2026-11-17T13:40:00",
          "arrival": "2026-11-17T16:29:00",
          "durationMinutes": 469,
          "aircraft": "Airbus A321neo",
          "layoverMinutes": null
        }
      ]
    }
  ],
  "totalBookingOptions": 2,
  "bookingOptions": [
    {
      "provider": "Mytrip",
      "providerCode": "AIRTICKETS24DOTCOMVI",
      "price": 683,
      "currency": "USD",
      "bookingUrl": "https://www.cheapflights.com/book/flight?code=vTHCQhNHVP.eNCwACMVOeJpd4CyPwn0EI6M4XD8KcmF.68297.9be80f73a33b9c7583d08aa0ede8ff2d&h=bcc0bad919bf&sub=F-5789873659857917917E0b686c19448&viewId=5539df27-5b4e-4b8a-ae33-6061e3cb8d40&viewRank=2"
    }
  ]
}
```

#### Field reference

| Field                                                 | Type    | Description                                                                 |
| ----------------------------------------------------- | ------- | --------------------------------------------------------------------------- |
| `scrapedAt`                                           | string  | ISO 8601 timestamp                                                          |
| `url`                                                 | string  | Link to this flight on Cheapflights                                         |
| `title`                                               | string  | Route, airlines, stops and outbound duration                                |
| `price`                                               | number  | Lowest price among the booking options, per person                          |
| `currency`                                            | string  | Currency code (USD)                                                         |
| `country`, `market`                                   | string  | Cheapflights market (United States, us)                                     |
| `searchUrl`                                           | string  | Cheapflights search page for this search                                    |
| `origin`, `destination`                               | string  | Airport or city codes searched                                              |
| `tripType`, `departureDate`, `returnDate`, `cabin`    | string  | Search settings used                                                        |
| `adults`, `children`, `infantsInSeat`, `infantsOnLap` | number  | Travelers searched                                                          |
| `rank`                                                | number  | Position in the results for the chosen sort order                           |
| `resultId`                                            | string  | Cheapflights result id                                                      |
| `isBest`, `isCheapest`, `isCheapestDirect`            | boolean | Cheapflights result badges                                                  |
| `priceMode`                                           | string  | Whether prices are per person                                               |
| `provider`                                            | string  | Provider with the lowest price                                              |
| `maxStops`                                            | number  | Most stops in any direction                                                 |
| `totalDurationMinutes`                                | number  | Travel time of all legs combined                                            |
| `airlines`                                            | array   | Airlines on the itinerary                                                   |
| `legs`                                                | array   | One entry per direction, with flight segments, times, aircraft and layovers |
| `totalBookingOptions`                                 | number  | Number of booking options Cheapflights lists                                |
| `bookingOptions`                                      | array   | Provider, price and booking link per option (null when turned off)          |

***

### ❓ FAQ

**How is `maxItems` applied?**
Separately to every origin and destination pair. Two origins and three destinations with `maxItems: 20` can return up to 120 flights.

**Can I use city names?**
Yes. Use an airport code (`JFK`), a city code (`NYC`), several airports separated by commas (`JFK,EWR`) or a name like `Dubai`. Names that cannot be found are skipped with a warning and the other searches continue.

**Which currency are prices in?**
US dollars. Prices are per person.

**How far ahead can I search?**
Cheapflights only shows trips that start and finish within one year of today. Searches outside that range are skipped with a warning.

**What if a route has fewer flights than `maxItems`?**
You get every flight available for it.

**Do I need a proxy?**
Not by default. If your runs are blocked, enable a residential proxy in the proxy settings.

***

### 🔗 Want more data?

Related flight scrapers from the same author:

- [Cheapflightsfares Flights Scraper](https://apify.com/boring_internet_explorer/cheapflightsfares-scraper)
- [Wego Flights Scraper](https://apify.com/boring_internet_explorer/wego-flights-scraper)
- [Wingie Flights Scraper](https://apify.com/boring_internet_explorer/wingie-scraper)
- [Almosafer Flights Scraper](https://apify.com/boring_internet_explorer/almosafer-flights-scraper)
- [Rehlat Flights Scraper](https://apify.com/boring_internet_explorer/rehlat-flights-scraper)

### 🛠️ Need a custom scraper?

Need this scraper adapted to your use case — extra fields, additional filters, a different output format, or a new website? Reach out at boringinternetexplorer@gmail.com and we'll make it happen.

# Actor input Schema

## `origins` (type: `array`):

Departure airports or cities. Use IATA codes (JFK, NYC), several airports in one entry separated by commas (JFK,EWR), or a place name (Dubai).

## `destinations` (type: `array`):

Arrival airports or cities, in the same formats as origins. Each origin is searched against each destination.

## `tripType` (type: `string`):

Round trip needs a return date.

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

Pick a date, or enter days from today (e.g. "14 days", "2 weeks"). Must be within one year.

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

Pick a date, or enter days from today (e.g. "21 days"). Used for round trips; ignored for one-way searches.

## `flexibleDates` (type: `string`):

Also include flights on nearby days.

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

Cabin class to search.

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

Travelers aged 18 and over (1-9).

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

Children aged 2 to 11 (age 8 is used for pricing).

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

Infants under 2 who get their own seat.

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

Infants under 2 travelling on an adult's lap (at most one per adult).

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

Limit results by number of stops.

## `sortBy` (type: `string`):

Order in which results are returned.

## `includeBookingOptions` (type: `boolean`):

Add every provider and price offered for each flight. Turn off for smaller output.

## `maxItems` (type: `integer`):

Maximum number of flights saved for each origin and destination pair.

## `proxyConfiguration` (type: `object`):

Your proxy configuration from Apify

## Actor input object example

```json
{
  "origins": [
    "JFK"
  ],
  "destinations": [
    "LON"
  ],
  "tripType": "roundtrip",
  "departureDate": "30 days",
  "returnDate": "37 days",
  "flexibleDates": "exact",
  "cabin": "economy",
  "adults": 1,
  "children": 0,
  "infantsInSeat": 0,
  "infantsOnLap": 0,
  "stops": "any",
  "sortBy": "best",
  "includeBookingOptions": true,
  "maxItems": 5,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

## `overview` (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 = {
    "origins": [
        "JFK"
    ],
    "destinations": [
        "LON"
    ],
    "departureDate": "30 days",
    "returnDate": "37 days"
};

// Run the Actor and wait for it to finish
const run = await client.actor("boring_internet_explorer/cheapflights-scraper").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 = {
    "origins": ["JFK"],
    "destinations": ["LON"],
    "departureDate": "30 days",
    "returnDate": "37 days",
}

# Run the Actor and wait for it to finish
run = client.actor("boring_internet_explorer/cheapflights-scraper").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 '{
  "origins": [
    "JFK"
  ],
  "destinations": [
    "LON"
  ],
  "departureDate": "30 days",
  "returnDate": "37 days"
}' |
apify call boring_internet_explorer/cheapflights-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,boring_internet_explorer/cheapflights-scraper"
        }
    }
}
```

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/8kOxtvrsVVQahO6Mk/builds/LvZq5x5SYf7MPvLNx/openapi.json
