Airports Nearby
curl --request GET \
--url https://api.flystack.dev/v1/airports/nearby \
--header 'x-api-key: <x-api-key>'import requests
url = "https://api.flystack.dev/v1/airports/nearby"
headers = {"x-api-key": "<x-api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<x-api-key>'}};
fetch('https://api.flystack.dev/v1/airports/nearby', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.flystack.dev/v1/airports/nearby",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <x-api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.flystack.dev/v1/airports/nearby"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<x-api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.flystack.dev/v1/airports/nearby")
.header("x-api-key", "<x-api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.flystack.dev/v1/airports/nearby")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<x-api-key>'
response = http.request(request)
puts response.read_body[
{
"name": "Paris–Le Bourget Airport",
"iata_code": "LBG",
"icao_code": "LFPB",
"lat": 48.962276,
"lng": 2.436539,
"alt": 218,
"city": "Paris",
"city_code": "PAR",
"un_locode": "FRLBG",
"timezone": "Europe/Paris",
"country_code": "FR",
"phone": null,
"website": "http://www.aeroportsdeparis.fr/",
"facebook": null,
"instagram": null,
"linkedin": null,
"twitter": null,
"names": {
"de": "Flughafen Le Bourget",
"en": "Paris–Le Bourget Airport",
"fr": "Aéroport de Paris-Le Bourget"
},
"runways": 3,
"departures": 12410,
"connections": 37,
"is_major": true,
"is_international": 1,
"slug": "parisle-bourget-lbg-lfpb-fr",
"distance": 13.3
},
{
"name": "Paris Orly Airport",
"iata_code": "ORY",
"icao_code": "LFPO",
"lat": 48.729499,
"lng": 2.358963,
"alt": 291,
"city": "Paris",
"city_code": "PAR",
"un_locode": "FRORY",
"timezone": "Europe/Paris",
"country_code": "FR",
"phone": null,
"website": "https://www.parisaeroport.fr/orly",
"facebook": null,
"instagram": null,
"linkedin": null,
"twitter": null,
"names": {
"de": "Flughafen Paris-Orly",
"en": "Paris Orly Airport",
"es": "Aeropuerto París-Orly",
"fr": "Aéroport de Paris–Orly"
},
"runways": 3,
"departures": 61320,
"connections": 262,
"is_major": true,
"is_international": 1,
"slug": "orly-ory-lfpo-fr",
"distance": 14.1
}
]
Datasets
Airports Nearby
Find nearby airports around a location (lat/lng), optionally filtered by radius and result limit.
GET
/
v1
/
airports
/
nearby
Airports Nearby
curl --request GET \
--url https://api.flystack.dev/v1/airports/nearby \
--header 'x-api-key: <x-api-key>'import requests
url = "https://api.flystack.dev/v1/airports/nearby"
headers = {"x-api-key": "<x-api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<x-api-key>'}};
fetch('https://api.flystack.dev/v1/airports/nearby', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.flystack.dev/v1/airports/nearby",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <x-api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.flystack.dev/v1/airports/nearby"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<x-api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.flystack.dev/v1/airports/nearby")
.header("x-api-key", "<x-api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.flystack.dev/v1/airports/nearby")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<x-api-key>'
response = http.request(request)
puts response.read_body[
{
"name": "Paris–Le Bourget Airport",
"iata_code": "LBG",
"icao_code": "LFPB",
"lat": 48.962276,
"lng": 2.436539,
"alt": 218,
"city": "Paris",
"city_code": "PAR",
"un_locode": "FRLBG",
"timezone": "Europe/Paris",
"country_code": "FR",
"phone": null,
"website": "http://www.aeroportsdeparis.fr/",
"facebook": null,
"instagram": null,
"linkedin": null,
"twitter": null,
"names": {
"de": "Flughafen Le Bourget",
"en": "Paris–Le Bourget Airport",
"fr": "Aéroport de Paris-Le Bourget"
},
"runways": 3,
"departures": 12410,
"connections": 37,
"is_major": true,
"is_international": 1,
"slug": "parisle-bourget-lbg-lfpb-fr",
"distance": 13.3
},
{
"name": "Paris Orly Airport",
"iata_code": "ORY",
"icao_code": "LFPO",
"lat": 48.729499,
"lng": 2.358963,
"alt": 291,
"city": "Paris",
"city_code": "PAR",
"un_locode": "FRORY",
"timezone": "Europe/Paris",
"country_code": "FR",
"phone": null,
"website": "https://www.parisaeroport.fr/orly",
"facebook": null,
"instagram": null,
"linkedin": null,
"twitter": null,
"names": {
"de": "Flughafen Paris-Orly",
"en": "Paris Orly Airport",
"es": "Aeropuerto París-Orly",
"fr": "Aéroport de Paris–Orly"
},
"runways": 3,
"departures": 61320,
"connections": 262,
"is_major": true,
"is_international": 1,
"slug": "orly-ory-lfpo-fr",
"distance": 14.1
}
]
This endpoint helps you build “near me” experiences: nearest airports to a user, airport suggestions around a point on a map, or picking the best departure/arrival options within a radius.
Authentication
Your FlyStack API token. You can create one from the dashboard (see Authentication).
Query parameters
Response
The endpoint returns a list of nearby airports, nearest first. Each airport has the fields of the Airports Dataset, plus:[
{
"name": "Paris–Le Bourget Airport",
"iata_code": "LBG",
"icao_code": "LFPB",
"lat": 48.962276,
"lng": 2.436539,
"alt": 218,
"city": "Paris",
"city_code": "PAR",
"un_locode": "FRLBG",
"timezone": "Europe/Paris",
"country_code": "FR",
"phone": null,
"website": "http://www.aeroportsdeparis.fr/",
"facebook": null,
"instagram": null,
"linkedin": null,
"twitter": null,
"names": {
"de": "Flughafen Le Bourget",
"en": "Paris–Le Bourget Airport",
"fr": "Aéroport de Paris-Le Bourget"
},
"runways": 3,
"departures": 12410,
"connections": 37,
"is_major": true,
"is_international": 1,
"slug": "parisle-bourget-lbg-lfpb-fr",
"distance": 13.3
},
{
"name": "Paris Orly Airport",
"iata_code": "ORY",
"icao_code": "LFPO",
"lat": 48.729499,
"lng": 2.358963,
"alt": 291,
"city": "Paris",
"city_code": "PAR",
"un_locode": "FRORY",
"timezone": "Europe/Paris",
"country_code": "FR",
"phone": null,
"website": "https://www.parisaeroport.fr/orly",
"facebook": null,
"instagram": null,
"linkedin": null,
"twitter": null,
"names": {
"de": "Flughafen Paris-Orly",
"en": "Paris Orly Airport",
"es": "Aeropuerto París-Orly",
"fr": "Aéroport de Paris–Orly"
},
"runways": 3,
"departures": 61320,
"connections": 262,
"is_major": true,
"is_international": 1,
"slug": "orly-ory-lfpo-fr",
"distance": 14.1
}
]