All Collections
Assets
Icons
Rendering icons with Icons8 API
Rendering icons with Icons8 API
Elena avatar
Written by Elena
Updated over a week ago

Icons8 makes it possible for you to embed icons into your webpage and render them through our API.
Currently rendering icons requires authentication with an API key, with the exception of free icons (.png under 100px).


There are two ways you can request an icon:

1) By specifying an id of an icon. IDs can be received through our second API as described here and here.

The basic link is as follows:
GET https://api-img.icons8.com/?token=user_token&id=icon_id

This will return an icon with default parameters applied.

You can modify query-parameters by adding them to the link separated by &-character:
token - required - your API key.

icon_id - required - see above.

size - optional - icon will be pixel-perfect if not specified. Both number of pixels (i.e. 512) and a multiplier (2x, 3x, etc.) will work.

format - optional - will output .PNG if not specified. Our renderer supports .PNG, .SVG, .PDF, .GIF, .AEP and .JSON formats.

color - optional - specified in HEX (without #-character) and works for monochrome icons only.


As an example, to get a red 512px HDD .svg icon in Dotty style the request will be:

GET https://api-img.icons8.com/?token=user_token&id=44082&size=512&format=svg&color=FF2400

While a request without the required parameters will return an error, order of the query-parameters is not important.


2) By specifying the style and the name of a particular icon.

Here the parameters are separated by slash:

GET https://api-img.icons8.com/platform/size/color/name.format?token=user_token

token - required - your API key.

name - required - can be received through a search request.

platform - optional - will output iOS7-style icons by default. Style names can be requested via API or seen in the address bar when browsing through styles.

format - optional - will output .PNG if not specified. Our renderer supports .PNG, .SVG, .PDF, .GIF, .AEP and .JSON formats.

color - optional - specified in HEX (without #-character) and works for monochrome icons only.

To get a green 128px Key .svg icon in Material Outlined style the request will be:

GET https://api-img.icons8.com/material-outlined/128/2AE468/key-security.svg?token=user_token

If icon or style name consists of two or more words, use a hyphen to separate. For example: left‐arrow.




Did this answer your question?