
Security News
CVE Volume Surges Past 48,000 in 2025 as WordPress Plugin Ecosystem Drives Growth
CVE disclosures hit a record 48,185 in 2025, driven largely by vulnerabilities in third-party WordPress plugins.
flight-data
Advanced tools
Easy to use flight tracking API for Node.js using aviationstack as the source.
Flight-data is an easy to implement flight tracking API for Node.js that uses data from aviationstack to quickly get data on any flight- past, present, or future. But it doesn't stop at flights. Use the airports feature to quickly get highly detailed information on any airport.
npm install flight-data
Head to aviationstack and obtain a free API token by creating an account.
With a free account, you can make a maximum of 500 API calls per month. You can check your usage from their dashboard.
Since the API token is private, it's recommended to keep it in a separate configuration file or use it as an environment variable.
Each example uses:
const flightdata = require('flight-data');
// Get the real-time flight information for flight 2102 to Seattle (SEA)
flightdata.flights(
{
API_TOKEN: 'YOUR API TOKEN',
options: {
limit: 1,
flight_number: '2102',
arr_iata: 'SEA'
}
})
.then(response => {
...
})
.catch(error => {
...
});
// Get full airport information for Seattle-Tacoma International (SEA)
flightdata.airports(
{
API_TOKEN: 'YOUR API TOKEN',
options: {
limit: 1,
icao_code: 'KSEA'
}
})
.then(response => {
...
})
.catch(error => {
...
});
// Get the flight information for flight 2102 to Seattle (SEA) on May 25th, 2020
flightdata.flights(
{
API_TOKEN: 'YOUR API TOKEN',
options: {
limit: 1,
flight_number: '2102',
flight_date: '2020-05-25',
arr_iata: 'SEA'
}
})
.then(response => {
...
})
.catch(error => {
...
});
// Get the departure gate for flight 2102 to Seattle (SEA)
flightdata.flights(
{
API_TOKEN: 'YOUR API TOKEN',
options: {
limit: 1,
flight_number: '2102',
arr_iata: 'SEA'
}
})
.then(response => {
response.data.forEach(element => {
console.log(element.departure['gate'])
})
})
.catch(error => {
...
});
The flight lookup module returns a JSON array with this structure:
{
count: 1,
data: [
{
flight_date: '2020-05-04',
flight_status: 'cancelled',
departure: [Object],
arrival: [Object],
airline: [Object],
flight: [Object],
aircraft: null,
live: null
}
]
}
This format of return means that to access the flight data, you'll need to use response.data instead of just using response. You can access the count of responses returned by using response.count.
The information returned in some areas of the data section is contained in other arrays. To access this information, use response.data.SECTION['ELEMENT']. For example, to get the departure gate, use response.data.departure['gate']
The airport lookup module similarly returns a JSON array, but getting results from the array is a slightly different process:
{
count: 1,
data: [
{
gmt: '-8',
iata_code: 'SEA',
city_iata_code: 'SEA',
icao_code: 'KSEA',
country_iso2: 'US',
geoname_id: '5809876',
latitude: '47.44384',
longitude: '-122.301735',
airport_name: 'Seattle-Tacoma International',
country_name: 'United States',
phone_number: '206-787-5388',
timezone: 'America/Los_Angeles'
}
]
}
Results can be accessed from this array through response.data[INDEX].ELEMENT. For example, to get the airport name from this result, use response.data[0].airport_name.
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.
All data gathered comes from the aviationstack API. They could choose to modify their terms of service at any time. Please see their website and documentation for the most accurate information about their service.
FAQs
Easy to use flight tracking API for Node.js using aviationstack as the source.
The npm package flight-data receives a total of 21 weekly downloads. As such, flight-data popularity was classified as not popular.
We found that flight-data demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
CVE disclosures hit a record 48,185 in 2025, driven largely by vulnerabilities in third-party WordPress plugins.

Security News
Socket CEO Feross Aboukhadijeh joins Insecure Agents to discuss CVE remediation and why supply chain attacks require a different security approach.

Security News
Tailwind Labs laid off 75% of its engineering team after revenue dropped 80%, as LLMs redirect traffic away from documentation where developers discover paid products.