Airline Database and Codes API
NOTE: This is the endpoint to fetch airlines information. Full list of endpoints available here: https://airhex.com/api/
Don't have an API key for airline database API but want a try?
Get StartedEndpoint description
This endpoint retrieves specific airline details or dumps the entire database with output in JSON, XML or CSV file
HTTP Request
GET https://content.airhex.com/api/v3.7.7/airlines
Request Example
https://content.airhex.com/api/v3.7.7/airlines?apikey=WcPi7fGFMTihmwdNxkn4XYwZtdhKuykg&iata=WN
*Note: At least one of these parameters is required: iata/icao/name/dump
Request ParametersParameter | Required | Value | Type | Default | Description |
---|---|---|---|---|---|
apikey | Required | Any | String | none | API key received from us. Contact us if you don't have one yet. |
iata | Required* (at least one parameter with asterisk required) | 00-ZZ | String | none | IATA code for a specific airline query |
icao | Required* (at least one parameter with asterisk required) | 000-ZZZ | String | none | ICAO code for a specific airline query |
name | Required* (at least one parameter with asterisk required) | Any | String | none | Name for a specific airline or multiple airlines query. Search will be performed for airlines contains name provided with this parameter. |
dump | Required* (at least one parameter with asterisk required) | 0 or 1 | Integer | 0 | Set as "1" to get all entries from the database. Other required parameters will be ignored |
response_type | Optional | JSON or XML or CSV | String | JSON | Types of responses: JSON, XML or CSV (CSV downloads as a file) |
onlyscheduled | Optional | 0 or 1 | Integer | 1 | Query only scheduled airlines. Set as "0" if you also want to get results for cargo, helicopter, private jet airlines and other instances with IATA codes like ACMI airlines |
logo_rectangle_width | Optional | 1 to 1400 | Integer | 700 | Get links to rectangular and tail logos with specified width |
logo_rectangle_height | Optional | 1 to 400 | Integer | 200 | Get links to rectangular and tail logos with specified height |
logo_square_width | Optional | 1 to 400 | Integer | 200 | Get links to square and tail logos with specified width |
logo_square_height | Optional | 1 to 400 | Integer | 200 | Get links to square and tail logos with specified height |
Response Fields
Field | Example | Description |
---|---|---|
updated | 2023-04-07 03:29:34 | Record last updated date |
iata | WN | Airline's official IATA code |
icao | SWA | Airline's official ICAO code |
icao | Parent airline ICAO code in case the airline is subsidiary | |
marketing_name | Southwest Airlines | Airline's marketing name |
full_name | Southwest Airlines Co. | Airline's official name |
status | 1 | Airline's status. 1 - Active, current airline; 0 - Defunct, historical airline; 2 - Start-up airline, pending to commence operations |
type | SCHEDULED | Type of airline/record - Scheduled, Passenger/Charter, Jet/Charter, Railway/Bus/Ferry, Helicopter/Charter, Tour, Cargo, ACMI, Others |
type_code | 1 | Code of airline/record type. 1 - Scheduled, 2 - Passenger/Charter, 3 - Railway/Bus/Ferry, 4 - Helicopter/Charter, 5 - Jet/Charter, 6 - Tour, 7 - ACMI, 8 - Cargo, 9 - Others |
alliance | Name of an airline's alliance if airline is a member of any | |
ffp_name | Rapid Rewards | Name of an airline's frequent flyer program |
lowcost | 1 | Shows if airline is LCC. Set to '1' for low cost carriers |
country_name | United States | Country of airline's HQ, full country name |
country_code_alpha_2 | US | Country of airline's HQ, ISO 3166-1 Alpha-2 country code |
country_code_alpha_3 | USA | Country of airline's HQ, ISO 3166-1 Alpha-3 country code |
founded | 1967 | Year of the airline's foundation |
website | https://www.southwest.com | Link to the airline's website. Starts with http or https |
web_checkin_url | https://www.southwest.com/air/check-in/index.html | Direct link to the airline's web check-in |
mobile_checkin_url | https://mobile.southwest.com/check-in | Direct link to the airline's mobile check-in |
baggage_url | https://www.southwest.com/html/customer-service/baggage/index.html | Link to the airline's baggage allowance and carry-on policy. Starts with http or https |
colorscheme new! | [{"color":[220,28,36],"percent":46,"hex":"#DC1C24","dark":1},{"color":[44,66,153],"percent":22,"hex":"#2C4299","dark":1},{"color":[203,203,203],"percent":21,"hex":"#CBCBCB","dark":0},{"color":[251,172,28],"percent":9,"hex":"#FBAC1C","dark":0},{"color":[43,60,132],"percent":2,"hex":"#2B3C84","dark":1}] | Airline color scheme array, available in JSON response type only. Contains a sub-array of RGB colors, percentage of a specific color on the airline logo, hex value of the color and a boolean darkness value of the color |
logo_rectangle | https://content.airhex.com/content/logos/airlines_WN_700_200_r.png?md5apikey=e742a162ae44192913f94cdc74895b32 | Link to the airline's rectangular logo (3.5:1 side ratio) with dimensions specified in request (or default size if not specified). It already includes the secret md5apikey hash for your API key. Use only this final link for public/hotlinking |
logo_square | https://content.airhex.com/content/logos/airlines_WN_200_200_s.png?md5apikey=cedfc6e88eba47799d33a91523f2a1b9 | Link to the airline's square logo (1:1 side ratio) with dimensions specified in request (or default size if not specified). It already includes the secret md5apikey hash for your API key. Use only this final link for public/hotlinking |
logo_tail | https://content.airhex.com/content/logos/airlines_WN_200_200_t.png?md5apikey=8b855307bc1129996236f1fc65290f27 | Link to the airline's tail/fin logo (1:1 side ratio) with dimensions specified in request (or default size if not specified). It already includes the secret md5apikey hash for your API key. Use only this final link for public/hotlinking |
Response Example (JSON)
[
{
"updated": "2023-04-07 03:29:34",
"iata": "WN",
"icao": "SWA",
"parent_icao": null,
"marketing_name": "Southwest Airlines",
"full_name": "Southwest Airlines Co.",
"status": "1",
"type": "SCHEDULED",
"type_code": "1",
"alliance": null,
"ffp_name": "Rapid Rewards",
"lowcost": "1",
"country_name": "United States",
"country_code_alpha_2": "US",
"country_code_alpha_3": "USA",
"founded": "1967",
"baggage_url": "https:\/\/www.southwest.com\/html\/customer-service\/baggage\/index.html",
"colorscheme": [
{
"color": [
220,
28,
36
],
"percent": 46,
"hex": "#DC1C24",
"dark": 1
},
{
"color": [
44,
66,
153
],
"percent": 22,
"hex": "#2C4299",
"dark": 1
},
{
"color": [
203,
203,
203
],
"percent": 21,
"hex": "#CBCBCB",
"dark": 0
},
{
"color": [
251,
172,
28
],
"percent": 9,
"hex": "#FBAC1C",
"dark": 0
},
{
"color": [
43,
60,
132
],
"percent": 2,
"hex": "#2B3C84",
"dark": 1
}
],
"website": "https:\/\/www.southwest.com",
"web_checkin_url": "https:\/\/www.southwest.com\/air\/check-in\/index.html",
"mobile_checkin_url": "https:\/\/mobile.southwest.com\/check-in",
"logo_rectangle": "https:\/\/content.airhex.com\/content\/logos\/airlines_WN_700_200_r.png?md5apikey=e742a162ae44192913f94cdc74895b32",
"logo_square": "https:\/\/content.airhex.com\/content\/logos\/airlines_WN_200_200_s.png?md5apikey=cedfc6e88eba47799d33a91523f2a1b9",
"logo_tail": "https:\/\/content.airhex.com\/content\/logos\/airlines_WN_200_200_t.png?md5apikey=8b855307bc1129996236f1fc65290f27",
"logo_tail_flipped": "https:\/\/content.airhex.com\/content\/logos\/airlines_WN_200_200_f.png?md5apikey=33d73ff0ba4bae6f807732bcec857daa"
}
]
Response Example (XML)
<?xml version="1.0" encoding="UTF-8"?>
<airlines>
<airline>
<updated>2023-04-07 03:29:34</updated>
<iata>WN</iata>
<icao>SWA</icao>
<parent_icao></parent_icao>
<marketing_name>Southwest Airlines</marketing_name>
<full_name>Southwest Airlines Co.</full_name>
<status>1</status>
<type>SCHEDULED</type>
<type_code>1</type_code>
<alliance></alliance>
<ffp_name>Rapid Rewards</ffp_name>
<lowcost>1</lowcost>
<country_name>United States</country_name>
<country_code_alpha_2>US</country_code_alpha_2>
<country_code_alpha_3>USA</country_code_alpha_3>
<founded>1967</founded>
<baggage_url>https://www.southwest.com/html/customer-service/baggage/index.html</baggage_url>
<website>https://www.southwest.com</website>
<web_checkin_url>https://www.southwest.com/air/check-in/index.html</web_checkin_url>
<mobile_checkin_url>https://mobile.southwest.com/check-in</mobile_checkin_url>
<logo_rectangle>https://content.airhex.com/content/logos/airlines_WN_700_200_r.png?md5apikey=e742a162ae44192913f94cdc74895b32</logo_rectangle>
<logo_square>https://content.airhex.com/content/logos/airlines_WN_200_200_s.png?md5apikey=cedfc6e88eba47799d33a91523f2a1b9</logo_square>
<logo_tail>https://content.airhex.com/content/logos/airlines_WN_200_200_t.png?md5apikey=8b855307bc1129996236f1fc65290f27</logo_tail>
<logo_tail_flipped>https://content.airhex.com/content/logos/airlines_WN_200_200_f.png?md5apikey=33d73ff0ba4bae6f807732bcec857daa</logo_tail_flipped>
</airline>
</airlines>