# Air Canada API Scraper (`rl1987/aircanada-api-scraper`) Actor

Scrapes Air Canada flight search with cash fares and fare families across cabins, a dated low-fare calendar, an optional seat layout and flight status, from the Air Canada mobile API. Read-only public travel data.

- **URL**: https://apify.com/rl1987/aircanada-api-scraper.md
- **Developed by:** [R.L.](https://apify.com/rl1987) (community)
- **Categories:** Travel
- **Stats:** 1 total users, 1 monthly users, 85.7% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.00 / 1,000 flight options

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#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

## Air Canada Flight Scraper ✈️ — cash fares, fare families across cabins, and a dated low-fare calendar

**Air Canada Flight Scraper** — Scrapes Air Canada flight search with cash fares and fare families across cabins, a dated low-fare calendar, an optional seat layout and flight status, straight from the Air Canada mobile API. Read-only public travel data. It reads Air Canada's own API directly, so it's **fast, reliable and complete** — no flaky HTML parsing, no headless browser. Export to **JSON, CSV, Excel, or an API**.

***

#### Optional extras

- **`includeCalendar`** — adds one record per date from Air Canada's low-fare calendar. Calendar
  rows are capped at half of `maxItems` so flight results always appear alongside them.
- **`includeSeatMap`** — a **secondary, nice-to-have** extra, off by default. It attaches the cabin
  seat **layout** (row, column, seat number). Air Canada's seat map carries **no per-seat price and
  no availability**, so this tells you the aircraft's seating grid, not what a seat costs or
  whether it is free. A seat-map failure never fails the run — the flight record is still emitted.

#### Timestamps

Departure and arrival times keep their **original UTC offsets** (e.g. `2026-09-24T07:00:00-04:00`),
so local times are unambiguous and no timezone is assumed on your behalf.

### ✨ Why use this Air Canada Flight Scraper?

- 🟢 **No code required** — set your input, click **Start**, download your data.
- ⚡ **Fast & accurate** — reads Air Canada's own private API and returns structured JSON, not scraped HTML.
- 🧾 **Rich, structured data** — every field below, clean and ready to use.
- 🎟️ **Fare families across cabins** — economy, premium economy and business cheapest fares on
  every itinerary, plus booking class and fare basis codes.
- 📅 **Dated low-fare calendar** — real dates with a full price breakdown (base fare, taxes,
  surcharges), not a guessed offset.
- 💸 **Transparent pay-per-result pricing** — pay only for the rows you get.
- 📤 **Export anywhere** — JSON, CSV, Excel, XML, or pull it live via the Apify API.

***

### 🎯 What can you do with Air Canada data?

- **Market & competitor research** — analyse Air Canada records at scale.
- **Price & availability monitoring** — track changes over time.
- **Data science & trend analysis** — build clean datasets.
- **Lead generation & enrichment** — feed Air Canada data into your own tools.

***

### 📥 What data does the Air Canada Flight Scraper extract?

Each row includes: `type`, `origin`, `destination`, `departure_date`, `departure_time`, `arrival_time`, `duration_minutes`, `stops`, `offer_type`, `flight_numbers`, `marketing_airline`, `operating_airline`, `aircraft`, `departure_terminal` …and more. See the full **Data table** below.

***

### 🚀 How to scrape Air Canada (3 steps)

1. **Set your input** — provide `origin` or `destination` (see the table below; defaults work out of the box).
2. **Pick options** — filters, a `proxyConfiguration`, and a `maxItems` cap.
3. **Run & export** — click **Start**, then download the dataset as JSON/CSV/Excel or fetch it via the API.

***

### ⚙️ Input

| Field | Type | Default | Description |
| --- | --- | --- | --- |
| `origin` | string | `YYZ` | Origin airport IATA code, e.g. YYZ. |
| `destination` | string | `YVR` | Destination airport IATA code, e.g. YVR. |
| `departureDate` | string | – | Outbound date. Pick a date or use a relative value like "30 days". Empty = 30 days from today. |
| `adults` | integer | `1` | Number of adult passengers. |
| `includeCalendar` | boolean | `false` | Also emit one record per date from Air Canada's dated low-fare calendar around your departure date. |
| `includeSeatMap` | boolean | `false` | Attach the cabin seat LAYOUT (rows, columns, seat numbers) to each flight. Note: Air Canada's seat map carries no per-seat price or availability. |
| `maxItems` | integer | `100` | 0 = all results. |
| `proxyConfiguration` | object | Apify Proxy | Route requests through a proxy (Apify Proxy by default). |

#### Example input

```jsonc
{
  "origin": "YYZ",
  "destination": "YVR",
  "adults": 1,
  "includeCalendar": false,
  "includeSeatMap": false,
  "maxItems": 100,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

***

### 📤 Output

Each result is a JSON object like this:

```jsonc
{
  "type": "flight",
  "origin": "YYZ",
  "destination": "YVR",
  "departure_date": "2026-09-24",
  "departure_time": "2026-09-24T07:00:00-04:00",
  "arrival_time": "2026-09-24T08:52:00-07:00",
  "duration_minutes": 292,
  "stops": 0,
  "offer_type": "NonStop",
  "flight_numbers": [
    "AC181"
  ],
  "marketing_airline": "AC",
  "operating_airline": "AC",
  "aircraft": "Boeing 787-9",
  "departure_terminal": "1",
  "arrival_terminal": "M",
  "has_wifi": false,
  "cheapest_fare_economy": 239,
  "cheapest_fare_premium_economy": 1380,
  "cheapest_fare_business": 2020,
  "cheapest_fare_first": null,
  "currency": "CAD",
  "fare_options": [
    {
      "cabin_code": "Y",
      "cheapest_fare": 239,
      "booking_class": "G",
      "fare_basis_code": "GU2NZCBA",
      "has_lie_flat_seats": false
    },
    {
      "cabin_code": "Y",
      "cheapest_fare": 239,
      "booking_class": "G",
      "fare_basis_code": "GU2NZCTG",
      "has_lie_flat_seats": false
    },
    "…+7 more"
  ],
  "is_cheapest": true,
  "ranking": 1,
  "segments": [
    {
      "origin": "YYZ",
      "destination": "YVR",
      "departure_time": "2026-09-24T07:00:00-04:00",
      "arrival_time": "2026-09-24T08:52:00-07:00",
      "departure_terminal": "1",
      "arrival_terminal": "M",
      "aircraft": "Boeing 787-9",
      "flight_number": "AC181",
      "has_wifi": false
    }
  ],
  "seat_map": null,
  "seat_count": null,
  "calendar_date": null,
  "calendar_total_fare": null,
  "calendar_base_fare": null,
  "calendar_taxes": null,
  "calendar_is_lowest": null
}
```

***

### 🧾 Data table

| Field | Type | Description |
| --- | --- | --- |
| `type` | text | Record type |
| `origin` | text | Origin |
| `destination` | text | Destination |
| `departure_date` | text | Departure date |
| `departure_time` | text | Departs |
| `arrival_time` | text | Arrives |
| `duration_minutes` | number | Duration (min) |
| `stops` | number | Stops |
| `offer_type` | text | Offer type |
| `flight_numbers` | array | Flight numbers |
| `marketing_airline` | text | Marketing airline |
| `operating_airline` | text | Operating airline |
| `aircraft` | text | Aircraft |
| `departure_terminal` | text | Dep terminal |
| `arrival_terminal` | text | Arr terminal |
| `has_wifi` | boolean | Wi-Fi |
| `cheapest_fare_economy` | number | Economy |
| `cheapest_fare_premium_economy` | number | Premium economy |
| `cheapest_fare_business` | number | Business |
| `cheapest_fare_first` | number | First |
| `currency` | text | Currency |
| `fare_options` | array | Fare options |
| `is_cheapest` | boolean | Cheapest |
| `ranking` | number | Ranking |
| `segments` | array | Segments |
| `seat_map` | array | Seat map |
| `seat_count` | number | Seats in map |
| `calendar_date` | text | Calendar date |
| `calendar_total_fare` | number | Calendar fare |
| `calendar_base_fare` | number | Calendar base fare |
| `calendar_taxes` | number | Calendar taxes |
| `calendar_is_lowest` | boolean | Lowest in window |

***

### 💰 Pricing — pay per result

This actor uses **pay-per-event** pricing: you pay only for the rows it delivers.

| You scrape | Price |
| --- | --- |
| **Flight option** | **$2.00 per 1,000 rows** |

***

### 🔌 Use the Air Canada Flight Scraper via API

Run it programmatically with the [Apify API](https://docs.apify.com/api/v2):

```bash
curl -X POST "https://api.apify.com/v2/acts/aircanada-api-scraper/runs?token=YOUR_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{
  "origin": "YYZ",
  "destination": "YVR",
  "adults": 1,
  "includeCalendar": false,
  "includeSeatMap": false,
  "maxItems": 100,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}'
