favicon API
Get any website's favicon with one URL. Fast, simple, and free on Cloudflare.
https://favicons.pug.sh/github.com
⚡ Edge cache
🗄️ 30-day TTL
🔓 CORS open
💸 Free tier
How to use
Hit the endpoint with any domain:
GET https://favicons.pug.sh/:domain
https://favicons.pug.sh/google.com
https://favicons.pug.sh/linear.app
https://favicons.pug.sh/github.com
How it works
- 1 Edge cache lookup
- 2 R2 storage lookup
- 3 Fetch from Google → DuckDuckGo
- 4 Store & cache for next time
Deploy it yourself
- Install dependencies —
bun install - Create R2 bucket —
bunx wrangler r2 bucket create favicons - Deploy —
bun run deploy
✨ Basically free
Self-host it for zero software cost — everything here is open source: Hono, Wrangler, Vite.
Cloudflare's free tier gives you 100,000 requests per day and 10 GB of R2 storage with 1 million reads per month. A personal favicon API sits well within those limits — you'll never pay a cent.