Skip to main content

What is airline-codes?

The airline-codes package provides a comprehensive database of airline information including IATA codes, ICAO codes, callsigns, and country data. All data is sourced from OpenFlights.org and automatically synced weekly to ensure accuracy. The package wraps airline data in a Backbone Collection interface, giving you access to powerful query and manipulation methods out of the box.

Key Features

IATA & ICAO Codes

Complete database of airline IATA and ICAO codes with associated metadata

Backbone Collection

Leverages Backbone.js Collection API for familiar and powerful data operations

Auto-Updated Data

Airline data automatically synced weekly from OpenFlights.org

Zero Configuration

Works immediately after install with no setup required

Data Structure

Each airline object in the collection contains the following fields:
  • id - Unique OpenFlights identifier
  • name - Full airline name
  • alias - Alternative name or abbreviation
  • iata - IATA code (2-character)
  • icao - ICAO code (3-character)
  • callsign - Radio callsign
  • country - Country of registration
  • active - Operating status (“Y” or “N”)

Use Cases

1

Flight Booking Systems

Look up airline information by IATA code to display full airline names and details in booking interfaces
2

Travel Applications

Validate airline codes and retrieve metadata for itinerary management
3

Data Analysis

Filter and analyze airline data by country, status, or other attributes
4

Autocomplete & Search

Build airline search and autocomplete features with the Collection’s query methods

Quick Example

const airlines = require('airline-codes');

// Find an airline by IATA code
const westjet = airlines.findWhere({ iata: 'WS' });
console.log(westjet.get('name'));
// => WestJet

// Get all US airlines
const usAirlines = airlines.where({ country: 'United States' });
console.log(usAirlines.length);
// => 245
The package uses Backbone Collections under the hood, so all standard Backbone Collection methods like findWhere, where, at, filter, and sort are available.

Data Source

Airline data is sourced from the jpatokal/openflights repository, which maintains one of the most comprehensive open databases of airline information available.

Build docs developers (and LLMs) love