IATA Airline Code Validation in Node.js — Lookup, ICAO & Callsign
IATA airline designator codes power booking systems, e-tickets, and baggage tags worldwide. Learn how to validate them, resolve airline names, map to ICAO codes, and retrieve callsign and country data in a single API call.
In this guide
1. What are IATA airline codes?
An IATA airline designator is a two-character code assigned by the International Air Transport Association to airlines operating scheduled and charter services. These codes are the backbone of commercial aviation — they appear on flight numbers, booking references, e-tickets, baggage tags, and interline agreements.
IATA designators consist of two alphanumeric characters. Most are two letters, but some include a digit — for example, 2K (Avianca Ecuador). The codes are unique to each operating airline and are essential for ticketing, baggage handling, and revenue accounting between carriers.
Some well-known examples: AA (American Airlines), BA (British Airways), LH (Lufthansa), LO (LOT Polish Airlines).
2. IATA vs ICAO airline codes
Two coding systems exist for airlines. IATA designators are two-character codes used in commercial aviation — ticketing, passenger-facing systems, GDS platforms, and baggage routing. ICAO designators are three-letter codes used in air traffic control, flight plans, and operational communications between ATC and pilots.
| Airline | IATA | ICAO | Callsign |
|---|---|---|---|
| American Airlines | AA | AAL | AMERICAN |
| British Airways | BA | BAW | SPEEDBIRD |
| Lufthansa | LH | DLH | LUFTHANSA |
| LOT Polish Airlines | LO | LOT | LOT |
| Emirates | EK | UAE | EMIRATES |
Passengers see IATA codes on boarding passes and flight displays (e.g. AA 100), while pilots and ATC use ICAO codes and callsigns on the radio (e.g. "American One Hundred" with ICAO prefix AAL). The two systems do not follow a predictable mapping — you need a lookup to convert between them.
3. The right solution: one API call
The IsValid IATA Airline API validates the format, looks up the airline in a comprehensive directory, and returns name, ICAO code, callsign, and country — all from a single GET request.
Get your free API key at isvalid.dev — 100 calls per day, no credit card required.
Full parameter reference and response schema: IATA Airline Validation API docs →
4. Node.js code example
Using the @isvalid-dev/sdk package or the native fetch API (Node 18+).
// airlineValidator.js import { createClient } from '@isvalid-dev/sdk'; const iv = createClient({ apiKey: process.env.ISVALID_API_KEY }); // ── Validate a single airline ─────────────────────────────────────────────── const result = await iv.iata.airline('AA'); console.log(result.valid); // true console.log(result.found); // true console.log(result.name); // 'American Airlines' console.log(result.icao); // 'AAL' console.log(result.callsign); // 'AMERICAN' console.log(result.countryCode); // 'US' // ── List all airlines ─────────────────────────────────────────────────────── const airlines = await iv.iata.airlineList(); console.log(`Total airlines: ${airlines.length}`);
For batch validation — processing a list of airline codes from a schedule or import file:
// airlineBatch.js — validate multiple IATA airline codes sequentially async function validateAirlines(codeList) { const results = []; for (const code of codeList) { try { const data = await validateAirline(code); results.push({ code, ...data }); } catch (err) { results.push({ code, valid: false, error: err.message }); } } return results; } // ── Example ────────────────────────────────────────────────────────────────── const codes = ['AA', 'BA', 'LH', 'XX', '00']; const results = await validateAirlines(codes); for (const r of results) { const status = r.valid && r.found ? '✓' : r.valid ? '?' : '✗'; const name = r.name ?? 'not found'; console.log(` ${status} ${r.code.padEnd(5)} ${name}`); }
5. cURL example
American Airlines:
curl -H "Authorization: Bearer YOUR_API_KEY" \ "https://api.isvalid.dev/v0/iata/airline?value=AA"
Valid format but not found in directory:
curl -H "Authorization: Bearer YOUR_API_KEY" \ "https://api.isvalid.dev/v0/iata/airline?value=XX"
List all airlines:
curl -H "Authorization: Bearer YOUR_API_KEY" \ "https://api.isvalid.dev/v0/iata/airline/list"
6. Understanding the response
Response for AA (American Airlines):
{ "valid": true, "found": true, "iata": "AA", "name": "American Airlines", "icao": "AAL", "callsign": "AMERICAN", "countryCode": "US", "countryName": "United States" }
Response for a valid format that is not in the directory:
{ "valid": true, "found": false }
Response for an invalid code:
{ "valid": false }
| Field | Type | Description |
|---|---|---|
| valid | boolean | Whether the code has a valid 2-character IATA format |
| found | boolean | Whether the code was found in the airline directory (only present when valid is true) |
| iata | string | Normalised 2-character IATA airline code (uppercase) |
| name | string | Full airline name |
| icao | string | null | Corresponding 3-letter ICAO designator (null if not assigned) |
| callsign | string | null | ATC radio callsign (null if not assigned) |
| countryCode | string | ISO 3166-1 alpha-2 country code of the airline's registration |
| countryName | string | null | Full English country name |
7. Edge cases to handle
(a) Codeshare flights
A single physical flight can be marketed under multiple airline codes through codeshare agreements. For example, a flight operated by American Airlines (AA) may also be sold as a British Airways (BA) or Iberia (IB) flight. Each airline code is independently valid — the API validates the marketing carrier's code regardless of who operates the aircraft.
(b) Defunct airlines
Airlines cease operations regularly. Codes from defunct airlines may be reassigned to new carriers after a waiting period. For example, the code NW belonged to Northwest Airlines (merged with Delta in 2010). The API returns the current holder of the code. If you are processing historical data, be aware that the same code may have referred to a different airline in the past.
(c) Numeric codes like 2K
IATA airline codes can contain digits. Codes like 2K, 3K, and 9W are perfectly valid. A simple "letters only" regex will reject these codes. The API handles all valid IATA designator formats, including alphanumeric combinations.
// These are all valid IATA airline codes const codes = ['AA', '2K', '3K', '9W', 'U2']; for (const code of codes) { const result = await iv.iata.airline(code); console.log(`${code}: ${result.found ? result.name : 'not found'}`); }
(d) Case insensitivity
The API accepts codes in any case — aa, Aa, and AA all return the same result. The response always returns the normalised uppercase form in the iata field.
// All of these return the same result const r1 = await iv.iata.airline('aa'); const r2 = await iv.iata.airline('Aa'); const r3 = await iv.iata.airline('AA'); console.log(r1.iata); // → "AA" console.log(r2.iata); // → "AA" console.log(r3.iata); // → "AA"
8. Summary
See also
Validate IATA airline codes instantly
Free tier includes 100 API calls per day. No credit card required. Airline name, ICAO code, callsign, and country lookup included in every response.