Favicon API

FREE Extract favicons from any website. No signup required.

Try It

Endpoints

MethodEndpointDescription
GET/favicon?url=...Get favicon for a URL or domain
GET/health/faviconHealth check

Parameters

ParamTypeRequiredDescription
urlstringYesURL or domain (e.g. github.com)
sizeintNoResize to NxN pixels (16-512)

Examples

# Get favicon (original size)
curl "https://forge-node.tail2b516d.ts.net/favicon?url=github.com" -o favicon.ico

# Get 64x64 PNG
curl "https://forge-node.tail2b516d.ts.net/favicon?url=github.com&size=64" -o favicon.png

# Use in HTML
<img src="https://forge-node.tail2b516d.ts.net/favicon?url=github.com&size=32">

How It Works

  1. Parses the target page HTML for <link rel="icon"> tags
  2. Falls back to common paths (/favicon.ico, /apple-touch-icon.png)
  3. Final fallback to Google's favicon service
  4. Optionally resizes to requested dimensions (PNG output)
  5. Results cached for 1 hour

Response

Returns the favicon image directly with appropriate Content-Type header. If size is specified, output is always PNG.

404 if no favicon found for the URL.