```

Or with the Apify CLI: `apify call aircanada-api-scraper -i input.json -o`.

***

### ❓ FAQ

**Do I need an account or API key for Air Canada Flight?**

No. The actor talks to Air Canada's public/mobile API for you — you only need an Apify account.

**Do I need a proxy?**

A proxy is recommended for reliable runs; set `proxyConfiguration` (Residential is safest for geo-restricted or bot-protected sites).

**What export formats are supported?**

JSON, CSV, Excel, XML, JSONL, RSS, or live via the Apify API and dataset endpoints.

**Is scraping this legal?**

You are responsible for how you use the data. Scrape only public record data and comply with Air Canada's Terms and applicable law (e.g. GDPR/CCPA for personal data).

***

### 🛠️ How it works

The actor impersonates Air Canada's official app/site and calls its private API the same way the app does, then normalises each response into the flat record above. No browser, no HTML scraping — just clean, structured data.

***

### 📌 Good to know

- Scrape only public record data and respect Air Canada's Terms of Service and robots policy.
- For personal data, comply with GDPR/CCPA and applicable law — you are the data controller.
- Fields can be `null` when Air Canada doesn't expose them for a given record.

***

### ⭐ Found this useful?

Give the **Air Canada Flight Scraper** a star on Apify and check out my other `apify-*-api-scraper` actors.

# Actor input Schema

## `origin` (type: `string`):

Origin airport IATA code, e.g. YYZ.

## `destination` (type: `string`):

Destination airport IATA code, e.g. YVR.

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

Outbound date. Pick a date or use a relative value like "30 days". Empty = 30 days from today.

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

Number of adult passengers.

## `includeCalendar` (type: `boolean`):

Also emit one record per date from Air Canada's dated low-fare calendar around your departure date.

## `includeSeatMap` (type: `boolean`):

Attach the cabin seat LAYOUT (rows, columns, seat numbers) to each flight. Note: Air Canada's seat map carries no per-seat price or availability.

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

0 = all results.

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

Route requests through a proxy (Apify Proxy by default).

## Actor input object example

```json
{
  "origin": "YYZ",
  "destination": "YVR",
  "adults": 1,
  "includeCalendar": false,
  "includeSeatMap": false,
  "maxItems": 100,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

# 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 = {
    "origin": "YYZ",
    "destination": "YVR",
    "departureDate": "",
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ]
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("rl1987/aircanada-api-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 = {
    "origin": "YYZ",
    "destination": "YVR",
    "departureDate": "",
    "proxyConfiguration": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
    },
}

# Run the Actor and wait for it to finish
run = client.actor("rl1987/aircanada-api-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 '{
  "origin": "YYZ",
  "destination": "YVR",
  "departureDate": "",
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}' |
apify call rl1987/aircanada-api-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,rl1987/aircanada-api-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/CBLeeegtwfh9W9wNM/builds/2B7LlHgUIYO8nWWO0/openapi.json
