Everything you need to integrate 18,000+ icons into your project.
Fetch any icon by its name
https://hylab.vercel.app/api/icons/homeAdd color, size, and format parameters
https://hylab.vercel.app/api/icons/home?color=7c9a82&size=32&format=svgDrop it into your HTML, React, or any framework
<img src="https://hylab.vercel.app/api/icons/home?color=7c9a82" alt="Home" />/api/iconsList all icons with pagination and optional category filter
| Name | Type | Default | Description |
|---|---|---|---|
| page | number | 1 | Page number |
| limit | number | 50 | Items per page (max 100) |
| category | string | — | Filter by category slug |
https://hylab.vercel.app/api/icons?page=1&limit=20&category=navigation/api/icons/:nameGet a single icon by name with optional customization
| Name | Type | Required | Description |
|---|---|---|---|
| name | path | Yes | Icon name (e.g., home, search, heart) |
| Name | Type | Default | Description |
|---|---|---|---|
| color | string | currentColor | Hex color without # (e.g., 7c9a82) |
| size | number | 24 | Size in pixels (1-512) |
| stroke | number | 2 | Stroke width (0.5-4) |
| format | string | svg | Output format: svg, png, or webp |
https://hylab.vercel.app/api/icons/home?color=7c9a82&size=32&format=svg/api/icons/searchSearch icons by name, tags, or category
| Name | Type | Required | Description |
|---|---|---|---|
| q | query | Yes | Search query string |
https://hylab.vercel.app/api/icons/search?q=arrow/api/icons/categoriesList all categories with icon counts
https://hylab.vercel.app/api/icons/categories/api/icons/setsList all icon sets (sources) with counts
https://hylab.vercel.app/api/icons/setsCopy this prompt to any AI coding assistant
Use this prompt to teach any AI agent (Cursor, Copilot, Windsurf, Claude, etc.) how to fetch and use icons from HyLab API in your project.
You are an AI coding assistant that helps developers integrate icons into their projects using the HyLab Icons API.
## HyLab API Reference
Base URL: https://hylab.vercel.app
### Endpoints
1. **Get Icon by Name**
GET /api/icons/:name
- color (query): Hex color without # (e.g., 7c9a82)
- size (query): Size in pixels 1-512 (default: 24)
- stroke (query): Stroke width 0.5-4 (default: 2)
- format (query): svg, png, or webp (default: svg)
- fill (query): true/false - fill icon instead of stroke
2. **Search Icons**
GET /api/icons/search?q=keyword
Returns icons matching name, tags, or category.
3. **List Categories**
GET /api/icons/categories
4. **List Icon Sets**
GET /api/icons/sets
5. **List All Icons (Paginated)**
GET /api/icons?page=1&limit=50&category=navigation
### How to Use
When a developer asks for an icon:
1. Search for the icon using /api/icons/search?q={keyword}
2. Return the full URL: https://hylab.vercel.app/api/icons/{name}?color={color}&size={size}
3. For HTML: <img src="URL" alt="name" />
4. For React/Next.js: Use fetch() or <img> tag with the URL
5. For CSS background: url('URL')
### Example Responses
Developer: "I need a home icon"
Response: https://hylab.vercel.app/api/icons/home?color=7c9a82&size=24
Developer: "Add a search icon to my navbar"
Response: Use this in your component:
<img src="https://hylab.vercel.app/api/icons/search?color=ffffff&size=20" alt="Search" />
Developer: "I need a red heart icon in PNG format"
Response: https://hylab.vercel.app/api/icons/heart?color=ef4444&size=48&format=png
### Available Categories
navigation, action, communication, social, files, media, interface, status, commerce, charts, layout, development, weather, miscellaneous
Always provide the complete, working URL. Never use placeholder domains.Pro Tip
Add this prompt to your project's .cursorrules, AGENTS.md, or .github/copilot-instructions.md file so the AI always knows how to use HyLab.
All API responses include Cache-Control: public, max-age=3600 headers.
CORS is enabled for all origins. No API key or authentication required.
PNG and WebP conversions use Sharp for high-performance image processing on the server.