# OpenFlights reference snapshot

Retrieved 2026-09-05 from publisher-owned repository:
- https://raw.githubusercontent.com/jpatokal/openflights/master/data/airlines.dat
- https://raw.githubusercontent.com/jpatokal/openflights/master/data/planes.dat
- Publisher documentation / license: https://openflights.org/data.php
- Database license: https://opendatacommons.org/licenses/odbl/1-0/
- Individual contents: https://opendatacommons.org/licenses/dbcl/1-0/

Data is offered under ODbL / Database Contents License, requiring attribution and applicable database share-alike obligations. Keep this reference database separately distributable with its source and transformation; do not label it proprietary. Publisher additionally warns that Wikipedia-derived airline/plane content may be subject to GFDL. Review these conditions for the intended distribution. This is not a public-domain or unrestricted asset.

Reproduce normalized JSON: `ruby transform.rb` (Ruby standard libraries plus Node.js for airline enrichment). Raw downloaded bytes and SHA-256 hashes are included; redownloading the mutable master URLs may change results. Transformation preserves duplicate codes and all records, including unknown/non-airline placeholders. Empty/invalid airline codes become null; valid IATA codes are two alphanumeric characters and ICAO codes three letters. Retain numeric OpenFlights IDs; they are NOT FR24 IDs.

Airline `sourceActive` is the source Y/N flag, not verified current operating status. The publisher warns it is unreliable and that historical IATA assignments are incomplete. Do not hide historical airlines or automatically select ambiguous code matches. These are sporadically updated community snapshots, not authoritative IATA/ICAO registries.

## Viva Mexico correction — September 6, 2026

