Need a small icon next to a link, a company row, or a search result? The usual trick is a favicon service. Two free ones are everywhere, and neither is an official product.
Google: google.com/s2/favicons
<img src="https://www.google.com/s2/favicons?domain=stripe.com&sz=64" alt="">
szasks for a size; many sites only have a 16 or 32 px icon, so you get an upscaled blur.- When Google has nothing, it returns a generic globe with a 200 status, so you cannot tell a miss from a hit.
- It is undocumented. There are no terms of use and no SLA.
DuckDuckGo: icons.duckduckgo.com/ip3/<domain>.ico
<img src="https://icons.duckduckgo.com/ip3/stripe.com.ico" alt="">
- Returns the site's favicon in ICO format.
- Also undocumented, also no terms or SLA.
Why that matters
Both are fine for an internal dashboard. In a product, an undocumented endpoint can change or start blocking hotlinks without notice, and a 200 globe looks like a bug to your users.
Better: try the brand logo first
Many companies publish a verified square logo for email clients through BIMI, a DNS record that points at an SVG. It is usually the cleanest logo you can get for a domain, and it is public.
https://avatarsapi.com/domain/<domain> tries BIMI first, then falls back to DuckDuckGo and Google favicons, and validates whatever it finds:
<img src="https://avatarsapi.com/domain/stripe.com?size=64" alt="">
- Validated: the candidate must be a real
image/*response under 2 MiB from a public address. - A real miss: if nothing usable exists, you get a 404 with a JSON body (
"code": "ENOTFOUND"), soonerrorcan show your own placeholder. - Cached at the edge for 7 days by default. Starter Projects can set
?ttl=from 1 hour to 28 days; logos change rarely, so?ttl=28dsuits them.
The landing page of avatarsapi.com uses exactly this for its own grid of 72 platform logos.
If you need a full logo database
Favicons and BIMI cover the icon case. If you need wordmarks, dark-mode variants, or lookups by ticker, use a dedicated logo API such as logo.dev or Brandfetch. We compare those in Clearbit Logo API alternatives.
https://avatarsapi.com/github/torvalds in an <img src>. No key, no signup. Read the docs or create a Project.