Registry / data / airport-data

airport-data

JSON →
library1.0.1jsnpmunverified

The `airport-data` package provides a static JSON snapshot of airport information derived from the OpenFlights Airports Database. It offers a structured array of airport objects, each containing details such as ID, name, city, country, IATA and ICAO codes, geographical coordinates, altitude, timezone, and type. The current stable and only major version is 1.0.1, published over 8 years ago (as of 2026). This package serves as a direct, unmaintained dump of data from its time of publication, with no ongoing updates or release cadence. Its key differentiator is its simplicity as a pre-packaged JSON array, suitable for applications requiring historical or non-real-time airport data, but critically, it does not reflect any changes or additions to the global airport landscape since its last release.

npm install airport-data
INSTALL
IMPORT
SIG · AIRPORT-DATA
A
airport-data
datajavascriptv1.0.1
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18226 runs
build_error
glibc
node 18226 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

airports
const airports = require('airport-data')
import airports from 'airport-data'
The package is a CommonJS module that exports a JSON array directly. Native ES module import using `import airports from 'pkg'` will not work as expected in many environments, often resulting in `TypeError`.
airports (ESM workaround)
import * as airports from 'airport-data';
import airports from 'airport-data';
While not natively ESM, `import * as airports from 'airport-data'` can sometimes work in Node.js ESM contexts to import the CJS module as a namespace object, with the array accessible directly. Depending on bundler/Node.js version, direct JSON import might also be possible: `import airports from 'airport-data/airports.json'`.

Demonstrates loading the static airport data and performing basic filtering and lookup operations using CommonJS `require`.

const airports = require('airport-data'); console.log(`Total airports in database: ${airports.length}`); // Find an airport by IATA code const yulAirport = airports.find(airport => airport.iata === 'YUL'); if (yulAirport) { console.log(` Found YUL Airport:`); console.log(` Name: ${yulAirport.name}`); console.log(` City: ${yulAirport.city}, ${yulAirport.country}`); console.log(` Coordinates: ${yulAirport.latitude}, ${yulAirport.longitude}`); } // Filter airports in a specific country const canadianAirports = airports.filter(airport => airport.country === 'Canada'); console.log(` Number of Canadian airports: ${canadianAirports.length}`);
Debug
Known issues
gotchaThe data provided by `airport-data@1.0.1` is a static snapshot published over 8 years ago (as of 2026). It is critically outdated and does not reflect new airports, closed airports, changed IATA/ICAO codes, or updated geographic/timezone information.
fix
For current airport data, use actively maintained alternatives or fetch directly from up-to-date sources like the OpenFlights API or other contemporary data providers.
affects: >=1.0.0
gotchaThis package is a CommonJS module (`module.exports = require('./airports.json')`) and does not provide a native ES module entry point. This can lead to issues or require specific configurations when used in modern ESM-only environments without transpilation.
fix
In an ESM context, consider using `import * as airports from 'airport-data'` or directly importing the JSON file if your build system or Node.js version supports it (`import airports from 'airport-data/airports.json'`). Ensure your build tools are configured for CJS interoperability.
affects: >=1.0.0
Errors
Common errors & fixes
Error: Cannot find module 'airport-data'
The package `airport-data` is not installed or the import path is incorrect.
fix
Ensure the package is installed in your project: `npm install airport-data`.
TypeError: (0 , airport_data_1.default) is not a function (when using `import airports from 'airport-data'` in an ESM context)
Attempting to use a CommonJS module that exports an array directly as a default ES module import, which isn't directly compatible without specific handling or a namespace import.
fix
Use `import * as airports from 'airport-data'` for namespace import in ESM, or stick to `const airports = require('airport-data')` in CommonJS environments.
Upgrade
Version history
1.0.1latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
42 hits · last 30 days
node
36
OpenAI (training)
2
Resources
airport-data — npm install airport-data · libregistry