Tutorials

How to Fetch Any Website Favicon via API

Learn how to grab any website favicon with a single URL — perfect for link previews, directories, dashboards, and browser extensions.

FaviconHub Team

Author

July 26, 20264 min read read

Building a bookmark manager, a link directory, or a dashboard? You need favicons for arbitrary domains. FaviconHub makes this a one-liner.

The simplest call

Just request the domain as a path:

GET https://faviconhub.app/github.com

The response is the icon bytes with the correct Content-Type, so it works directly in an image tag.

Getting a larger icon

Add the larger query parameter for a higher-resolution version:

html
<img src="https://faviconhub.app/api/favicon/stripe.com?larger=true" alt="Stripe" />

FAQ

Is the API free?

Yes, the icon endpoint is free and CDN-cached for 24 hours.

What happens if a site has no favicon?

FaviconHub returns a clean generated letter-icon fallback so your UI never shows a broken image.

Tags:faviconapitutorial

Written by

FaviconHub Team

Building the free favicon API, generator and converters at FaviconHub — and writing about favicons, icons and web branding.

How to Fetch Any Website Favicon via API · FaviconHub