/v2/closest
Receive nearest aircraft data by latitude and longitude.
API URL
https://api.adsb.ezz456ch.com/v2/closest
Usage Example
index.js
const axios = require('axios');
const lat = '15';
const lon = '104.5';
const radius_mni = '250';
const url = `https://api.adsb.ezz456ch.com/v2/closest/${lat}/${lon}/${radius_mni}`;
async function getclosest() {
try {
const response = await axios.get(url);
const data = response.data;
console.log(data);
} catch (error) {
console.log(error);
}
}
getclosest();
Example Response
{
"ac": [
{
"hex": "8852e1",
"type": "adsb_icao",
"flight": "THA671 ",
"r": "HS-TWA",
"t": "B789",
"alt_baro": 39975,
"alt_geom": 42600,
"gs": 456.7,
"ias": 248,
"tas": 474,
"mach": 0.82,
"wd": 232,
"ws": 21,
"oat": -53,
"tat": -24,
"track": 265.1,
"track_rate": 0,
"roll": 0,
"mag_heading": 264.9,
"true_heading": 263.74,
"baro_rate": -32,
"geom_rate": -64,
"squawk": "3754",
"emergency": "none",
"category": "A5",
"nav_qnh": 1012.8,
"nav_altitude_mcp": 40000,
"nav_modes": [
"autopilot",
"vnav",
"lnav",
"tcas"
],
"lat": 15.199306,
"lon": 104.311556,
"nic": 8,
"rc": 186,
"seen_pos": 0.378,
"version": 2,
"nic_baro": 1,
"nac_p": 9,
"nac_v": 1,
"sil": 3,
"sil_type": "perhour",
"gva": 1,
"sda": 2,
"alert": 0,
"spi": 0,
"mlat": [],
"tisb": [],
"messages": 162792,
"seen": 0.1,
"rssi": -8.8,
"dst": 16.202,
"dir": 317.6
}
],
"msg": "No error",
"now": 1709625456611,
"total": 1,
"ctime": 1709625456611,
"ptime": 0
}