GetIcon - Favicon Fetcher
Advanced API to fetch the best favicons from websites.
Usage
Get favicon as image:
/img?url=https://google.com
Optional: specify size with size
parameter:
/img?url=https://google.com&size=192
Get favicon information as JSON:
/json?url=https://google.com
Health check endpoint:
/health
Features
- Supports full and partial URLs
- Detects multiple icon types including web app manifests
- Smart icon selection based on quality scoring
- Returns image dimensions and purpose information
- Server-side caching for consistent results
- ETag support for efficient client-side caching
Icon Detection
GetIcon searches for icons in multiple locations:
- Standard favicon.ico in site root
- HTML link tags with rel="icon", "shortcut icon", etc.
- Apple Touch icons
- Web App Manifest icons
- Microsoft Tile images
- Open Graph images (as fallback)
Icon Scoring
Icons are scored based on:
- Format quality (SVG > PNG > ICO > GIF)
- Size (larger icons score higher for high-DPI displays)
- Purpose (maskable icons for Android score higher)