Your script needs to grab 50 site icons for a dashboard, and you don't want to host them. A public favicon API solves this in two lines of code, but which one? The DuckDuckGo favicon API has been quietly doing this job for years, sitting alongside Google's S2 service and direct /favicon.ico fetches.

Each option returns a different file format, behaves differently under load, and fails differently when a site has no icon. Picking the wrong one means broken thumbnails or mysterious 404s in your logs.

Quick Comparison: DuckDuckGo Favicon API vs Alternatives

CriterionDuckDuckGoGoogle S2Direct /favicon.ico
Endpoint patternicons.duckduckgo.com/ip3/{domain}.icos2.googleusercontent.com/s2/favicons?domain={domain}{site}/favicon.ico
Return formatICO onlyPNG (16x16 default)Whatever site serves
Default sizeMulti-size ICO container16x16 (sz=64 max)Site-defined
Rate limits documentedNo official docsNo official docsPer-site CORS / server
CORS friendlyYes (with caveats)YesUsually no
Proxy / privacy layerYes (DuckDuckGo proxy)Yes (Google proxy)None
Fallback when missingReturns 404Returns default globe404 or HTML error
Best forTab-style icons, ICO needsSmall thumbnails, SERP parityExact source asset

How the DuckDuckGo Favicon API Actually Works

The endpoint is dead simple: https://icons.duckduckgo.com/ip3/example.com.ico. DuckDuckGo fetches the site's real favicon on its own infrastructure, converts it to an ICO container if needed, and serves it from their CDN. You never hit the origin server, which dodges most CORS walls.

This proxy approach means the URL also acts as a privacy-preserving fetch. Your visitors' browsers don't directly contact the target site just to render an icon. That's the same trick Google's s2.googleusercontent.com plays, and it's why both endpoints work in <img> tags from any origin without extra headers.

Format limitations

The biggest gotcha: DuckDuckGo only returns ICO. If you need a crisp 64x64 PNG for an iOS-style list, you'll need to convert it. Our PNG to ICO conversion guide covers the reverse direction, but the same tools handle both. For projects where ICO works fine — desktop browser tabs, legacy <link rel='icon'> fallbacks — DuckDuckGo is genuinely the most hands-off choice.

When DuckDuckGo Favicon API Wins

When Google S2 Is the Better Pick

When Direct /favicon.ico Still Makes Sense

For a single, trusted site — your own CDN, a partner's site, a known good source — fetching the favicon directly gives you the original asset at full resolution. You get SVG, multi-resolution ICO, animated PNG, whatever the site actually serves. The trade-off is CORS: most sites won't send the headers your browser needs, so this only works server-to-server, not client-side.

If you're doing bulk fetching, the lack of rate limit documentation is a real risk. Some origins will 429 you after 50 requests, others won't. The public APIs absorb that risk for you, which is the entire reason they exist.

Recommendation

For most client-side projects where you need a working icon in a browser tab or list view, the DuckDuckGo favicon API is the right default when you want ICO. Pair it with our free favicon generator if you also need to ship your own icons. For PNG thumbnails and Google-SERP-parity results, Google's S2 endpoint is faster and more predictable. Reserve direct /favicon.ico fetches for trusted, single-domain use where you need the full-resolution source file.

No matter which API you pick, cache the result. Browser favicon fetches are notoriously sticky, and your server will thank you for not hammering DuckDuckGo's CDN on every page load.

Check the documented requirements

The HTML Standard defines rel='icon' as the link relationship for an icon representing the current page.