# Brazil Flight Delays & Cancellations — Voos ANAC (`matheus_dev_natal/brazil-flight-delays-anac`) Actor

Delays, cancellations and punctuality of every commercial flight in Brazil since 2010, from ANAC's official VRA database — with the regulator's own delay classification. | Atrasos, cancelamentos e pontualidade de voos no Brasil desde 2010, da base oficial VRA da ANAC.

- **URL**: https://apify.com/matheus\_dev\_natal/brazil-flight-delays-anac.md
- **Developed by:** [Matheus Coelho](https://apify.com/matheus_dev_natal) (community)
- **Categories:** Travel, Automation, Developer tools
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.60 / 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/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

## Brazil Flight Delays & Cancellations — Voos ANAC

**Every commercial flight in Brazil since 2010: scheduled vs actual times, delay in minutes, cancellations — and ANAC's own official delay classification.** Straight from the regulator's VRA database. No scraping, no login, no rate limits.

If you need to prove a flight was late, this is the record that proves it.

***

### Why this exists

Brazil's civil aviation authority (ANAC) publishes the *Voo Regular Ativo* database every month: one row per flight leg, with the scheduled and actual departure and arrival of every commercial flight touching Brazilian airspace. It is the official record — the one used as documentary evidence in passenger-rights cases.

It is also published as a 25-31 MB CSV per month, in Brazilian date format, with column names that changed four times in sixteen years, spread across two mirrors with different layouts. This actor turns it into clean, typed, queryable records.

### What you get

**Flight records** — one row per leg:

| | |
|---|---|
| Airline | ICAO code, IATA code and full corporate name |
| Flight | number, aircraft model, seat count, codeshare designators |
| Route | origin and destination ICAO codes, airport names, city and state |
| Times | scheduled and actual departure and arrival, plus the UTC offset |
| Delay | departure and arrival delay in minutes, signed |
| **Official classification** | **ANAC's own label: on time, early, 30-60 min, 60-120 min, 120-240 min, or over 240 min** |
| Status | completed, cancelled or not reported |

**Punctuality rankings** — aggregate by airline, airport or route: on-time rate, share delayed over 30 / 60 / 240 minutes, cancellation rate, mean and median delay. Every row also carries the denominators, so the rates can be audited rather than trusted.

**Monthly trends** — the same metrics month by month, for whatever you filtered.

### Who buys this

- **Passenger-compensation firms.** The four-hour delay threshold that anchors Brazilian claims is a field in this dataset (`arrivalStatusOfficial = "Atraso > 240"`), not something you have to compute and defend.
- **Corporate travel and procurement.** Pick carriers and routes on measured punctuality instead of a sales deck.
- **Travel insurance and pricing teams.** Sixteen years of delay distribution by route.
- **Data journalists.** The monthly "which airline is worst" story, sourced and reproducible.

### Coverage, stated plainly

- **January 2010 to the most recent month ANAC has published — 198 consecutive months, none missing.**
- **This is not live tracking.** ANAC publishes the VRA with a **4 to 8 week lag**. In late August 2026, the most recent month available was June 2026. If you need where a plane is right now, this is the wrong tool.
- Flights from 2000 to 2009 are **not** included: ANAC publishes that period in an incompatible layout with no airline name, no aircraft and no official delay classification.
- `airlineIata` is null for carriers no longer in ANAC's active registry — it is never guessed. Resolved for 100% of flights in recent months, around 72% in 2010. The airline *name* always comes from the flight record itself and is never missing.
- City and state are filled for Brazilian airports (about 90% of legs). ANAC does not register foreign aerodromes.

### Two things we deliberately did not do

**We do not recalculate ANAC's delay classification.** We tested it: our own rule matches ANAC's label on 99.96% of the 81,119 legs in June 2026 and diverges on 30 of them, always by one minute — ANAC computes with seconds while the file publishes truncated minutes. So the official label is passed through untouched, and the delay we compute lives in its own clearly named fields. You get both, and they never overwrite each other.

**We do not convert times to UTC.** ANAC publishes in Brasília local time. Brazil observed daylight saving until 2019, so a fixed `-03:00` would silently misstate every summer timestamp before then. You get the local time exactly as published, plus `utcOffset` with the offset actually in force on that date.

### Example: flights delayed more than four hours

```json
{
  "mode": "flights",
  "dateFrom": "2026-06",
  "minDelayMinutes": 240,
  "delayBasis": "arrival",
  "maxItems": 50
}
```

### Example: most punctual airlines last month

```json
{
  "mode": "ranking",
  "groupBy": "airline",
  "sortBy": "onTimeRate",
  "minFlights": 100,
  "maxItems": 10
}
```

Leave the dates empty and the actor uses the most recent month ANAC has published — discovered at run time, never hard-coded.

### Example: one route, month by month

```json
{
  "mode": "trend",
  "origin": "SBGR",
  "destination": "SBSV",
  "dateFrom": "2026-01",
  "dateTo": "2026-06",
  "maxItems": 6
}
```

### Notes on the input

- **Airline:** ICAO (`GLO`, `TAM`, `AZU`) or IATA (`G3`, `JJ`, `AD`).
- **Airports:** ANAC publishes ICAO codes (`SBGR`, not `GRU`). You can also type part of the airport or city name — `GUARULHOS`, `CONGONHAS` — and it will match.
- **Flight number:** `1234`, `01234` or `G3 1234` all work.
- **Window:** up to 6 months per run. Each month is a 25-31 MB download from ANAC and takes roughly 90 seconds, so a full window run takes several minutes. Need a longer series? Run it twice — the total cost is the same.

### Pricing

Pay per result delivered. No start fee. `maxItems` is a hard limit — the actor stops at exactly the number you asked for and never fetches beyond it.

### Source and attribution

Data published by **ANAC — Agência Nacional de Aviação Civil (Brazil)**, *Voo Regular Ativo (VRA)*, plus ANAC's public registries of airlines and aerodromes. Every record carries the exact source file URL in `sourceUrl`. This actor is not affiliated with or endorsed by ANAC.

***

### Em português

**Atrasos, cancelamentos e pontualidade de todo voo comercial no Brasil desde 2010**, da base oficial VRA da ANAC — com a classificação de atraso da própria ANAC, incluindo a faixa "Atraso > 240 minutos" que ancora os pedidos de indenização de passageiro.

Três modos: **registros de voo** (horário previsto × realizado, atraso em minutos, situação), **ranking de pontualidade** (por companhia, aeroporto ou rota) e **série mensal**.

Pontos que valem ser lidos antes de comprar:

- **Não é tempo real.** A ANAC publica o VRA com 4 a 8 semanas de defasagem.
- Cobertura de **janeiro de 2010 até o mês mais recente publicado**, sem buracos. O período de 2000 a 2009 fica de fora porque a ANAC o publica em layout incompatível.
- A **classificação oficial de atraso é repassada da ANAC**, não recalculada — ela não é reproduzível exatamente a partir dos horários publicados. O atraso calculado por este actor vai em campos separados.
- Os horários saem em **horário de Brasília, como a fonte publica**, com o campo `utcOffset` do dia (que não é fixo: houve horário de verão até 2019).
- Aceita companhia por ICAO ou IATA, aeroporto por ICAO ou por trecho do nome/cidade, e número de voo com ou sem o prefixo da companhia.

Fonte: ANAC — Voo Regular Ativo (VRA), dados abertos. Este actor não tem vínculo com a ANAC.

# Actor input Schema

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

Flight records return one row per flight leg. Punctuality ranking aggregates by airline, airport or route. Monthly trend returns one row per month for whatever you filtered. | Registros de voo devolvem uma linha por etapa. O ranking agrega por companhia, aeroporto ou rota. A série mensal devolve uma linha por mês do que você filtrou.

## `dateFrom` (type: `string`):

YYYY-MM-DD or YYYY-MM. Leave empty to use the most recent month ANAC has published. Coverage starts at 2010-01. | AAAA-MM-DD ou AAAA-MM. Deixe vazio para usar o mês mais recente publicado pela ANAC. A cobertura começa em 2010-01.

## `dateTo` (type: `string`):

YYYY-MM-DD or YYYY-MM. A month without a day means the whole month. Leave empty to use the same month as 'From'. | AAAA-MM-DD ou AAAA-MM. Mês sem dia significa o mês inteiro. Deixe vazio para usar o mesmo mês de 'De'.

## `airline` (type: `string`):

ICAO code (GLO, TAM, AZU) or IATA code (G3, JJ, AD). Airlines that ceased operations are not in ANAC's active registry — leave empty and filter by route instead. | Código ICAO (GLO, TAM, AZU) ou IATA (G3, JJ, AD). Companhias que encerraram operação não constam do cadastro ativo da ANAC — nesse caso deixe vazio e filtre pela rota.

## `flightNumber` (type: `string`):

Accepts 1234, 01234 or 'G3 1234'. Leading zeros and the airline prefix are ignored. | Aceita 1234, 01234 ou 'G3 1234'. Zeros à esquerda e o prefixo da companhia são ignorados.

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

ICAO code (SBGR, SBSP, SBGL) or part of the airport or city name (GUARULHOS, CONGONHAS). ANAC publishes ICAO codes, not IATA. | Código ICAO (SBGR, SBSP, SBGL) ou parte do nome do aeroporto ou da cidade (GUARULHOS, CONGONHAS). A ANAC publica códigos ICAO, não IATA.

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

Same format as the origin field. | Mesmo formato do campo de origem.

## `minDelayMinutes` (type: `integer`):

Only return flights delayed at least this much. 240 minutes is the four-hour mark used in Brazilian passenger-rights cases. | Só retorna voos com pelo menos esse atraso. 240 minutos é a marca de quatro horas usada em casos de direito do passageiro no Brasil.

## `delayBasis` (type: `string`):

Arrival is what matters for compensation claims; departure is what airport operations track. | A chegada é o que importa em pedido de indenização; a partida é o que a operação aeroportuária acompanha.

## `flightStatus` (type: `string`):

ANAC classifies each leg as completed, cancelled or not reported by the airline. 'Not reported' only appears in ANAC's data between 2019 and 2023. | A ANAC classifica cada etapa como realizada, cancelada ou não informada pela companhia. A opção 'não informado' só aparece na base da ANAC entre 2019 e 2023.

## `serviceType` (type: `string`):

Derived from ANAC's line-type code. Legs whose code is outside the four documented ones appear only under 'All'. | Derivado do código de tipo de linha da ANAC. Etapas com código fora dos quatro documentados aparecem só em 'Todos'.

## `excludeDuplicatedLegs` (type: `boolean`):

ANAC flags some legs as duplicates with its own DI code 'D'. Keeping them inflates counts. | A ANAC marca algumas etapas como duplicadas com o próprio código DI 'D'. Mantê-las infla as contagens.

## `groupBy` (type: `string`):

Airport rankings always measure departures from that airport, so a flight is never counted twice. | O ranking por aeroporto sempre mede as partidas daquele aeroporto, para que um voo nunca seja contado duas vezes.

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

On-time rate and delay rate are calculated over the flights ANAC actually classified; cancellation rate is calculated over all flights. Every row shows both denominators. | A taxa de pontualidade e a de atraso são calculadas sobre os voos que a ANAC efetivamente classificou; a de cancelamento, sobre todos os voos. Cada linha mostra os dois denominadores.

## `minFlights` (type: `integer`):

Keeps an operator with a handful of flights from topping the ranking by chance. | Impede que um operador com um punhado de voos lidere o ranking por acaso.

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

Hard limit. The actor stops at exactly this number and never fetches beyond what you asked for. | Limite rígido. O actor para exatamente neste número e nunca busca além do que foi pedido.

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

Not needed: ANAC's open-data files are served over plain HTTPS with no bot protection. Available in case a firewall starts blocking direct access. | Não é necessário: os arquivos de dados abertos da ANAC são servidos por HTTPS comum, sem proteção anti-bot. Disponível caso um firewall passe a bloquear o acesso direto.

## Actor input object example

```json
{
  "mode": "ranking",
  "dateFrom": "2026-06-01",
  "dateTo": "2026-06-30",
  "airline": "G3",
  "flightNumber": "1234",
  "origin": "SBGR",
  "destination": "SBSV",
  "minDelayMinutes": 0,
  "delayBasis": "arrival",
  "flightStatus": "all",
  "serviceType": "all",
  "excludeDuplicatedLegs": true,
  "groupBy": "airline",
  "sortBy": "onTimeRate",
  "minFlights": 100,
  "maxItems": 10,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

## `results` (type: `string`):

All records collected in this run, as JSON.

## `resultsCsv` (type: `string`):

The same records as CSV, ready for Excel or Google Sheets.

# 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 = {
    "mode": "ranking",
    "groupBy": "airline",
    "sortBy": "onTimeRate",
    "minFlights": 100,
    "maxItems": 10
};

// Run the Actor and wait for it to finish
const run = await client.actor("matheus_dev_natal/brazil-flight-delays-anac").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 = {
    "mode": "ranking",
    "groupBy": "airline",
    "sortBy": "onTimeRate",
    "minFlights": 100,
    "maxItems": 10,
}

# Run the Actor and wait for it to finish
run = client.actor("matheus_dev_natal/brazil-flight-delays-anac").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 '{
  "mode": "ranking",
  "groupBy": "airline",
  "sortBy": "onTimeRate",
  "minFlights": 100,
  "maxItems": 10
}' |
apify call matheus_dev_natal/brazil-flight-delays-anac --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,matheus_dev_natal/brazil-flight-delays-anac"
        }
    }
}

```

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/yTRmdXMBotokwcp7b/builds/RgEv8P6mfVTIPni1h/openapi.json
