{"id":19621365,"url":"https://github.com/commenthol/openflights-data","last_synced_at":"2025-04-28T03:32:18.748Z","repository":{"id":57315353,"uuid":"142742564","full_name":"commenthol/openflights-data","owner":"commenthol","description":"REST microservice for openflights airports and airlines data","archived":false,"fork":false,"pushed_at":"2021-09-15T05:12:24.000Z","size":697,"stargazers_count":17,"open_issues_count":0,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-19T18:15:48.335Z","etag":null,"topics":["airlines","airports","iata","iata-codes","icao","icao-codes","openflights","rest-api"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"unlicense","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/commenthol.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-07-29T08:09:45.000Z","updated_at":"2025-04-01T00:47:23.000Z","dependencies_parsed_at":"2022-09-18T20:52:16.778Z","dependency_job_id":null,"html_url":"https://github.com/commenthol/openflights-data","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/commenthol%2Fopenflights-data","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/commenthol%2Fopenflights-data/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/commenthol%2Fopenflights-data/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/commenthol%2Fopenflights-data/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/commenthol","download_url":"https://codeload.github.com/commenthol/openflights-data/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251246270,"owners_count":21558762,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["airlines","airports","iata","iata-codes","icao","icao-codes","openflights","rest-api"],"created_at":"2024-11-11T11:22:40.924Z","updated_at":"2025-04-28T03:32:17.790Z","avatar_url":"https://github.com/commenthol.png","language":"JavaScript","readme":"# openflights-data\n\n\u003e REST microservice for openflights airports and airlines data\n\nGet airport and airline data via REST API.\n\n## Run Example\n\n```bash\nnpm install\ncd example \u0026\u0026 npm install \u0026\u0026 npm run build \u0026\u0026 cd ..\nnpm start\n```\n\nOpen http://localhost:3003\n\n![screenshot](./docs/screenshot.png)\n\n## Usage with express server\n\n```js\nconst {router} = require('openflights-data')\nconst app = require('express')()\n\napp.use('/', router())\napp.listen(3000)\n```\n\nJust access data.\n\n```js\nconst {loadData} = require('openflights-data')\n\nloadData(config).then(data =\u003e console.log(data))\n```\n\n## API\n\n### Get airport by IATA Code\n\nReturns GeoJSON Feature\n\n```js\nGET /airports/iata/:code\n// e.g.\nGET /airports/iata/aaa\n\n{\n  type: 'Feature',\n  geometry: {\n    type: 'Point',\n    coordinates: [-145.50999450683594, -17.35260009765625]\n  },\n  properties: {\n    id: '1973',\n    name: 'Anaa Airport',   // name of airport\n    city: 'Anaa',           // city name\n    iata: 'AAA',\n    icao: 'NTGA',\n    alt: 10,                // altitude in ft\n    tz: 'Pacific/Tahiti',   // timezone\n    country: 'PF',          // ISO-3166 Country Code\n    type: 'airport'         // type: airport, airbase, heliport, seaplane,\n                            //       airfield, bus, port, station\n  }\n}\n```\n\n### Get airport by ICAO Code\n\nReturns GeoJSON Feature\n\n```js\nGET /airports/icao/:code\n```\n\n### Search airport by name\n\nReturns GeoJSON FeatureCollection\n\n```js\nGET /airports/search/:search\n// e.g.\nGET /airports/search/leonardo+da\n\n{\n  type: 'FeatureCollection',\n  features: [\n    {\n      type: 'Feature',\n      geometry: {\n        type: 'Point',\n        coordinates: [12.2388889, 41.8002778]\n      },\n      properties: {\n        id: '1555',\n        name: 'Leonardo da Vinci–Fiumicino Airport',\n        city: 'Rome',\n        iata: 'FCO',\n        icao: 'LIRF',\n        alt: 13,\n        tz: 'Europe/Rome',\n        country: 'IT',\n        type: 'airport'\n      }\n    }\n  ]\n}\n```\n\n### Get airports by bounding box\n\nReturns GeoJSON FeatureCollection\n\n```js\nGET /airports/bbox/:north,:west/:south,:east\n// example get all airports within lat 49, lng 8 and lat 48, lng 7\nGET /airports/bbox/49,8/48,7\n\n// filter by country, type, iata, icao\nGET /airports/bbox/:north,:west/:south,:east?country=C1,C2\u0026type=t1,t2\u0026iata=1\u0026icao=1\n// example get all swiss airfields\nGET /airports/bbox/47.54,6.38/45.73,10.77?country=CH\u0026type=airfield\n```\n\n### Get airline by IATA code\n\nReturns airline object\n\n```js\nGET /airlines/iata/:code\n// e.g.\nGET /airlines/iata/4u\n{\n  id: '2548',\n  name: 'Germanwings',\n  iata: '4U',\n  icao: 'GWI',\n  callsign: 'GERMAN WINGS',\n  active: true,\n  country: 'DE'\n}\n```\n\n### Get airline by ICAO code\n\n```js\nGET /airlines/icao/:code\n```\n\n### Get airline by callsign\n\n```js\nGET /airlines/callsign/:callsign\n```\n\n### Search airline by name\n\nReturns Array of airline objects\n\n```js\nGET /airlines/search/:search\n```\n\n## Data\n\nData is obtained from [openflights](https://github.com/jpatokal/openflights)\nunder [ODBL-1.0](http://opendatacommons.org/licenses/odbl/1.0) and downloaded as postinstall task.\n\nIf you like to improve the data please open an [issue here](https://github.com/jpatokal/openflights/issues).\n\n## License\n\nUnlicense https://unlicense.org\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcommenthol%2Fopenflights-data","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcommenthol%2Fopenflights-data","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcommenthol%2Fopenflights-data/lists"}