# Flight Award & Itinerary Scraper – Miles, Taxes & Cabins (`igolaizola/flight-award-scraper`) Actor

Scrape airline award flights and detailed itineraries across multiple loyalty programs. Get miles required, taxes, cabins, routes and remaining seats in clean JSON for analytics, travel hacking, pricing tools or dashboards.

- **URL**: https://apify.com/igolaizola/flight-award-scraper.md
- **Developed by:** [Iñigo Garcia Olaizola](https://apify.com/igolaizola) (community)
- **Categories:** Travel, Automation, Integrations
- **Stats:** 265 total users, 32 monthly users, 99.9% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.00 / 1,000 results

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/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## Flight Award & Itinerary Scraper – Miles, Taxes & Cabins

Scrape award flight availability from multiple loyalty programs and airlines: mileage cost, taxes/fees, **cabin availability** (economy, premium, business, first), **full itineraries**, and segment-level route metadata — ready for analytics, dashboards, or travel-hacking tools.

> ⚠️ **Date limit:** searches more than **60 days in advance** are **not supported**.\
> Only departure dates within the next 60 days will return results.

### ✈️ What does Flight Award Scraper do?

This actor searches award flights and saves the results to an Apify dataset (JSON/CSV, API-ready). You can:

- Search by **origin and destination** (airport or city IATA codes)
- Limit to specific **dates or date ranges** (within the next 60 days)
- Filter by **cabin class** (economy, premium, business, first)
- Restrict to specific **loyalty program issuers** (e.g. Flying Blue, AAdvantage, MileagePlus)
- **Sort results** by preferred cabin
- Control output size with `maxItems`
- Get **rich itineraries** including connections, aircraft types, flight numbers, and segment-level cabins

Typical use cases:

- 🕵️ Detect award “sweet spots” for miles & points redemptions
- 📊 Build internal award search tools for agencies, OTAs, or mileage brokers
- 🧮 Compare mileage vs. cash prices in your own pricing pipeline
- 🗺️ Analyze routes, cabins, and carriers used by different loyalty programs

### 🚀 How to use

1. Add the actor to your Apify account.
2. Set your **search filters**: `origins`, `destinations`, `startDate` / `endDate`, `cabin`, `issuers`.
3. Optionally adjust `sortBy` and `maxItems`.
4. Run the actor.
5. Fetch results from the **Dataset** tab (JSON, CSV, Excel, or via API).

💡 At least one of `origins` or `destinations` must be provided.\
You can leave the other empty to search “from anywhere” or “to anywhere”.

### 📝 Input parameters

Supply inputs as JSON. All fields are optional, but you must specify at least one of `origins` or `destinations`.

> 🔎 **Date window:** only departure dates within the **next 60 days** are supported.\
> If you set `startDate` / `endDate` beyond this window, you will not get results.

| Parameter      | Type / Options                                          | Default    | Description                                                                                                                      |
| -------------- | ------------------------------------------------------- | ---------- | -------------------------------------------------------------------------------------------------------------------------------- |
| `maxItems`     | integer (>= 1)                                          | `100`      | Maximum number of items (award results) to save to the dataset.                                                                  |
| `sortBy`       | `""`, `"economy"`, `"premium"`, `"business"`, `"first"` | `""`       | Sort criteria for the search results. Leave empty for default ordering from the source; choose a cabin to prioritize that cabin. |
| `origins`      | array\<string> (airport or city **IATA** codes)        | `["JFK"]`  | Origin airports/cities (e.g. `["JFK", "LAX"]`). Leave empty to search from **any origin**.                                       |
| `destinations` | array\<string> (airport or city **IATA** codes)        | `["LHR"]`  | Destination airports/cities (e.g. `["LHR", "CDG"]`). Leave empty to search to **any destination**.                               |
| `startDate`    | string `YYYY-MM-DD`                                     |            | Start date of the search (must be within the next 60 days). Leave empty to search all supported dates.                           |
| `endDate`      | string `YYYY-MM-DD`                                     |            | End date of the search (must be within the next 60 days). Leave empty to search all supported dates.                             |
| `cabin`        | `""`, `"economy"`, `"premium"`, `"business"`, `"first"` | `""` (Any) | Filter by cabin class. Empty means **any cabin**.                                                                                |
| `issuers`      | array\<string>                                         |            | Loyalty program issuers to query. Leave empty to search **all issuers**. See supported values below.                             |

Supported `issuers` include:

`"aeromexico"`, `"aeroplan"`, `"alaska"`, `"american"`, `"azul"`, `"copa"`, `"delta"`, `"emirates"`, `"ethiopian"`, `"etihad"`, `"eurobonus"`,\
`"finnair"`, `"flyingblue"`, `"jetblue"`, `"lufthansa"`, `"qantas"`, `"qatar"`, `"saudia"`, `"singapore"`, `"smiles"`, `"turkish"`, `"united"`, `"velocity"`, `"virginatlantic"`.

### 🔧 Examples

#### 1) One-way route: JFK → LHR, all cabins, any issuer

```json
{
  "maxItems": 50,
  "origins": ["JFK"],
  "destinations": ["LHR"],
  "startDate": "2025-01-05",
  "endDate": "2025-01-10",
  "cabin": "",
  "issuers": [],
  "sortBy": ""
}
```

#### 2) Business-class focus with selected issuers

```json
{
  "maxItems": 100,
  "origins": ["LAX"],
  "destinations": ["NRT", "HND"],
  "startDate": "2025-01-10",
  "endDate": "2025-01-20",
  "cabin": "business",
  "issuers": ["american", "alaska", "qantas"],
  "sortBy": "business"
}
```

#### 3) Any origin → LHR in premium economy with Flying Blue

```json
{
  "maxItems": 30,
  "origins": [],
  "destinations": ["LHR"],
  "cabin": "premium",
  "issuers": ["flyingblue"]
}
```

### 📊 Output

Each dataset item represents **award availability for a route + date + issuer**, including cabins and detailed itineraries.

Route-level fields:

- `date` – travel date
- `origin`, `destination` – IATA codes
- `originName`, `destinationName` – airport names
- `issuer`, `issuerName` – loyalty program used
- `distance` – route distance in miles
- `coordinates.origin`, `coordinates.destination` – lat/lon of airports

Cabin availability for the route:

- `cabins[]`:

  - `name` – `"economy"`, `"premium"`, `"business"`, `"first"`
  - `available` – boolean
  - `mileage` – miles (or points) required
  - `taxes` – taxes & surcharges (often in minor currency units)
  - `airlines[]` – carriers operating the itinerary
  - `direct` – whether a non-stop option exists

Itinerary-level details:

- `itineraries[]`:

  - `origin`, `destination`, `originName`, `destinationName`
  - `departure`, `arrival` (ISO timestamps)
  - `totalDuration`, `stops`, `connections[]`
  - `airlines[]` – marketing/operating carriers
  - `aircrafts[]` – aircraft types (e.g. `"Boeing 787-9"`)
  - `flightNumbers[]`
  - `cabins[]` – per-itinerary `name`, `mileageCost`, `totalTaxes`, `remainingSeats`
  - `segments[]` – per-segment:

    - `flightNumber`, `distance`, `duration`, `fareClass`
    - `aircraftName`, `aircraftCode`
    - `origin`, `destination`, names
    - `departure`, `arrival`
    - `cabin` – actual cabin booked on the segment

Example (shortened):

```json
{
  "date": "2025-12-03",
  "origin": "JFK",
  "destination": "LHR",
  "issuer": "flyingblue",
  "issuerName": "Air France/KLM Flying Blue",
  "cabins": [
    {
      "name": "economy",
      "available": true,
      "mileage": 18750,
      "taxes": 13440,
      "airlines": [{ "code": "KL", "name": "KLM" }],
      "direct": false
    }
  ],
  "itineraries": [
    {
      "origin": "JFK",
      "destination": "LHR",
      "departure": "2025-12-03T17:45:00Z",
      "arrival": "2025-12-04T09:00:00Z",
      "stops": 1,
      "connections": ["AMS"],
      "aircrafts": ["Boeing 787-10", "Airbus A321neo"],
      "flightNumbers": ["KL642", "KL1003"],
      "cabins": [
        {
          "name": "economy",
          "mileageCost": 18750,
          "totalTaxes": 13440,
          "remainingSeats": 9
        }
      ]
    }
  ]
}
```

Use this data to:

- Power custom award search UIs
- Feed BI tools and warehouses
- Run mileage arbitrage and route-optimization analyses

### ✅ Best practices

- Keep `maxItems` reasonable to avoid unnecessary over-fetching.
- Use `cabin` and `issuers` filters to narrow results to your real use case.
- Respect the **60-day limit** when setting `startDate` / `endDate`.
- Store results in a dedicated dataset and sync them regularly via the Apify API.
- Apify **Residential** proxies are recommended for stable and reliable scraping.

### 💳 Pricing

Apify’s Free plan includes monthly credits for small tests.
For production award-search workloads or scheduled scans, consider the Personal or Business plans. See [Apify Pricing](https://apify.com/pricing) for details.

### 📥 Integrations

- Pull results via Apify's REST API or official SDKs (Node.js, Python, etc.).
- Export as **JSON, CSV, or Excel**, or connect via Make/Zapier/webhooks.
- Schedule recurring runs to keep your award inventory and itineraries fresh.

### 🆘 Support

Need help, more issuers, or extra fields?
Open an issue on the actor page or contact me at [t.me/igolaizola](https://t.me/igolaizola).

Happy mileage hunting! 🛫💺

### ⚖️ Legal & Ethics

Award search pages and loyalty programs may be protected by Terms of Service, IP rights, and data-privacy laws. Use this actor responsibly:

- Review and comply with the terms of the websites and programs you query.
- Respect technical and rate limits; avoid disruptive traffic patterns.
- Do not collect or process personal data unless you have a lawful basis.
- Ensure your use complies with applicable laws and your organization’s policies.

### 📜 Disclaimer

This actor is an independent tool and is **not affiliated with, endorsed by, or sponsored by any airline, alliance, or loyalty program**. All trademarks and brand names belong to their respective owners.

# Actor input Schema

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

Maximum number of items to scrape

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

Criteria to sort the search results

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

IATA codes of the origin airport or city codes (leave empty to search all origins). At least one of origin or destination must be provided.

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

IATA codes of the destination airport or city codes (leave empty to search all destinations). At least one of origin or destination must be provided.

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

Start date of the search (YYYY-MM-DD)

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

End date of the search (YYYY-MM-DD)

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

Cabin class for the search

## `issuers` (type: `array`):

Loyalty program issuers to search (leave empty to search all issuers)

## Actor input object example

```json
{
  "maxItems": 100,
  "sortBy": "",
  "origins": [
    "JFK"
  ],
  "destinations": [
    "LHR"
  ],
  "cabin": ""
}
```

# Actor output Schema

## `results` (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": [
        "LHR"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("igolaizola/flight-award-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": ["LHR"],
}

# Run the Actor and wait for it to finish
run = client.actor("igolaizola/flight-award-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).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": [
    "LHR"
  ]
}' |
apify call igolaizola/flight-award-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=igolaizola/flight-award-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/D18i0QVODnu9aGVPN/builds/wdggUtH0fHGjLqybU/openapi.json
