Request parameters
Look up an airline or export the directory, then read lowcost, type and type_code. Use onlyscheduled to control type coverage. The documented endpoint has no lowcost or type_code query parameter; apply those filters to the returned records in your application.
| Parameter | Required | Default | Description |
apikey |
Yes | None | Your assigned API key. Get a free test API key. |
iata |
Conditional | None | Look up an airline by its two-character IATA code, such as UA. |
icao |
Conditional | None | Look up an airline by its three-letter ICAO code, such as UAL. |
name |
Conditional | None | Find airline codes by airline name or partial name. |
dump |
Conditional | 0 | Set to 1 to export the complete dataset, subject to the onlyscheduled filter. |
response_type |
No | JSON | Response format: JSON, XML or CSV. CSV triggers a file download. |
onlyscheduled |
No | 1 | Set 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 →
Common implementation tasks
Download and filter airline classifications
Export with dump=1 and onlyscheduled=0 to include categories beyond scheduled airlines. In your application, select lowcost equal to 1 for low-cost carriers, or a type_code such as 2 for passenger/charter or 8 for cargo. Normalize numeric strings before comparing values, and keep low-cost classification separate from airline type.
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 airline-metadata.csv
Find airline metadata by name
Search with name, confirm the intended airline and read its classification fields. onlyscheduled=0 lets you search beyond scheduled airlines. Partial name matching can return multiple records, so verify their identities before applying labels.
curl --get 'https://content.airhex.com/api/v3.7.10/airlines/' \
--data-urlencode 'apikey=YOUR_API_KEY' \
--data-urlencode 'name=United' \
--data-urlencode 'onlyscheduled=0'
Retrieve classifications using an ICAO code
Use icao when your source provides a three-letter airline designator. This example retrieves United Airlines using UAL. Include onlyscheduled=0 when your lookup needs to cover other operator types.
curl --get 'https://content.airhex.com/api/v3.7.10/airlines/' \
--data-urlencode 'apikey=YOUR_API_KEY' \
--data-urlencode 'icao=UAL' \
--data-urlencode 'onlyscheduled=0'
Frequently asked questions
What does the Airline Metadata API return?
This page covers lowcost, type and type_code within the Airlines API response. They identify the low-cost carrier flag, airline category label and corresponding category code, alongside airline names and identifiers.
What do the lowcost values mean?
1 identifies a low-cost carrier. 0 means the airline record is not flagged as low-cost. This is a carrier classification, not a statement about the price or inclusions of an individual fare. Use your booking supplier’s fare data for baggage allowances and included services.
Can an airline be both scheduled and low-cost?
Yes. Scheduled is an airline category, while lowcost is a separate flag. Use both fields when your application needs scheduled low-cost airlines. Select the category with type_code and the low-cost classification with lowcost.
Which airline types are available?
The documented codes are 1 Scheduled, 2 Passenger/Charter, 3 Railway/Bus/Ferry, 4 Helicopter/Charter, 5 Jet/Charter, 6 Tour, 7 ACMI, 8 Cargo and 9 Others. Use type_code for category filters and type for the supplied label.
How do I retrieve charter or cargo operators?
Set onlyscheduled=0 to include types beyond scheduled airlines. For a directory, export with dump=1 and filter locally for type_code 2 for Passenger/Charter or 8 for Cargo. Helicopter/Charter and Jet/Charter have separate codes, 4 and 5.
Can I pass lowcost or type_code as a query parameter?
Those are response fields, not documented request filters. Retrieve the records you need and filter them in your application. onlyscheduled is the documented request parameter for scheduled-only versus broader type coverage. onlyscheduled defaults to 1. Set it to 0 for broader coverage, then select airline categories explicitly if your directory should exclude railway, bus and ferry records.
Does onlyscheduled=1 mean the airline is active?
No. Airline category and operational status are separate attributes. Read the status field if you need to distinguish active, defunct and start-up airlines.
Can I store airline metadata in my own database?
Yes, with an appropriate Airline Database license. Export in JSON, XML or CSV and retain airhex_id with the classifications. Refresh your local records periodically; Airhex reviews and updates airline data daily.
How should I handle numeric flags and missing values?
Normalize numeric strings before comparing lowcost with 0 or 1. Preserve missing or unexpected values as unknown instead of silently labelling them.