Google Favicons

Developer Tools API · Works globally · Favicon retrieval · No API key

TL;DR

The Google Favicons API provides easy access to any website's favicon at multiple sizes via Google's cached favicon service. Simply provide a domain name and optional size parameter. Returns the favicon image directly — no parsing or scraping needed. Supports sizes from 16px to 256px. No API key, no rate limits (within reason). Perfect for bookmark managers, link previews, website dashboards, and browser-like interfaces.

Quick start: https://www.google.com/s2/favicons?domain=github.com&sz=64

No API key needed — just make a request!

How to Use This API

1. Get Favicon at Default Size

https://www.google.com/s2/favicons?domain=github.com

2. Get Favicon at Specific Size

https://www.google.com/s2/favicons?domain=github.com&sz=64

3. JavaScript — Display Bookmark Favicons

const sites = ['github.com', 'stackoverflow.com', 'npmjs.com'];

sites.forEach(domain => {
  const img = document.createElement('img');
  img.src = `https://www.google.com/s2/favicons?domain=${domain}&sz=32`;
  img.alt = domain;
  img.title = domain;
  document.getElementById('bookmarks').appendChild(img);
});

4. Python — Batch Favicon Download

import requests

domains = ['github.com', 'gitlab.com', 'bitbucket.org', 'sourceforge.net']
for domain in domains:
    url = f'https://www.google.com/s2/favicons?domain={domain}&sz=64'
    img_data = requests.get(url).content
    filename = f'{domain.replace(".", "_")}.png'
    with open(filename, 'wb') as f:
        f.write(img_data)
    print(f"Saved {filename} ({len(img_data)} bytes)")
GitHub favicon (64px): https://www.google.com/s2/favicons?domain=github.com&sz=64

Frequently Asked Questions

What URL parameters are supported?
domain (required) — the website domain. sz (optional) — icon size in pixels (16, 32, 64, 128, 256). Default is 16px.
What size favicons can I request?
Common sizes: 16, 32, 64, 128, 256. The API returns crisp PNG images at the requested resolution. Larger sizes are scaled from the source favicon.
Does every domain have a favicon?
Most domains have a favicon cached by Google. If a domain has no favicon, the API returns a default globe icon placeholder.
How up-to-date are the cached favicons?
Google periodically recrawls websites and updates its favicon cache. Recent domain or favicon changes may not be reflected immediately.
Can I use this in production applications?
This is Google's public favicon service used internally by Google products. It's free and reliable for reasonable usage volumes.
What format does the response use?
The API returns raw image data (PNG format) directly. Set the response as src on an <img> tag or save the binary response.

API Details

API URL
https://www.google.com/s2/favicons
Documentation
Google Favicons (unofficial)
Category
Developer Tools
Authentication
Not Required
Geographic Coverage
Global

What You Can Build