/javascript-api-fork

Simple, reliable JavaScript API to get and embed high quality Favicons from any web site.

Primary LanguageJavaScript

Favicon Kit

Favicon Kit API for JavaScript Developers

Get and embed high quality Favicons from any web site with one simple, reliable API.

About Favicon Kit

Favicon Kit is the easiest way to grab high quality Favicons from any web site and embed them in your own app.

It does all the heavy lifting of fetching Favicons from the world’s websites, and then distributes icons globally for instant, easy and privacy-friendly access.

Here are some of its fabulous features:

Favicon Kit Features

🖼 <img src="faviconkit"> Embed Favicons just like ordinary images.
Always 200 OK Never shows a broken link image – if things go wrong, you get a fallback icon.
💎 Brilliant HDPI Favicons Supports all available icon sizes, from 16 to 1024 pixels and beyond, which makes your app look brilliant on high resolution displays.
📦  Unpacks .ico files We unpack all icon sizes contained in .ico files and convert them to PNGs.
🤓  Compatible Detects favico.ico, Apple Touch icons, web app manifest, social media profile icons, app icons and many more sources
🕶  Privacy Compliant Shield users from leaving unwanted fingerprints on hundreds of web sites
🏎  Hyperfast Delivers icons in way under a second, in most cases grabs new icons in less than two.

API Installation & Usage

Get your free Favicon Kit Account ID

No password needed: sign up or log in to your Dashboard to get your own free account ID.

Add Favicon Kit to your project

npm add @faviconkit/api

Get a Favicon URL

import createFaviconKitApi from '@faviconkit/api'

const faviconkit = createFaviconKitApi({
  account: 'MY-FAVICONKIT-ACCOUNT' // get your account ID from https://faviconkit.com
})

const githubIconUrl = faviconkit.iconUrl('https://github.com', 64)
// -> https://MY-FAVICONKIT-ACCOUNT.faviconkit.com/github.com/64

(Showing a 64×64 pixels icon at 32×32 on-screen size for 2x pixel density, which gives a brilliant appearance on HDPI devices)

Voilá, Favicons!