Open Icon API

The docs site is static, but the Open Icon platform now also has an API layer designed for api.open-icon.org.

Why the API exists

  • expose the icon catalog to external apps
  • search by canonical name or alias
  • deliver raw SVGs from stable canonical routes
  • support best-effort PNG output through Cloudflare image transformations
  • keep the docs and external consumers aligned on one metadata contract

Main endpoints

GET /health
GET /v1/catalog
GET /v1/categories
GET /v1/icons
POST /v1/icons/search
GET /v1/icons/:name
GET /v1/icons/:name.svg
GET /v1/icons/:name.png
GET /v1/packages
GET /v1/packages/:name

Search example

curl "https://api.open-icon.org/v1/icons?query=search&category=ui&page=1&perPage=24"

Search with a JSON payload

Use POST when the search config is too large or awkward for the query string.

curl "https://api.open-icon.org/v1/icons/search" \
  -H "content-type: application/json" \
  -d '{"query":"camera","category":"media","page":1,"perPage":12}'

Icon detail example

curl "https://api.open-icon.org/v1/icons/ui%2Fsearch-m"

SVG with inline transforms

curl "https://api.open-icon.org/v1/icons/ui%2Fsearch-m.svg?color=%23000000&strokeWidth=2"

Docs build integration

When generating this site with Girk, you can point the generated JSON at the deployed API:

OPEN_ICON_API_BASE_URL=https://api.open-icon.org npm --workspace open-icon-org run build

That keeps the docs static while still letting the generated payload reference the production API.