Get Icon
Fetch a single icon’s body and metadata from the synced Iconify pack.
HTTP request
HTTP
GET /api/v1/icons/:prefix/:icon
Path parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
prefix |
string |
Yes | Pack prefix (lucide, tabler, …) |
icon |
string |
Yes | Icon name (home, chevron-right, …) |
Names may include hyphens; URL-encode if needed.
cURL
Shell
curl -s "https://svgforge.dev/api/v1/icons/lucide/home"
Response shape
Successful responses return envelope data with at least:
| Field | Description |
|---|---|
body |
Inner SVG markup (path / group content) |
width / height |
View dimensions (normalized) |
| Additional meta | Pack-specific fields when present |
Example (fields may vary slightly by pack):
JSON
{
"code": 0,
"msg": "ok",
"data": {
"body": "<path d=\"...\"/>",
"width": 24,
"height": 24
}
}
Errors: 404 if the pack is not synced or the icon name is unknown; 400 if the name format is invalid.
Framework components
The HTTP detail endpoint returns Iconify-style body data. For ready-made React / Vue / Svelte / Data URI strings, use:
- Web studio / export UI
- MCP
get_iconwithformat— Tools Reference
Rate limits: Rate Limits & Quota.
Pack metadata (raw JSON)
HTTP
GET /api/v1/icons/metadata/:prefix
Returns the Iconify JSON file for the pack (not the {code,msg,data} envelope), with cache headers / ETag suitable for CDN-style clients.