Flights and routes

Flight lookup, retained history, airport-pair search, and inferred routes.

A flight number doesn't come with a fixed route attached — airlines reuse them, and the same number can fly different city pairs on different days. Instead of static schedule data, we infer the strongest recent route from what's actually been observed, and surface the alternatives as evidence rather than hiding them.

The window is fixed at the last 30 days — recent enough that a flight number that's changed routes shows up quickly, with no parameter to configure.

GET/v1/flights/search
Flights between two airports on a service date
GET/v1/flights/{flight_number}
Canonical flight details and retained observations
GET/v1/flights/{flight_number}/history/{service_date}
A flight number's retained history for one date
GET/v1/flights/history/{flight_id}
One retained flight by public ID
GET/v1/flights/{flight_number}/route
Usual route for a flight number, with alternatives
GET /v1/flights/UA123/route
{
  "flight_number":: "UA123",
  "origin":: "KSFO",
  "destination":: "KJFK",
  "confidence":: 0.92,
  "observations":: 47,
  "first_seen":: "2026-01-04T14:32:00Z",
  "last_seen":: "2026-07-28T15:10:00Z",
  "alternatives":: [
    {
      "origin":: "KSFO",
      "destination":: "KBOS",
      "observations":: 3,
      "first_seen":: "2026-02-11T09:05:00Z",
      "last_seen":: "2026-03-02T10:40:00Z",
      "score":: 0.08
    }
  ]
}

confidence weighs each observed route by how recent it is — older sightings decay rather than counting equally with yesterday's — so a flight number that changed routes recently reflects that quickly instead of averaging over months of stale history.

Route history only exists for flight numbers we've actually observed. A number with no recent activity returns a 404, not an empty or fabricated guess.