AirHex airline logos endpoint for IATA and ICAO codes API v3.4 reference

NOTE: This is the endpoint for dynamic airlines logo generation with output as PNG, SVG new!, GIF and JPEG files. Full list of endpoints available here: https://airhex.com/api/

API reference with output as PNG files (SVG/vector manual in the next section)

[PNG logos] Step 1/3: Define your target airline, dimensions and type (rectangular/square) of a logo and build a link.

The structure is as follows:

https://content.airhex.com/content/logos/airlines_AIRLINECODE_WIDTH_HEIGHT_TYPE.png

Where 'AIRLINECODE' is 2 char airline IATA code or 3 char airline ICAO code, 'WIDTH' is the width in pixels, 'HEIGHT' is the height in pixels, 'TYPE' is the type of a logo ('r' for rectangular logos with 3.5:1 sides ratio and 's' for square logos with 1:1 sides ratio)

For example:

https://content.airhex.com/content/logos/airlines_SU_350_100_r.png

Where 'SU' is the airline IATA code, '350' is the width in pixels, '150' is the height in pixels, 'r' is for the rectangular type of a logo (use 's' if you need to get a square logo instead)

How to maintain aspect ratio for rectangular logos

All rectangular logos are designed with 3.5:1 sides ratio, however when requesting images with different sides ratio and to keep original aspect ratio proportions=keep GET parameter should be used

For example:

https://content.airhex.com/content/logos/airlines_SU_700_100_r.png?proportions=keep will output the following:


While https://content.airhex.com/content/logos/airlines_SU_700_100_r.png (without 'proportions=keep') will output:


It's not necessary to use the parameter when requested image sides ratio is 3.5:1, for example 350x100:

https://content.airhex.com/content/logos/airlines_SU_350_100_r.png (without 'proportions=keep') will output:

[PNG logos] Step 2/3: Create MD5 hash of your query using the following structure

airlinecode_width_height_type_apikey

Use the parameters as described in Step 1 and add your API key in the end of this string and then generate MD5 hash of this.

For example, MD5 hash for a rectangular logo of SU (Aeroflot) airlines with the dimensions of 350x100 px and for API key '1234567890' should be created for the following string:

SU_350_100_r_1234567890

The result of MD5 for this string will be as follows:

4d5669b5107fdc240dba0f03961c48e4

[PNG logos] Step 3/3: Combine the requested URL and MD5 hash of your query.

The final format should be as follows:

https://content.airhex.com/content/logos/airlines_AIRLINECODE_WIDTH_HEIGHT_TYPE.png?md5apikey=MD5(AIRLINECODE_WIDTH_HEIGHT_TYPE_APIKEY)

Combine the first part of the query and MD5 hash and build a final deeplink which can be used on your website or mobile app with hotlinking

Complete URL for example above should be as follows:

https://content.airhex.com/content/logos/airlines_SU_350_100_r.png?md5apikey=4d5669b5107fdc240dba0f03961c48e4

To remove watermarks from logos use your API key. Contact us if you don't have one yet.

Also you can find PHP API wrapper on our GitHub page


API reference with output as SVG files (vector) new!

[SVG logos] Step 1/3: Define your target airline, type of a logo (rectangular/square) and build a link.

The structure is as follows:

https://content.airhex.com/content/logos/airlines_AIRLINECODE_TYPE.svg

Where 'AIRLINECODE' is 2 char airline IATA code or 3 char airline ICAO code, 'TYPE' is the type of a logo ('r' for rectangular logos with 3.5:1 sides ratio and 's' for square logos with 1:1 sides ratio)

For example:

https://content.airhex.com/content/logos/airlines_SU_r.svg

Where 'SU' is the airline IATA code and 'r' is for the rectangular type of a logo (use 's' if you need to get a square logo instead)

[SVG logos] Step 2/3: Create MD5 hash of your query using the following structure

airlinecode_type_apikey

Use the parameters as described in Step 1 and add your API key in the end of this string and then generate MD5 hash of this.

For example, MD5 hash for a rectangular logo of SU (Aeroflot) airlines with the dimensions of 350x100 px and for API key '1234567890' should be created for the following string:

SU_r_1234567890

The result of MD5 for this string will be as follows:

5d1d9a577a9cbdcbd5d5b5285cf07870

[SVG logos] Step 3/3: Combine the requested URL and MD5 hash of your query.

The final format should be as follows:

https://content.airhex.com/content/logos/airlines_AIRLINECODE_TYPE.svg?md5apikey=MD5(AIRLINECODE_TYPE_APIKEY)

Combine the first part of the query and MD5 hash and build a final deeplink which can be used on your website or mobile app with hotlinking

Complete URL for example above should be as follows:

https://content.airhex.com/content/logos/airlines_SU_r.svg?md5apikey=5d1d9a577a9cbdcbd5d5b5285cf07870

In order to get a license or to enable vector logos for your account - contact us