# airBaltic Fare Calendar & Route Scraper (`rl1987/airbaltic-api-scraper`) Actor

Scrapes airBaltic's public API: a 12-month seasonal fare calendar (lowest cash fare + direct/connecting flag per month) and the full route map. No account, read-only.

- **URL**: https://apify.com/rl1987/airbaltic-api-scraper.md
- **Developed by:** [R.L.](https://apify.com/rl1987) (community)
- **Categories:**
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: 5.00 out of 5 stars

## Pricing

Pay per event + usage

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

## airBaltic Fare Calendar & Route Scraper ✈️

Scrape **airBaltic**'s flight data — a **12-month seasonal fare calendar** and the airline's full
**route map** — as clean, structured data. For any airBaltic route this scraper returns the **lowest
cash fare for each of the next 12 months** plus a **direct-vs-connecting flag per month**, so you can
see at a glance when a route is cheapest and when it flies direct. It talks directly to airBaltic's
public mobile API (reversed from the airBaltic Android app), so there's **no account, no login, and
no API key** — just pick an origin and run.

Great for fare-trend analysis, seasonal route research, travel-deal sites, and building airBaltic
route datasets.

### What you can scrape

- 📅 **Fare calendar** — for a route, the **lowest cash fare per month** across a rolling 12-month
  window, each month flagged **direct** or **connecting only**. Runs a single route, or fans out
  across **every destination served from an origin**.
- 🗺️ **Route map** — every served **origin → destination** pair with the origin's city, country and
  coordinates, and whether it's a genuine airBaltic origin (vs. a connecting airport).

### Key features

| Feature | Details |
|--------|---------|
| **Data source** | airBaltic mobile API (2e Systems fast-search) — the same feed the app uses |
| **Auth** | **None** — public read-only endpoints, no account, no API key |
| **Seasonality** | Per-month direct/connecting flag reveals when seasonal routes actually operate |
| **Coverage** | Whole airBaltic network; route map also includes connecting airports |
| **Export** | JSON, CSV, Excel, HTML, or via the Apify API |

### Input

Fare calendar for one route:

```json
{
  "mode": "fares",
  "origin": "RIX",
  "destination": "TFS",
  "proxyConfiguration": { "useApifyProxy": true }
}
```

Fare calendar fanned out across **all** destinations from Riga (leave `destination` empty):

```json
{ "mode": "fares", "origin": "RIX", "maxItems": 500 }
```

Route map (airBaltic origins only):

```json
{ "mode": "routes", "airBalticOnly": true }
```

| Field | Notes |
|-------|-------|
| `mode` | `fares` (default) or `routes` |
| `origin` | Origin IATA code (e.g. `RIX`). Required for fares; optional filter for routes |
| `destination` | Fares only. Empty = fan out across every destination from the origin |
| `airBalticOnly` | Routes only. Keep only genuine airBaltic origins |
| `language` | Label language: `EN`, `LV`, `LT`, `ET`, `DE`, `FI`, `RU` |
| `maxItems` | Cap rows (`0` = all) |
| `proxyConfiguration` | Apify Proxy (default) — recommended |

### Output

**Fare calendar** — one row per route/month:

```json
{
  "origin": "RIX", "origin_city": "Riga",
  "destination": "TFS", "destination_city": "Tenerife", "destination_country": "Spain",
  "month": "2026-09", "month_offset": 1,
  "lowest_fare": 275.99, "currency": "EUR",
  "has_direct": false
}
```

**Route map** — one row per served pair:

```json
{
  "origin": "RIX", "origin_city": "Riga", "origin_country": "Latvia",
  "origin_latitude": "56.92", "origin_longitude": "23.97",
  "is_airbaltic_origin": true,
  "destination": "VNO", "destination_city": "Vilnius", "destination_country": "Lithuania",
  "marks": ["FAST_SEARCH"], "labels": []
}
```

### Notes on the data

- **The fare calendar is monthly, not daily.** Each route returns 12 entries, one per month over a
  rolling 12-month window — `month` is `YYYY-MM`, `lowest_fare` is the cheapest cash fare that month
  (`null` = no service), and `has_direct` says whether a direct flight operates that month. Summer
  routes (e.g. Rhodes, Crete) show direct service only in the warmer months; winter-sun routes (e.g.
  Tenerife) show the inverse.
- **Fares are point-of-sale specific.** The public endpoint prices in **EUR**; `currency` is a label
  only, not a conversion.
- **The route map is wider than airBaltic's own network** — it includes connecting airports. Use
  `airBalticOnly` (routes mode) or the `is_airbaltic_origin` field to filter to genuine origins.

### Pricing

Pay-per-event, so you only pay for the data you pull:

- **$0.001 per fare-calendar row** (route × month)
- $0.0005 per route-map row

### FAQ

**Do I need an airBaltic account or API key?**
No. The actor uses airBaltic's public mobile endpoints — there's nothing to sign up for.

**Can I get exact per-day prices or book a flight?**
No. The public API exposes a monthly *lowest-fare* calendar, not per-day fares or booking. Day-level
pricing and booking live on airBaltic's web booking engine and are out of scope (read-only tool).

**Can I export to CSV or Excel?**
Yes — JSON, CSV, Excel, HTML, or straight from the Apify API and dataset.

### Disclaimer

This is an unofficial tool and is **not affiliated with, endorsed by, or sponsored by airBaltic**. It
returns read-only public data (no accounts, no bookings). All trademarks belong to their respective
owners; use the scraped data responsibly and in line with applicable terms and laws.

# Actor input Schema

## `mode` (type: `string`):

What to scrape. 'Fare calendar' returns the 12-month lowest-fare calendar per route; 'Route map' returns the served origin→destination network.

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

Origin airport IATA code, e.g. RIX. Required for fare calendar; optional filter for the route map.

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

FARE CALENDAR only. Destination IATA code, e.g. TFS. Leave empty to fan out the fare calendar across every destination served from the origin.

## `airBalticOnly` (type: `boolean`):

ROUTE MAP only. The route map includes connecting airports far beyond airBaltic's own network; enable this to keep only genuine airBaltic origins.

## `language` (type: `string`):

Language for localized labels (route map).

## `currency` (type: `string`):

Currency label stamped on fare rows. The public fare endpoint prices in EUR and does not honour an override — this is a label only.

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

Cap the number of rows returned (0 = all).

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

Route requests through a proxy (recommended). Defaults to Apify Proxy.

## Actor input object example

```json
{
  "mode": "fares",
  "origin": "RIX",
  "airBalticOnly": false,
  "language": "EN",
  "currency": "EUR",
  "maxItems": 500,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# 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": "RIX",
    "destination": "",
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("rl1987/airbaltic-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": "RIX",
    "destination": "",
    "proxyConfiguration": { "useApifyProxy": True },
}

# Run the Actor and wait for it to finish
run = client.actor("rl1987/airbaltic-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": "RIX",
  "destination": "",
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}' |
apify call rl1987/airbaltic-api-scraper --silent --output-dataset

```

## MCP server setup

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