Recently I have been working more and more with HTML and frontend development in general and had the task of loading favicons from various addresses to make links more visually attractive.
Here I came across a hidden Google API to load favicons.
Google Favicon API
Google offers a hidden, central API that returns favicons as jpegs - and in different sizes. I have seen this in Google’s own services, whereby the subsequent image is delivered via gstatic.com; Google’s CDN.
https://www.google.com/s2/favicons?domain=${tld}&sz=${pixel-size}
For my blog, this can look like this:
https://www.google.com/s2/favicons?domain=schwabencode.com&sz=128
where the size is optional and 16 pixels are returned in the standard and fallback cases.
Alternatives
In addition to Google, Icon Horse also offers a functionally identical API
And the search engine operator DuckDuckGo also offers such an API:
Related articles

- 12 min read
Problem Details in ASP.NET Core and .NET 11
builder.Services.AddProblemDetails() registers infrastructure. It does not create an error contract. An ASP.NET Core request can fail during …

- 11 min read
Problem Details in ASP.NET Core and .NET 10
Error responses are part of an API contract. Still, many systems grow them incidentally: one endpoint returns { "error": "not …

- 16 min read
Eine moderne WebAPI - die OData Basics
Was ist OData? Doch zunächst etwas Vorgeschichte Seit es Schnittstellen (API) zum Austausch von Daten gibt, gibt es die Unsicherheit, welche …
Let's Work Together
Looking for an experienced Platform Architect or Engineer for your next project? Whether it's cloud migration, platform modernization or building new solutions from scratch - I'm here to help you succeed.
