https://github.com/victrme/favicon-fetcher
Favicon fetcher finds favicons and flawlessly fetches them fast
https://github.com/victrme/favicon-fetcher
api cloudflare-workers favicon favicon-grabber
Last synced: 4 months ago
JSON representation
Favicon fetcher finds favicons and flawlessly fetches them fast
- Host: GitHub
- URL: https://github.com/victrme/favicon-fetcher
- Owner: victrme
- License: unlicense
- Created: 2023-02-24T09:47:04.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2025-08-19T05:42:35.000Z (11 months ago)
- Last Synced: 2025-10-31T04:54:46.859Z (8 months ago)
- Topics: api, cloudflare-workers, favicon, favicon-grabber
- Language: TypeScript
- Homepage: https://favicon.victr.me
- Size: 868 KB
- Stars: 40
- Watchers: 2
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# favicon fetcher
Favicon fetcher finds sites favicons and fetches them fast
Test it here: https://favicon.victr.me
## Install
```bash
npm i @victr/favicon-fetcher
```
### Example use
```js
import favicon from '@victr/favicon-fetcher'
window.onload = async function () {
const img = document.getElementById('some-id')
const url = await favicon.url('https://github.com')
img.src = url
}
```
### Export type
```ts
export default {
url: (query: string) => Promise,
img: (query: string) => Promise,
}
```
## As API
### Endpoints
Protocols need to be included in the `:url` query. You can get your favicon as a plaintext url or a blob:
```HTTP
GET /text/:url
```
```HTTP
GET /blob/:url
```
### Cloudflare Workers
```bash
# install
pnpm install
# debug
pnpm dev
```