npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

flightradar24-client

v1.0.1

Published

Fetch aircraft data from Flightradar24.

Downloads

488

Readme

flightradar24-client

Fetch aircraft data from Flightradar24. Inofficial.

npm version ISC-licensed minimum Node.js version support me via GitHub Sponsors chat with me on Twitter

Installing

npm install flightradar24-client

Usage

radar(north, west, south, east)

The four parameters represent a geographical bounding box (in decimal degrees) with:

  • north: Northern edge latitude
  • west: Western edge longitude
  • south: Southern edge latitude
  • east: 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

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.