cc.me / Favicons

Favicons.

GET /icon?url=<url> returns the favicon of any site as an image, served with an open CORS policy so any page — a dashboard, a link list, found.as — can embed it directly. Results are cached, and a missing favicon is an honest 404, never a placeholder.

Use

Embed it as an image. The url value must be URL-encoded.

GET /icon?url=https%3A%2F%2Fexample.com
<img src="https://cc.me/icon?url=https%3A%2F%2Fexample.com"
     width="16" height="16" alt="">

The response is the raw image (image/x-icon, image/png, image/svg+xml, …) with Cache-Control: public, max-age=604800. Handle misses on the client:

<img src="https://cc.me/icon?url=https%3A%2F%2Fexample.com"
     onerror="this.replaceWith(myFallback())">

Behavior

Errors

400
Missing or malformed url, a non-http(s) scheme, or a host that is a disallowed literal IP.
404
No favicon could be found for the origin. Substitute your own icon client-side.
502
The cache lookup failed. Safe to retry.