Using the API

The public REST API serves the verified dataset and exposes the rules engine. It is free to read and CORS-enabled, so you can call it from a browser, an edge function, or a server.

  • Base URL: https://api.flighthelp.net
  • Format: JSON. Successful responses use a standard envelope; errors use RFC 7807 application/problem+json.
  • OpenAPI: the full machine-readable spec is at https://api.flighthelp.net/openapi.json.

Response envelope

Every successful response wraps the payload in data and attaches a _meta block so you always know how fresh the answer is and which engine/schema produced it:

{
  "data": { "...": "..." },
  "_meta": {
    "as_of": "2026-05-27T10:00:00.000Z",
    "engine_version": "0.2.0",
    "schema_version": "0.1.0",
    "request_id": "..."
  }
}

List endpoints add total_estimated, next_cursor, and previous_cursor to _meta.

Endpoints

Method Path Description
POST /v1/compensation/evaluate Evaluate a flight disruption across every regime
POST /v1/distance/calculate Great-circle distance + EU 261 distance band
GET /v1/airlines List airlines (cursor-paginated)
GET /v1/airlines/{code} One airline by IATA, ICAO, or slug id
GET /v1/airlines/{code}/baggage-rules Baggage rules for an airline
GET /v1/airports List airports (cursor-paginated)
GET /v1/airports/{code} One airport by IATA, ICAO, or slug id
GET /v1/regulations List passenger-rights regulations
GET /v1/regulations/{slug} One regulation, article by article
GET /v1/scenarios List passenger-rights scenarios
GET /v1/scenarios/{slug} One scenario playbook
GET /v1/search Search across all entities

Evaluate a disruption

curl -s https://api.flighthelp.net/v1/compensation/evaluate \
  -H 'content-type: application/json' \
  -d '{
    "flight": { "operating_carrier": "LH", "origin": "FRA", "destination": "JFK" },
    "disruption": { "type": "delay", "delay_minutes": 240, "reason": "technical_aircraft" },
    "passenger": { "count": 1 }
  }'

The response includes best_outcome, every applicable_regimes entry with its rights and legal_basis citations, next_steps, and warnings. See Using the rules engine for the full output shape — the API returns exactly what the engine produces.

Look things up

curl -s https://api.flighthelp.net/v1/airlines/LH       # by IATA
curl -s https://api.flighthelp.net/v1/airlines/DLH      # by ICAO
curl -s https://api.flighthelp.net/v1/airlines/lufthansa # by slug id
curl -s https://api.flighthelp.net/v1/airports/EGLL     # by ICAO
curl -s https://api.flighthelp.net/v1/regulations/eu-261-2004

Pagination

List endpoints accept ?limit= (1–100, default 50) and ?cursor=. Follow _meta.next_cursor until it is null:

curl -s "https://api.flighthelp.net/v1/airports?limit=100"
curl -s "https://api.flighthelp.net/v1/airports?limit=100&cursor=NTA"

Errors

{
  "type": "https://api.flighthelp.net/errors/unprocessable-scenario",
  "title": "Scenario could not be evaluated.",
  "status": 422,
  "detail": "disruption.type is required."
}

Common statuses: 400 invalid input/JSON, 404 not found, 422 an unprocessable scenario (e.g. missing required fields).