Skip to content

ryanburnette/airports-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Airports API

An API endpoint for getting basic information about airports. Works great in aviation applications as a central data source with an API wrapper.

Usage

Find an airport by ICAO identifier.

Make a request to the API. Let's say we want some information about KATL.

curl https://ryanburnette.github.io/airports-api/icao/katl.json

Get a response.

{
    "_csv_row": 9,
    "airport_name": "Hartsfield Jackson Atlanta Intl",
    "city": "Atlanta",
    "country": "United States",
    "iata": "ATL",
    "icao": "KATL",
    "latitude": 33.636719,
    "longitude": -84.428067,
    "elevation": 1026,
    "utc_offset": -5,
    "_class": "A",
    "timezone": "America/New_York"
}

Static Generation

The JSON files can be generated from the CSV with the included go script:

go run bin/airports-csv-to-json.go --csv ./airport-data/airports.csv
reading ./airport-data/airports.csv
   wrote icao/.json
   ...
wrote errors.log for 1000 airports without an ICAO designation
wrote icao.json

Contribute

Please fork and make a pull request to contribute.

License

Apache2

About

An API endpoint for getting basic information about airports.

Resources

License

Stars

Watchers

Forks

Contributors