AirHex airline logos endpoint API v3.3.1 reference

NOTE: This is the endpoint for dynamic airlines logo generation with output as PNG file. Full list of endpoints available here: https://airhex.com/api/
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:

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

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