# Airline Reliability & Complaint Benchmark (`trovevault/airline-reliability-complaint-benchmark`) Actor

Rank U.S. airlines by on-time performance, cancellations, complaints, and mishandled baggage using the latest official DOT report.

- **URL**: https://apify.com/trovevault/airline-reliability-complaint-benchmark.md
- **Developed by:** [Trove Vault](https://apify.com/trovevault) (community)
- **Categories:**
- **Stats:** 2 total users, 1 monthly users, 75.0% runs succeeded, 1 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.85 / 1,000 airlines

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/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

## Airline Reliability & Complaint Benchmark

Compare airlines across the **United States, Brazil, and Australia** using the latest official reliability and consumer-reporting data. The Actor preserves each market's definitions, then converts local standing into a normalized cross-market score for international shortlists.

### Why use this Actor?

- Compare selected airlines from different countries in one run.
- Keep local market scores and ranks alongside normalized international standing.
- Detect deteriorating punctuality or cancellation performance early.
- Compare shortlisted carriers for procurement, partnerships, travel policy, or market analysis.
- Monitor official reports automatically while avoiding duplicate monthly snapshots.
- Keep country-specific definitions visible instead of treating unlike metrics as interchangeable.

### Market coverage

| Market | Operational reporting | Complaint reporting | Punctuality threshold |
| --- | --- | --- | --- |
| United States | Monthly marketing-carrier reliability and cancellations | Monthly DOT complaint cases and mishandled baggage | 15 minutes |
| Brazil | Monthly operations touching Brazil, aggregated by airline | Latest annual ANAC consumer complaint cases where the airline can be matched | 30 minutes |
| Australia | Monthly domestic and regional airline reliability | Not available in the current benchmark | 15 minutes |

`benchmarkScore` and `marketRank` are calculated within each market. In an All markets run, `crossMarketScore` converts local rank into a 0–100 percentile: 100 means market leader. This supports directional international comparison without treating different regulatory definitions as identical.

### Who is it for?

- **Travel and procurement teams:** shortlist carriers for policies and partnerships.
- **Aviation analysts:** track peer rankings and monthly changes.
- **Travel platforms:** enrich carrier comparison dashboards with official signals.

### Input

Choose **All markets** and select airlines from any country. Leave `airlines` empty to return the complete international cohort. A single-market option remains available for country-specific analysis.

```json
{
  "market": "all",
  "airlines": ["delta", "TAM", "qantas"],
  "runId": "carrier-review-2026-08"
}
```

#### Input fields

| Field | Required | Description |
| --- | --- | --- |
| `market` | No | `all`, `united_states`, `brazil`, or `australia`. Defaults to `all`. |
| `airlines` | No | Airline keys from the dropdown. Empty means the complete comparable cohort. |
| `reportUrl` | No | Official report URL for a single-market historical backfill. Not available with `all`. |
| `datasetId` | No | Existing Apify dataset to which the same rows should also be appended. |
| `runId` | No | Pipeline identifier copied into every output row. |

### Output

Each item represents one airline. Cross-market runs add global fields while retaining local evidence and definitions.

Example Australian row:

```json
{
  "crossMarketRank": 1,
  "crossMarketScore": 85.7,
  "marketRank": 2,
  "marketCohortSize": 8,
  "rank": 2,
  "airlineKey": "qantas",
  "airline": "Qantas",
  "market": "Australia",
  "countryCode": "AU",
  "reportDataMonth": "July 2026",
  "coverageTier": "OPERATIONS_ONLY",
  "punctualityThresholdMinutes": 15,
  "benchmarkScore": 65.3,
  "riskTier": "STABLE",
  "onTimeArrivalPercent": 82.1,
  "cancellationPercent": 1.6,
  "scheduledOperations": 7138,
  "cancelledOperations": 111,
  "complaintCases": null,
  "complaintPeriod": null,
  "scoredMetrics": ["on-time performance", "cancellations"],
  "changeStatus": "NEW",
  "weakestSignal": "cancellations",
  "recommendedAction": "Investigate schedule resilience, staffing, and recovery capacity."
}
```

#### Important output fields

- `crossMarketScore`: percentile of the airline's rank in its own market; 100 is market leader.
- `crossMarketRank`: order among returned airlines; equal normalized scores share a rank.
- `benchmarkScore`: composite peer score calculated only within the airline's market.
- `marketRank` and `marketCohortSize`: local standing and full peer-cohort size. `rank` remains an alias of `marketRank` for API compatibility.
- `riskTier`: `LEADER`, `STABLE`, `WATCH`, or `CRITICAL`.
- `scoredMetrics`: metrics that actually contributed to this airline's score.
- `coverageTier`: `FULL_REGULATORY`, `OPERATIONS_WITH_ANNUAL_COMPLAINTS`, or `OPERATIONS_ONLY`.
- `punctualityThresholdMinutes`: delay threshold used by the regulator for that market.
- `scoreChange` and `rankChange`: movement versus the previously saved report month.
- `changeStatus`: `NEW`, `IMPROVED`, `DECLINED`, or `STABLE`.
- `complaintPeriod`: period represented by complaint cases; it can differ from the operational month.
- `OUTPUT`: cross-market leaders, market summaries, freshness state, and methodology.
- `RUN_SUMMARY`: operational status suitable for monitoring and webhooks.

### Scoring methodology

Within each market, the Actor converts available metrics into peer percentiles and applies these target weights:

- on-time performance: **45%**;
- cancellation rate: **25%**;
- complaint proxy rate: **20%**, when a comparable rate is available;
- mishandled baggage rate: **10%**, when available.

Weights are redistributed across available metrics. Brazilian annual complaints remain informational because they cover a different period.

Higher punctuality is better. Lower cancellations, complaint rates, and baggage rates are better. For international runs, `crossMarketScore = 100 × (cohort size − market rank) ÷ (cohort size − 1)`. Use it for relative standing, then inspect raw metrics, thresholds, and coverage before making a decision.

### Run with the Apify API

Replace `YOUR_APIFY_TOKEN` with your token:

```bash
curl -X POST \
  "https://api.apify.com/v2/acts/trovevault~airline-reliability-complaint-benchmark/runs?waitForFinish=300" \
  -H "Authorization: Bearer YOUR_APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"market":"all","airlines":["delta","TAM","qantas"]}'
```

Fetch dataset rows using the `defaultDatasetId` returned by the run:

```bash
curl \
  "https://api.apify.com/v2/datasets/DATASET_ID/items?clean=true&format=json" \
  -H "Authorization: Bearer YOUR_APIFY_TOKEN"
```

### Monthly automation

Weekly polling tolerates publication delays. The Actor stores a separate snapshot per market and sets `OUTPUT.hasNewReport` to `true` only when that market's data month changes.

For resilient monitoring, schedule three independent actions:

```json
{"market":"united_states"}
{"market":"brazil"}
{"market":"australia"}
```

Use a successful-run webhook and continue downstream only when `OUTPUT.hasNewReport` is true.

### Data interpretation

#### United States

The U.S. cohort uses the monthly Department of Transportation Air Travel Consumer Report. Complaint cases and baggage measures are available for reporting marketing carriers. `complaintsPer100kScheduledOperations` is a transparent comparison proxy, not a passenger-normalized complaint rate.

#### Brazil

The Brazilian cohort aggregates ANAC flights whose origin or destination is in Brazil. Airlines need at least 100 monthly operations. Punctuality means not delayed by more than 30 minutes.

The latest annual consumer complaint file is matched to airline entities where possible. Raw annual complaint counts are not included in the operational score and may be absent for some foreign carriers.

#### Australia

Australia uses BITRE's monthly table for major domestic and regional airlines. Complaint and baggage fields remain null because comparable airline-level measures are unavailable.

### Limitations

- Regulatory reports lag the real-world travel month.
- Networks, subsidiaries, and codeshares are consolidated differently by market.
- Peer scores can move when the reporting cohort changes even if an airline's raw metric is stable.
- Brazilian complaint data is annual while operational data is monthly.
- Australian coverage is limited to participating domestic and regional carriers.
- Extreme weather, industrial action, airport constraints, and other extraordinary events can materially affect a month.
- This benchmark is not a safety rating and should not be the sole basis for legal, regulatory, or passenger-rights decisions.

### Troubleshooting

**No airlines matched the selection**

Confirm that the airline belongs to the selected scope. Choose All markets to mix country codes in one run.

**A complaint field is null**

That market may not publish a comparable complaint metric, or the airline could not be matched safely to the annual complaint file. Check `coverageTier` and `scoredMetrics`.

**The report month looks old**

Official regulatory releases lag the underlying operations. `reportDataMonth` describes the measured month, not the collection date.

**A historical URL was rejected**

`reportUrl` accepts only the official domain corresponding to the selected market.

### Integrations

Export as JSON, CSV, Excel, XML, or RSS. Use `datasetId` to append rows and `runId` to join workflow metadata. The output works with webhooks, dashboards, scheduled tasks, and MCP workflows that call Apify Actors.

### Changelog

- **August 2026** — Added All markets comparisons with normalized international scores and ranks.
- **August 2026** — Added Brazil and Australia, market-aware snapshots, and three-market scheduling.
- **Initial release** — United States DOT reliability and complaint benchmark.

### Support

If an official layout change causes missing rows, open an Actor issue with the run ID, market, and report month. The Actor fails instead of silently returning an incomplete cohort.

# Actor input Schema

## `market` (type: `string`):

Choose All markets for international comparison, or one market for a country-specific benchmark. International scores normalize each airline's position within its local peer cohort.

## `airlines` (type: `array`):

Select airlines from one or several countries. Labels include the market code. Leave empty to return every comparable airline in the chosen scope.

## `reportUrl` (type: `string`):

Optional official report URL for a historical backfill when one specific market is selected. It cannot be combined with All markets.

## `datasetId` (type: `string`):

Optional Apify dataset ID. The Actor appends the same normalized benchmark rows for dashboards or data pipelines.

## `runId` (type: `string`):

Optional ID copied into every row so this run can be joined with your workflow metadata.

## Actor input object example

```json
{
  "market": "australia",
  "airlines": [
    "qantas",
    "virgin_australia"
  ]
}
```

# Actor output Schema

## `dataset` (type: `string`):

No description

## `summary` (type: `string`):

No description

## `runSummary` (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 = {
    "market": "australia",
    "airlines": [
        "qantas",
        "virgin_australia"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("trovevault/airline-reliability-complaint-benchmark").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 = {
    "market": "australia",
    "airlines": [
        "qantas",
        "virgin_australia",
    ],
}

# Run the Actor and wait for it to finish
run = client.actor("trovevault/airline-reliability-complaint-benchmark").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 '{
  "market": "australia",
  "airlines": [
    "qantas",
    "virgin_australia"
  ]
}' |
apify call trovevault/airline-reliability-complaint-benchmark --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,trovevault/airline-reliability-complaint-benchmark"
        }
    }
}

```

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/ITcB0A05YMvLErsCg/builds/P3pXjxncQebHz4IlE/openapi.json
