API Access
Access dataset files directly from scripts, code, or AI agents.
Browse dataset files
API Access
Access dataset files directly from scripts, code, or AI agents.
Each file has a stable URL (r-link) that you can use directly in scripts, apps, or AI agents. These URLs are permanent and safe to hardcode.
Start with these files — they give you everything you need to understand and access the dataset.
- 1. Fetch datapackage.json to inspect schema and resources
- 2. Download data resources listed in datapackage.json
- 3. Read README.md for full context
Data Files
Explore with AIAirports with country, region and runway summary
| Field | Type | Description |
|---|---|---|
| id | integer | OurAirports internal airport id (stable). |
| ident | string | OurAirports identifier: the ICAO code where one exists, otherwise a local or OurAirports-assigned code. |
| type | string | One of large_airport, medium_airport, small_airport, heliport, seaplane_base, balloonport, closed. |
| name | string | Official airport name. |
| latitude_deg | number | Latitude, decimal degrees (WGS84). |
| longitude_deg | number | Longitude, decimal degrees (WGS84). |
| elevation_ft | integer | Elevation above mean sea level, feet; empty where unknown. |
| continent | string | Continent code: AF, AN, AS, EU, NA (North America — not missing), OC, SA. |
| iso_country | string | ISO 3166-1 alpha-2 country code (NA = Namibia — not missing). |
| country_name | string | Country name, joined from OurAirports countries.csv on iso_country. |
| iso_region | string | Region code (ISO 3166-2 where available, otherwise an OurAirports code). |
| region_name | string | Region name, joined from OurAirports regions.csv on iso_region. |
| municipality | string | Primary municipality served; empty where not given. |
| scheduled_service | boolean | true if the airport currently has scheduled airline service. |
| icao_code | string | ICAO code; empty where none. |
| iata_code | string | IATA code; empty where none. |
| gps_code | string | Code used in GPS databases; empty where none. |
| local_code | string | Local country code (e.g. FAA LID in the US); empty where none. |
| runway_count | integer | Runways listed for this airport in runways.csv, including closed ones (helipads count as runways at heliports). 0 when none are listed. |
| open_runway_count | integer | Runways not marked closed. |
| longest_open_runway_ft | integer | Longest open runway length, feet. Empty when there is no open runway or no open runway has a recorded length. |
Download
Download CSVAbout
- Last updated
- 10 October 2026
- Total rows
- ...
- Format
- CSV
- File size
- 12.3 MB
About this dataset
Every airport, heliport, seaplane base and balloonport in OurAirports, one row per site (86,094 rows, closed sites included), with its country and region names and a summary of its runways. Snapshot of 2026-09-18.
| Resource | Content |
|---|---|
data/airports.csv | One row per OurAirports site, keyed on OurAirports' stable id: identifiers (ident, icao_code, iata_code, gps_code, local_code), type, name, position and elevation, continent, country and region (codes and names), municipality, scheduled service, and runway_count, open_runway_count and longest_open_runway_ft |
By type: 42,733 small airports, 23,215 heliports, 13,531 closed sites, 4,106 medium airports, 1,273 seaplane bases, 1,174 large airports and 62 balloonports. 9,055 have an IATA code and 4,335 currently have scheduled airline service. Every field is typed and described in datapackage.json.
How it is built
build.ts joins four OurAirports tables, checking each join rather than assuming it:
airports.iso_country→countries.csv, many-to-one, forcountry_nameairports.iso_region→regions.csv, many-to-one, forregion_namerunways.csv→airports.id, aggregated per airport into the three runway columns
The "one" side of every join must be unique, every foreign key must resolve (a new orphan fails the build rather than leaving a silent blank), each region must belong to its airport's country, and the output must have exactly one row per source airport. fetch.ts snapshots the four CSVs into archive/ with their URL, Last-Modified date and SHA-256; build.ts reads only that snapshot, so the output is reproducible offline:
node fetch.ts # reuses the snapshot unless --refresh
npm install && node build.ts
The scripts and raw snapshot live in the DataPressr repository, not on DataHub.
Reading the data
NAis data, not missing.continentNAis North America andiso_countryNAis Namibia. Tools that readNAas missing by default (pandas, R) need that turned off. Missing values are empty cells.- Runways.
runway_countcounts every runway listed for the site, closed ones included (helipads count as runways at heliports); 44,953 sites list none.longest_open_runway_ftis empty when there is no open runway or no open runway has a recorded length. - Coverage is OurAirports'. It is a volunteer-maintained database; this dataset adds no sites and removes none.
Source and licence
OurAirports open data (CSV mirror at davidmegginson.github.io/ourairports-data), retrieved 2026-09-18; field meanings from the OurAirports data dictionary. OurAirports releases all its data to the public domain, and this compilation is dedicated to the public domain under PDDL-1.0.
Relation to core/airport-codes
DataHub also has core/airport-codes, git-synced from datasets/airport-codes and built from the same OurAirports source. What differs:
- Columns. Core has one
airport-codes.csvwith 13 columns and a combinedcoordinatesstring ("40.070985, -74.933689"). This dataset keeps OurAirports' numericidas the primary key, separate numericlatitude_degandlongitude_deg, and addscountry_name,region_name,scheduled_serviceand the three runway columns joined from the other OurAirports tables. - Rows. Both include closed sites. Core is refreshed daily from OurAirports (86,226 rows on 2026-10-09); this is a dated snapshot of 2026-09-18 with 86,094.
Both use LF line endings.