Endpoint
Example
gstatic.com address that serves the image.
Parameters
string
required
The website domain, such as
example.com or www.example.com. domain_url also works.number
default:"16"
The requested size in pixels, such as
16, 32, 64, or 128. If the site has no icon at that size, Google returns a smaller one.Behavior
- The response is always a PNG, whatever format the site uses.
- The icon can be smaller than
sz. A request for 128 pixels can return a 32-pixel icon, so large sizes can look blurry. - If Google finds no favicon, it returns a
404status with a generic globe icon. An<img>tag still shows the globe. - The service works for public domains only, not for
localhostor IP addresses.
FAQs
Is the Google Favicon API free?
Is the Google Favicon API free?
Yes. It needs no key or account. Google publishes no terms or rate limits for it, so cache the icons on your side.
Why is the icon smaller than the size I asked for?
Why is the icon smaller than the size I asked for?
Google can return only the sizes that the website provides. If a site has a 32-pixel favicon, a request for 128 pixels returns 32 pixels.
Can I use it in production?
Can I use it in production?
Many apps do, but Google does not support it. If you need company logos rather than favicons, use a logo service.
Company logos instead of favicons
A favicon is the small icon that a browser shows in a tab. The Logo.dev CDN returns a company logo from a URL, with these differences:- You can look up a logo by domain, stock ticker, ISIN, crypto symbol, or company name.
- You choose the
sizeand theformat:jpg,png, orwebp. - If Logo.dev has no logo, you get a monogram or a
404, whichever you choose. - It needs a publishable key, which is safe in client code.
Logo.dev CDN
Show company logos by domain, ticker, or name from a plain image URL.