The field separator is comma (, 0x2C), the row separator is CRLF (\r\n 0x0D 0x0A) and the field delimiter is double quote (" 0x22).
The first line of any OpenFlights CSV file is considered a header and ignored. This line starts with a Unicode Byte Order Mark (U+FEFF), represented in UTF-8 as 0xEF 0xBB 0xBF. (Old OpenFlights exports incorrectly used the UTF-16 BOM 0xFE OxFF.)
All fields may be left empty unless listed as Mandatory below.
Date of flight, in YYYY-MM-DD (dash-separated, preferred format), MM/DD/YYYY (slash-separated), DD.MM.YYYY (dot-separated) or YYYY (year-only) format. The date may optionally also contain the departure time of the flight in the format HH:MM[:SS], separated from the date by a space. Seconds are optional, but presently ignored. Mandatory (date part only).
IATA or ICAO code of source airport. Mandatory unless "From_OID" is provided.
IATA or ICAO code of destination airport. Mandatory unless "To_OID" is provided.
Flight number. If first two characters are an airline code (two alphanumeric digits), the code is used to override "Airline".
Full name of airline name. Airline codes are not recognized. May be overridden by "Flight_Number", defaults to Unknown if not available.
Distance of flight, in miles. Calculated automatically if not provided.
Duration of flight, in the format HH:MM. Estimated automatically if not provided.
Seat type: one of "W" for Window, "A" for Aisle or "M" for Middle.
Class: one of "F" for First, "C" for Business, "P" for Premium Economy, "Y" for Economy.
Reason for flight: one of "B" for Business, "L" for Personal, "C" for Crew or "O" for Other.
Plane registration number.
Internal OpenFlights Trip ID. Optional, but must exist and belong to the user importing the data if specified.
User-entered note or comment about flight.
The final four fields contain internal OpenFlights IDs (OID) for ensuring accurate imports. They are generated automatically when exporting, but should not be provided if creating or importing your own data, or altering the airline, airport or plane fields of exported data.
Internal OpenFlights airport ID. Overrides "From" if provided.
Internal OpenFlights airport ID. Overrides "To" if provided.
Internal OpenFlights airline ID. Overrides "Airline" if provided.
Internal OpenFlights plane ID. Overrides "Plane" if provided.
Airlines are matched in the following order:
"Airline_OID" as internal identifier
First two characters of "Flight_Number" as IATA code, if alphanumeric and not numeric (AB, A1, 1A are OK, but 11 is not)
"Airline" as name or alias
Note that the airline code (IATA/ICAO) must be supplied in "Flight_Number", not "Airline".
If multiple matches are found, "Airline" is used to determine the best fit.
If "Airline" is defined but no matches are found, "Airline" is added as new.
If "Flight Number" defines an unrecognized IATA code, import fails.
If neither "Airline" nor "Flight_Number" are defined, "Airline" is set to Unknown.
The following sample shows the maximal, recommended, and three minimal data sets for importing a flight (airline and flight number, airline only, and neither airline nor flight number).
2008-01-18 10:30:10,DXB,RUH,SV559,Saudi Arabian Airlines,542,01:35,40C,A,Y,B,Boeing 777,HZ-AKH,16,"First, to Saudi!",2188,2082,4533,3
2008-01-18 10:30,DXB,RUH,SV559,Saudi Arabian Airlines,542,01:35,40C,A,Y,B,Boeing 777,HZ-AKH,16,"First, to Saudi!"
2008-01-18,DXB,RUH,,Saudi Arabian Airlines
Note: The first line of any CSV file is always ignored, the field key is provided only for your own reference.
0.42 — Nov 7, 2010
Fix representation of byte-order mark in UTF-8.
0.41 — Jul 21, 2009
0.4 — Feb 1, 2009
Date field now allows an optional time element.
0.3 — Dec 22, 2008
Corrected business class specifier to "C", although "B" is still accepted. Support for American (DD/MM/YYYY) and European (DD.MM.YYYY) dates added.
0.2 — Dec 2, 2008
Specifying airline no longer mandatory. Clarified field names and airline matching logic.