Airline IATA Codes API

Turn a two-character airline code into a recognizable airline name. Retrieve IATA codes alongside ICAO codes and airline identities, or download the directory to use in your own application.

  • Lookup by code or name
  • JSON, XML and CSV
  • Individual records or bulk export

Look up an airline by IATA code

Send an airline code in the iata parameter of the Airlines API. This example looks up Southwest Airlines using WN. Replace YOUR_API_KEY with your assigned key.

Request · cURL

curl --get 'https://content.airhex.com/api/v3.7.10/airlines/' \
  --data-urlencode 'apikey=YOUR_API_KEY' \
  --data-urlencode 'iata=WN'

Response · JSON excerpt

[
  {
    "iata": "WN",
    "icao": "SWA",
    "marketing_name": "Southwest Airlines",
    ...
  }
]

Abbreviated response. The ellipsis (…) represents additional airline fields omitted here and is not part of the actual JSON response.

View the full Airline Database API reference →

Request parameters

Use these query parameters to look up airline codes or export the directory.

ParameterRequiredDefaultDescription
apikey YesNoneYour assigned API key. Get a free test API key.
iata ConditionalNoneLook up an airline by its two-character IATA code, such as WN.
icao ConditionalNoneLook up an airline by its three-letter ICAO code, such as SWA.
name ConditionalNoneFind airline codes by airline name or partial name.
dump Conditional0Set to 1 to export the complete dataset, subject to the onlyscheduled filter.
response_type NoJSONResponse format: JSON, XML or CSV. CSV triggers a file download.
onlyscheduled No1Set to 1 for scheduled airlines only, or 0 for all airline types.

Provide at least one of iata, icao, name, or dump=1. Setting dump=1 overrides the other lookup parameters.

View all request parameters →

Available data

Use the IATA code to look up an airline and the accompanying fields to display its name, map identifiers and maintain your local records.

FieldTypeExampleDescription
airhex_id Identifier1046Permanent Airhex record identifier. Use it to associate future updates with the same record.
iata StringWNTwo-character IATA airline designator. Codes can contain letters and digits; store them as text.
icao StringSWAThree-letter ICAO airline designator, useful for mapping between code systems.
marketing_name StringSouthwest AirlinesCommonly used airline name for display in your application.
status Integer1Operational status: 1 = active, 0 = defunct, 2 = start-up.

View all available data →

Common implementation tasks

Download the airline code directory

Use dump=1 to export the database. Add onlyscheduled=0 to include all airline types instead of the default scheduled-airline filter. This CSV example can be imported into your own database; retain only records with an IATA code when building a code lookup.

curl --get 'https://content.airhex.com/api/v3.7.10/airlines/' \
  --data-urlencode 'apikey=YOUR_API_KEY' \
  --data-urlencode 'dump=1' \
  --data-urlencode 'onlyscheduled=0' \
  --data-urlencode 'response_type=CSV' \
  --output airlines.csv

Find an IATA code from an airline name

Search with name, then read iata from each returned record. Name searches support partial matching, so review the returned airline identities rather than assuming the first result is the only match.

curl --get 'https://content.airhex.com/api/v3.7.10/airlines/' \
  --data-urlencode 'apikey=YOUR_API_KEY' \
  --data-urlencode 'name=Southwest'

Map an ICAO code to an IATA code

Pass the ICAO designator in icao and read the returned iata field. This helps reconcile airline identifiers from different data sources.

curl --get 'https://content.airhex.com/api/v3.7.10/airlines/' \
  --data-urlencode 'apikey=YOUR_API_KEY' \
  --data-urlencode 'icao=SWA'

What you can build

Flight results and itineraries

Replace airline codes with readable names in booking results, confirmation screens and travel itineraries.

Data matching and reporting

Connect records that use IATA codes with sources that use ICAO codes, keeping airline names available for reports.

Airline selectors

Populate airline dropdowns and search tools from a local directory, with codes and names displayed together.

Frequently asked questions

