Docs › Network and contact checks
Website icons API
The icon of any website as a square PNG, for lists of links and bookmarks.
Give a domain and get the icon the site names for itself: its Apple touch icon, the icons in its web app manifest, its favicon. The best one is fetched once, drawn again here as a square PNG of the size asked and kept in memory, so the next request is served without asking the site. SVG icons are not used. A site without a usable icon, or one that cannot be reached, gets an initials tile marked with the X-Logo-Fallback: monogram header, so an <img> tag always shows something. For listed Indian companies, the company logos API has better artwork.
Icon for a website
GET/v1/icon/{domain}
The X-Icon-Source header names the file the icon was drawn from, the first time it is fetched. An icon already fetched counts as 1 request against the rate limit; one that has to be fetched counts as 20.
The answer returns the image itself; errors are JSON as everywhere else.
| Parameter | Description |
|---|---|
domainpath, required | Domain name; a .png suffix is allowed. |
sizequery | Width and height in pixels, 16 to 256. Default 64. |
curl
curl -o picture.svg "https://api.dharun.dev/v1/icon/github.com?utm_medium=docs"HTML
<img src="https://api.dharun.dev/v1/icon/github.com?utm_medium=docs" alt="Icon for a website">Result
Using an AI assistant? Connect the MCP server and it can call this API by itself.