NearBy Airports API

Learn about the NearBy Airports API and how it can be useful to your audience.


You can use the NearBy API in your services to show users the nearest departure airport or all available airports within a given radius.

Some of our clients, thanks to the NearBy API, are developing smart assistant bots that do more than their users expect.

And how can you apply the NearBy API to your business?


Example API Request:


                https://airlabs.co/api/v9/nearby?lat=-6.1744&lng=106.8294&distance=20&api_key={{params.api_key}}
              

Request Parameters:

Parameter Description
api_key required Your API Key from acccount dashboard.
lat required Geo location Latitude.
lng required Geo location Longitude.
distance required Distance from required Geo location (km)
lang optional 2 letter language code
_fields optional Fields to return (comma separated, e.g.: name,iata_code,icao_code,lat,lng)

Example API Response:


              {
                "airports": [{
                  "icao_code": "WIHH",
                  "country_code": "ID",
                  "iata_code": "HLP",
                  "lng": 106.891176,
                  "city": "Jakarta",
                  "timezone": "Asia/Jakarta",
                  "name": "Halim Perdanakusuma Airport",
                  "city_code": "JKT",
                  "slug": "halim-perdanakusuma-hlp-wihh-id",
                  "lat": -6.266929,
                  "popularity": 39391,
                  "distance": 12.348
                }, {
                  "icao_code": "WIHP",
                  "country_code": "ID",
                  "iata_code": "PCB",
                  "lng": 106.764999,
                  "city": "Jakarta",
                  "timezone": "Asia/Jakarta",
                  "name": "Pondok Cabe Air Base",
                  "city_code": "PCB",
                  "slug": "pondok-cabe-pcb-wihp-id",
                  "lat": -6.33696,
                  "popularity": 24609,
                  "distance": 19.426
                }, {
                  "icao_code": "WIII",
                  "country_code": "ID",
                  "iata_code": "CGK",
                  "lng": 106.655808,
                  "city": "Jakarta",
                  "timezone": "Asia/Jakarta",
                  "name": "Soekarno-Hatta International Airport",
                  "city_code": "JKT",
                  "slug": "soekarno-hatta-cgk-wiii-id",
                  "lat": -6.127261,
                  "popularity": 39689,
                  "distance": 19.893
                }],
                "cities": [{
                  "country_code": "ID",
                  "lng": 106.84513,
                  "timezone": "Asia/Jakarta",
                  "name": "Jakarta",
                  "city_code": "JKT",
                  "slug": "jakarta-jkt-id",
                  "lat": -6.21462,
                  "popularity": 18676,
                  "distance": 4.798
                }]
              }
              


Response Parameters:

Parameter Description
airports List of matched airports, sorted by distance.
cities List of matched cities, sorted by distance.
distance Distance from requested Geo (in km).

By the way, you may also be interested in the leaflet.js library.


       Github    Reddit

See also

World Cities Database
Airports Database API
Name Suggestion Service
Real-time Flights API
Airport Schedules API


Questions? Contact us.