What is the difference between airline IATA codes, airport codes and ICAO codes?

An IATA airline code is a two-character designator, such as WN for Southwest Airlines, and can include digits. IATA airport codes identify locations and have three letters. ICAO airline codes are a separate three-letter system; Southwest’s ICAO code is SWA.

Can I match airlines from my flight-booking supplier?

If your supplier returns an IATA airline code, pass it in the iata parameter to retrieve the airline name and related reference data. For a supplier that returns ICAO codes, use icao instead. Confirm which code system each supplier field uses before mapping it.

How should I handle marketing and operating airlines?

Use the marketing and operating carrier identifiers supplied with the flight, and look up each carrier separately. You can then display the marketing airline and an “operated by” label where appropriate. This reference endpoint does not determine which carrier operates a particular flight.

Does every airline record have an IATA code?

Do not assume every record has an IATA code. Check for a populated iata field before adding a record to your IATA lookup. Retain airhex_id as the permanent record identifier when maintaining your local directory, rather than relying on an airline code as the permanent key.

How should my integration handle missing or ambiguous matches?

Handle unsuccessful requests separately from lookups that produce no matching airline. Keep the supplier’s original code as a display fallback when you cannot resolve it. Name searches support partial matching, so compare the returned identities and available codes instead of automatically choosing the first record.

Can I download and store the directory in my own database?

Yes, with an appropriate Airline Database license. Use dump=1 to export the directory in JSON, XML or CSV, and set onlyscheduled=0 if you need all airline types. A local copy lets your application resolve airline names without making an API request for every flight result. Confirm the usage rights for your integration when requesting access.

How do I keep airline codes current?

Airhex reviews and updates airline data daily. Refresh your local directory periodically and retain airhex_id and updated when importing records. The Updates API provides a recent change log; use it to monitor changes and retrieve current airline records from the Airlines API. Consult the full Airlines API reference and Updates API documentation when planning your refresh process.

Does this include flight availability, fares or flight status?

No. This endpoint provides airline reference data for identifying and displaying airlines. Obtain availability, fares and individual flight status from your flight supplier. The status field here describes the airline’s operational status, not a flight’s status.

How do I choose which airline types to include?

The default onlyscheduled=1 filter selects scheduled airlines. Use onlyscheduled=0 for all airline types, and inspect status when your application should show only active airlines.

Build your airline IATA code lookup

Turn supplier airline codes into recognizable names across search results, itineraries and passenger information, without maintaining your own code directory.

Airline Database API →

Explore the complete airline dataset, including IATA and ICAO codes, names, operational status, carrier types, alliances, frequent flyer programs, check-in and baggage policy links, logos and brand colors. View all request parameters and response fields, with individual lookups and bulk exports in JSON, XML and CSV.

Airline Alliance API →

Look up airline alliance membership by IATA code, ICAO code or name. Build alliance filters and group airlines in your travel application with Airhex.

Airline Baggage Policy API →

Retrieve airline baggage policy links by IATA code, ICAO code or airline name. Add official baggage information to booking flows and itineraries with Airhex.

Airline Brand Colors API →

Retrieve airline brand colors as hex and RGB values by IATA code, ICAO code or name. Add airline color accents to travel interfaces with the Airhex API.

Airline Frequent Flyer Programs API →

Look up airline frequent flyer program names by IATA code, ICAO code or airline name. Build loyalty program directories and enrich airline profiles with Airhex.

Airline ICAO Codes API →

Look up three-letter ICAO airline codes, match them to airline names and IATA codes, and download the airline directory with the Airhex API.

Airline Metadata API →

Retrieve low-cost carrier flags and airline types, including scheduled, charter, cargo and ACMI. Look up airline metadata by code or name with Airhex.

Airline Online Check-in API →

Retrieve airline online check-in links by IATA code, ICAO code or name. Add online check-in links to itineraries and pre-trip messages with Airhex.

Airline Status API →

Look up airline operational status: active, defunct or start-up. Retrieve status by airline code or name and filter your local airline directory with Airhex.