`airline-overrides.json` corrects OpenFlights record 364 (VIV, Aeroenlaces Nacionales) to the display name **Viva (Mexico)**, IATA **VB**, with Viva Aerobus/VivaAerobus, accented Spanish forms, and legal-name aliases. `transform.rb` applies this bounded correction while preserving the original source download and unrelated historical code holders. The OpenFlights source-active flag remains explicitly unverified. Sources: [official Viva brand page](https://www.vivaaerobus.com/es-mx/info/ex/sobre-nosotros/viva-aerobus), [airline tariff with legal operator and VB code](https://content.vivaaerobus.com/Upload-VB/new-site/legal/international-passenger-rules-and-fares.pdf), [FAA company designators: Aeroenlaces Nacionales, VIV](https://www.faa.gov/air_traffic/publications/atpubs/cnt_html/chap3_section_1.html). This changes suggestions only; saved airline names and flight history are not rewritten.

## Systemic airline enrichment — September 6, 2026

The distributed `airlines.json` now contains **8,372 reference entries**: all 6,162 original OpenFlights IDs, 1,471 code-supported enrichments, and 2,210 additional Wikidata records. Enrichment fills 374 previously missing code fields; 3,503 entries have IATA codes, 7,737 have ICAO codes, and 2,514 have aliases. Counts include historical airlines, operators, and conservative duplicate identities, not that many distinct currently operating passenger airlines. `manifest.json` is the generated coverage report. Not every operator has an assigned IATA code, and missing data remains possible; absence is not proof that no code is assigned.

`wikidata-airlines.json` is a CC0 snapshot of 3,681 English-labeled entities with valid P229 (IATA airline) or P230 (ICAO airline) statements. It includes English, Spanish, French, German and Portuguese aliases, countries, source-listed dissolution status, and code statements with ranks, start/end dates and date precision. Fetch `airline-names.sparql` and `airline-codes.sparql` independently through the official https://query.wikidata.org/sparql endpoint as SPARQL JSON; this avoids an IATA × ICAO code cross-product. Query definitions, compressed exact source responses (`airline-names-source.json.gz`, `airline-codes-source.json.gz`), and original response SHA-256 hashes are distributed. This is build-time data, not a live third-party request when users type. Licensing: https://www.wikidata.org/wiki/Wikidata:Licensing (CC0).

To reproduce the exact normalized snapshot, run `node normalize-airlines.mjs airline-names-source.json.gz airline-codes-source.json.gz 2026-09-06` from this directory, then `ruby transform.rb`. Live re-fetching reproduces the process but will use newer community data. `enrich-airlines.mjs` performs conservative one-to-one matching: no conflicting primary codes, plus either both codes and country agree, or ICAO plus a name/alias and compatible country agree. Name-only and IATA-only matches never fill codes. Ambiguous candidates remain separate. Curated corrections run before identity matching and again afterward. Original names remain aliases and original source IDs are retained. Saved flight records are never rewritten.

Deprecated statements are not offered as codes. Ended assignments are searchable as former codes; ambiguous, coarse-date-uncertain and alternate codes are searchable but not automatically chosen as primary values. Coarse assignment dates are evaluated as ranges, not exact days. Missing end qualifiers do not prove an assignment is current. Dissolved airlines may retain their unended source code statements for historical logging and are labeled historical. None of these codes or status flags are operationally verified. Common brands and exact code matches rank ahead of substring-only matches; native datalist re-filtering no longer hides alias results. Same-name airlines with different identities remain selectable, with IATA and ICAO explicitly labeled.

The combined database remains subject to the OpenFlights ODbL/DbCL terms above; Wikidata's CC0 license does not remove those obligations. No proprietary myFR24 master list is copied.

## Expanded aircraft models — September 6, 2026

The core `aircraft.json` now combines OpenFlights with `aircraft-supplement.json`, totaling 269 entries. `transform.rb` reproduces it from `planes.dat` and that supplement. The same transformation writes an identical `lib/aircraft-reference.json` mirror for client imports; a parity test keeps both generated outputs in sync. The supplement adds ER/LR/XLR distinctions and common GA aircraft; 767-400 is labeled 767-400ER. Codes are many-to-one: B739 cannot identify whether an aircraft was a 737-900 or 737-900ER. Code-only entries get a family label when ambiguous, never an invented subtype. Existing meaningful imported names are preserved.

`wikidata-aircraft.json` is a separate CC0 snapshot of 12,785 English-labeled aircraft models/families, fetched September 6, 2026 from https://query.wikidata.org/sparql using `aircraft-models.sparql`. `normalize-wikidata.mjs` transforms the SPARQL JSON response reproducibly into the distributed snapshot. The query includes direct instances of aircraft family (Q15056993) or aircraft model (Q15056995). It excludes labels longer than the flight form's 160-character limit and missing English labels. It groups names/aliases by Wikidata ID. No registrations, owner records, images, article text, or inferred ICAO/IATA codes are included. Structured-data license: https://www.wikidata.org/wiki/Wikidata:Licensing (CC0). It includes historical/military aircraft and broad families as well as specific models; community errors remain possible.

The search API combines the two catalogs, deduplicating normalized names and prioritizing verified code/core matches. Spaces and punctuation are ignored for model matching. Wikidata aliases are search aids, not a trusted code crosswalk. User aircraft names/codes appear as private, client-side suggestions; they are never added to these public reference downloads.

Subtype naming/reference checks: https://www.flightradar24.com/data/aircraft/n828mh (767-432(ER)); https://free.flightradar24.com/data/aircraft/pk-lhy (737-9GP(ER), B739); https://cirrusaircraft.com/aircraft/sr-series/ (SR20/SR22/SR22T); https://www.diamondaircraft.com/en/private-pilots/ (DA models); https://www.icao.int/doc-8643-aircraft-type-designators (type-code reference). These checks are not a copied FR24 database. Unknown and historical codes remain optional.

Curated type mappings were checked against FAA Order JO 7360.1H: https://www.faa.gov/sites/faa.gov/files/2023-03-24_Order_JO_7360.1H_Aircraft_Type_Designators_FINAL_SIGNED.pdf . Important distinctions: DA20 Katana uses DV20; Cirrus SR22T uses S22T; Piper M600 uses M600, not the Meridian's P46T. This is a reference snapshot, not current operational flight-planning data.

FR24: public official API documentation at https://fr24api.flightradar24.com/docs/faq and terms https://www.flightradar24.com/terms-of-service were inspected. No openly licensed downloadable airline/aircraft master was established. Do not scrape undocumented website endpoints or redistribute FR24 data without applicable permission. OpenFlights IDs must never be written to *_fr24_id fields.
