Package Exports
- @puazzi/flightradar24-client
- @puazzi/flightradar24-client/dist/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@puazzi/flightradar24-client) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
flightradar24-client
Fetch aircraft data from Flightradar24. Inofficial.
Installing
npm install flightradar24-clientUsage
radar(north, west, south, east)
The four parameters represent a geographical bounding box (in decimal degrees) with:
north: Northern edge latitudewest: Western edge longitudesouth: Southern edge latitudeeast: Eastern edge longitude
import {fetchFromRadar} from 'flightradar24-client'
const flights = await fetchFromRadar(53, 13, 52, 14)
console.log(flights)[
{
id: '10a6b765',
registration: 'EI-EGD',
flight: 'FR8544',
callsign: 'RYR9XK', // ICAO ATC call signature
origin: 'STN', // airport IATA code
destination: 'SXF', // airport IATA code
latitude: 52.7044,
longitude: 13.4576,
altitude: 8800, // in feet
bearing: 106, // in degrees
speed: 290, // in knots
rateOfClimb: -1216, // in ft/min
isOnGround: false,
squawkCode: '0534', // https://en.wikipedia.org/wiki/Transponder_(aeronautics)
model: 'B738', // ICAO aircraft type designator
modeSCode: '4CA8AF', // ICAO aircraft registration number
radar: 'T-EDDT1', // F24 "radar" data source ID
isGlider: false,
timestamp: 1520538174,
}
// …
]flight(id)
You may use the id from one of the results above to query more details. The output will roughly look like the Friendly Public Transport Format.
import {fetchFlight} from 'flightradar24-client'
const flight = await fetchFlight('e3147c6')
console.log(flight){
id: 'e314807',
callsign: 'BER839C',
liveData: true,
model: 'A320',
registration: 'D-ABDT',
airline: 'AB',
origin: {
id: 'TXL',
name: 'Berlin Tegel Airport',
coordinates: {latitude: 52.560001, longitude: 13.288, altitude: 122},
timezone: 'Europe/Berlin',
country: 'DEU',
},
destination: {
id: 'GOT',
name: 'Gothenburg Landvetter Airport',
coordinates: {latitude: 57.66283, longitude: 12.27981, altitude: 506},
timezone: 'Europe/Stockholm',
country: 'SWE',
},
departure: '2017-07-22T17:15:00+02:00',
scheduledDeparture: '2017-07-22T17:15:00+02:00',
departureTerminal: null,
departureGate: 'C40',
arrival: '2017-07-22T18:35:00+02:00',
scheduledArrival: '2017-07-22T18:35:00+02:00',
arrivalTerminal: null,
arrivalGate: '19A',
delay: 1757,
}Related
- MMM-FlightsAbove – A MagicMirror Module for using displaying current flights in the sky above you!
Contributing
If you have a question or have difficulties using flightradar24-client, please double-check your code and setup first. If you think you have found a bug or want to propose a feature, refer to the issues page.