{
  "openapi": "3.0.1",
  "info": {
    "title": "Brazil Flight Delays & Cancellations — Voos ANAC",
    "description": "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.",
    "version": "0.1",
    "x-build-id": "RgEv8P6mfVTIPni1h"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/matheus_dev_natal~brazil-flight-delays-anac/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-matheus_dev_natal-brazil-flight-delays-anac",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/acts/matheus_dev_natal~brazil-flight-delays-anac/runs": {
      "post": {
        "operationId": "runs-sync-matheus_dev_natal-brazil-flight-delays-anac",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor and returns information about the initiated run in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/runsResponseSchema"
                }
              }
            }
          }
        }
      }
    },
    "/acts/matheus_dev_natal~brazil-flight-delays-anac/run-sync": {
      "post": {
        "operationId": "run-sync-matheus_dev_natal-brazil-flight-delays-anac",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "inputSchema": {
        "type": "object",
        "required": [
          "mode"
        ],
        "properties": {
          "mode": {
            "title": "What to return — O que retornar",
            "enum": [
              "ranking",
              "flights",
              "trend"
            ],
            "type": "string",
            "description": "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.",
            "default": "ranking"
          },
          "dateFrom": {
            "title": "From — De",
            "type": "string",
            "description": "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": {
            "title": "To — Até",
            "type": "string",
            "description": "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": {
            "title": "Airline — Companhia aérea",
            "type": "string",
            "description": "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": {
            "title": "Flight number — Número do voo",
            "type": "string",
            "description": "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": {
            "title": "Origin airport — Aeroporto de origem",
            "type": "string",
            "description": "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": {
            "title": "Destination airport — Aeroporto de destino",
            "type": "string",
            "description": "Same format as the origin field. | Mesmo formato do campo de origem."
          },
          "minDelayMinutes": {
            "title": "Minimum delay in minutes — Atraso mínimo em minutos",
            "minimum": 0,
            "type": "integer",
            "description": "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.",
            "default": 0
          },
          "delayBasis": {
            "title": "Measure delay on — Medir o atraso na",
            "enum": [
              "arrival",
              "departure",
              "either"
            ],
            "type": "string",
            "description": "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.",
            "default": "arrival"
          },
          "flightStatus": {
            "title": "Flight status — Situação do voo",
            "enum": [
              "all",
              "completed",
              "cancelled",
              "notReported"
            ],
            "type": "string",
            "description": "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.",
            "default": "all"
          },
          "serviceType": {
            "title": "Service type — Tipo de serviço",
            "enum": [
              "all",
              "domesticPassenger",
              "internationalPassenger",
              "cargo"
            ],
            "type": "string",
            "description": "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'.",
            "default": "all"
          },
          "excludeDuplicatedLegs": {
            "title": "Drop legs ANAC marked as duplicated — Descartar etapas marcadas como duplicadas",
            "type": "boolean",
            "description": "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.",
            "default": true
          },
          "groupBy": {
            "title": "Group the ranking by — Agrupar o ranking por",
            "enum": [
              "airline",
              "airport",
              "route"
            ],
            "type": "string",
            "description": "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.",
            "default": "airline"
          },
          "sortBy": {
            "title": "Order by — Ordenar por",
            "enum": [
              "onTimeRate",
              "delayRate",
              "cancellationRate",
              "totalFlights"
            ],
            "type": "string",
            "description": "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.",
            "default": "onTimeRate"
          },
          "minFlights": {
            "title": "Minimum flights to enter the ranking — Mínimo de voos para entrar no ranking",
            "minimum": 0,
            "type": "integer",
            "description": "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.",
            "default": 100
          },
          "maxItems": {
            "title": "Maximum results — Máximo de resultados",
            "minimum": 1,
            "type": "integer",
            "description": "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.",
            "default": 10
          },
          "proxyConfiguration": {
            "title": "Proxy — Proxy",
            "type": "object",
            "description": "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.",
            "default": {
              "useApifyProxy": false
            }
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "usageTotalUsd": {
                "type": "number",
                "example": 0.00005
              },
              "usageUsd": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "number",
                    "example": 0.00005
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}