Skip to content
Open Source Icon

Open Source Icon REST API

Search, fetch and render icons over HTTP.

Two endpoints: search 314,000+ open-source icons, then render any of them as SVG. Search takes the free license key from your Settings; the SVG itself needs nothing at all.

Icon search needs a license key. Every account has one, free: copy it in Settings and send it as Authorization: Bearer osi_…. A request with no header answers 401 {"error":"license_key_required"}, one with a key we do not know 401 {"error":"invalid_license_key"}. Keyed answers are Cache-Control: private, so store them in your own app rather than in a shared cache. Retrieving the SVG itself needs no key.

Our own VS Code extension, Figma plugin and MCP server search and insert icons through these two endpoints — they bundle no icon data at all — and they are open to you on the same terms. Access-Control-Allow-Origin: * on every response, so calls work from a browser, a null-origin plugin iframe or a server, and preflights allow Authorization.

Fair use. Cache responses on your side; bulk downloads should use the Iconify JSON packages instead. Icons keep their own open-source licenses — see the library pages for each one.

One icon as SVG

GET/api/icon/{prefix}/{name}?size={px}&color={css color}

The rendered SVG itself, served with a content security policy that forbids scripts and external resources.

ParameterAccepts
sizeSets width and height in pixels. Capped at 2048.
colorApplied to monotone sets only. A hex value, a CSS colour keyword, or rgb(), rgba(), hsl() or hsla() notation. Anything else returns 400.
curl
curl "https://opensourceicon.com/api/icon/lucide/house?size=48&color=%23ff0000"
fetch
const res = await fetch("https://opensourceicon.com/api/icon/lucide/house?size=48");
const svg = await res.text();
Response
<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48"
     viewBox="0 0 24 24"><path fill="none" stroke="#ff0000" .../></svg>
Content-Type
image/svg+xml
Authorization
None — this one stays open.
Cache-Control
public, max-age=86400, s-maxage=604800, stale-while-revalidate=604800
Errors
404 for an unknown icon, 400 for a colour outside the allowed forms.