Return list of airports that currently located within specified range from geographical point or pilot callsign.
Output fields:
info
: this key contain value found
which represents number of found aircraft's with given parametersresult
: will contain all found aircraft's and their detailsUsage
Endpoint: /airports_in_range
Request method: GET
Headers:
Header parameter | Description | |
---|---|---|
X-API-Key |
Your unique API key | |
callsign |
Pilot callsign. If lat/lon is not set, this is required. | |
rad |
Radius from center point (pilot or lan/lon) in nautical miles or kilometers. Accept positive integer values that followed by km or nm: 10nm / 10km |
|
lat |
Latitude as decimal value. If callsign is set, then lat is ignored. |
|
lon |
Longitude as decimal value. If callsign is set, then lon is ignored. |
Example request:
Python
import requests
url = "https://api.vacc-ua.org/api/airports_in_range"
headers = {
'X-API-Key': "123456",
'callsign': "BAW883",
'rad': "50nm",
'Cache-Control': "no-cache"
}
response = requests.request("GET", url, headers=headers)
print(response.text)
PHP
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_PORT => "443",
CURLOPT_URL => "https://api.vacc-ua.org/api/airports_in_range",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => array(
"Cache-Control: no-cache",
"X-API-Key: 123456",
"callsign: BAW883",
"rad: 50nm"
),
));
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
Example response:
{
"info": {
"found": 4
},
"result": {
"EPCD": {
"elev": 727,
"name": "DEPULTYCZE KROLEWSKI",
"distance": "20nm"
},
"EPLB": {
"elev": 633,
"name": "LUBLIN",
"distance": "44nm"
},
"EPZA": {
"elev": 750,
"name": "ZAMOSC",
"distance": "43nm"
},
"EPSL": {
"elev": 657,
"name": "SWIDNIK",
"distance": "45nm"
}
}
}