Iconify API
Iconify API stores all icon data.
API is used to:
- provide icon data on demand for Iconify icon components.
- search icons for Iconify plug-ins.
How does it work?
-
<Icon icon="mdi:home" />
<iconify-icon icon="mdi:alert" />
- Developer passes icon name as attribute for icon component.
API
Icon Names
Browser
-
Component requests data for icons from Iconify API.
API
Icon Data
Browser
-
API sends data for requested icons.
API hosts thousands of icons, but sends only data for icons that were requested.
-
<svg width="1em" height="1em" viewBox="0 0 24 24" ...>...</svg>
<iconify-icon icon="mdi:alert">#shadow-root<svg width="1em" height="1em" viewBox="0 0 24 24" ...>...</svg></iconify-icon>
- Component renders SVG using data retrieved from Iconify API.
Thousands of icons
When you are using an icon font, font contains all icons, even ones you do not need. That limits number of icons that a font can have.
When you are using Iconify icon component that relies on Iconify API, icon component requests data only for icons that are used on the current page. Iconify API sends only data for icons that icon component has requested.
Because icon components do not load icons they do not need, Iconify API can host many icons. Visitors do not waste bandwidth loading icons they do not see.
Iconify public API
By default, Iconify icon components use Iconify public API.
Iconify public API offers over 100 icon sets that include over 100k icons. All icons are from open source icon sets.
To improve loading times, API is hosted on multiple servers in different parts of the world. Icons are usually loaded within 1/10 of a second. Iconify icon components also cache loaded icons in browser cache and/or browser storage, so icon data needs to be loaded only once.
Custom API
API is open source, which means you can host your own API on your servers. That allows you to have full control over servers or to host your own icon sets.
All icons available on Iconify public API are available on GitHub, which means you can easily setup your own Iconify API instead of relying on third party servers.
You can also use Iconify API software to host custom or premium icon sets.
Currently API package does not include search engine. It is in todo list, which is very long because Iconify project is very complex and has no funding, so many things to do and little time to do it. For now search engine functionality is available only at Iconify public API servers.
Documentation
Available documentation for Iconify API:
- Hosting Iconify API explains how to setup API on your server.
- Iconify API providers explains how to use multiple API servers for more icon choices.