Skip to content

Node.js Logo API

Get the logo behind any URL with one HTTP request in Node.js — markup, BIMI and favicon detection merged, with format, dimensions and brand palette.

Get a logo in Node.js

No package and no scraping — the Microlink REST API detects the best logo for any URL and returns it with a single HTTP GET. Here it is with the global fetch that ships with Node.js 18+.
Step 01 · Extract any URL
A few lines with global fetch — no npm package to add. Point it at a domain and read the logo from the JSON response.
logo.js
const params = new URLSearchParams({ url: 'https://stripe.com' })

const { data } = await fetch(`https://api.microlink.io?${params}`)
  .then(res => res.json())

console.log(data.logo.url)         // absolute, hotlink-ready
console.log(data.logo.type)        // 'png'
console.log(data.logo.width)       // 180
console.log(data.logo.size_pretty) // '3.14 kB'
Step 02 · Read the logo fields
URL, format, dimensions and byte size come back in one call — everything an img tag or an avatar component needs.
palette.js
const params = new URLSearchParams({
  url: 'https://stripe.com',
  palette: 'true' // add the brand palette to every detected image
})

const { data } = await fetch(`https://api.microlink.io?${params}`)
  .then(res => res.json())

// Ordered from most dominant color to least
console.log(data.logo.palette) // ['#543CFC', '#DEDAFC', ...]
Step 03 · Render JavaScript pages
Icons injected by client-side JavaScript only exist after the page renders — prerender in a real browser and they are detected too, still one request.
spa.js
const params = new URLSearchParams({
  url: 'https://app.example.com',
  prerender: 'true',          // render JS in a real browser first
  waitForSelector: 'h1'       // detect only when the content exists
})

const { data } = await fetch(`https://api.microlink.io?${params}`)
  .then(res => res.json())

// Icons injected by client-side JavaScript are found too
console.log(data.logo.url)
Step 04 · Hotlink the image directly
Add embed=logo.url and the API URL becomes the image itself — drop it into an img tag or a CSS background with no JSON parsing.
embed.js
const params = new URLSearchParams({
  url: 'https://stripe.com',
  embed: 'logo.url' // the API URL becomes the image itself
})

const logoUrl = `https://api.microlink.io?${params}`

// Drop it straight into an <img> tag — no JSON parsing
console.log(`<img src="${logoUrl}" alt="stripe logo" />`)

Drop it into your framework

An image proxy route, a redirect endpoint, or an avatar payload — the same request becomes your own logo endpoint.
  • Next.js
  • Express
  • Brand Avatar
  • Plain Node.js
import express from 'express'

const app = express()

// GET /logo?url=https://stripe.com — redirect to the hotlink-ready image
app.get('/logo', (req, res) => {
  const params = new URLSearchParams({
    url: req.query.url,
    embed: 'logo.url'
  })

  res.redirect(`https://api.microlink.io?${params}`)
})

Skip the icon-hunting scrapers

Rolling your own means parsing apple-touch-icon, og:logo and JSON-LD per site, checking BIMI DNS records, probing image formats and building a palette pipeline. The API returns the best logo for any page without any of the moving parts.

DIY logo detection

  • Parse apple-touch-icon, og:logo and JSON-LD per site
  • Check BIMI DNS records and favicon fallbacks yourself
  • Probe image formats and dimensions with extra requests
  • JavaScript-injected icons need a headless browser
  • Extract brand palettes with your own image pipeline
  • You build the caching, retries and autoscaling

Microlink for Node.js

  • One HTTP request — global fetch, no npm package to add
  • Markup, BIMI and favicon detection merged for you
  • Format, dimensions and byte size included
  • Brand palette with WCAG-friendly color pairs
  • Hotlink-ready with embed=logo.url
  • Autoscaled fleet with a 99.9% uptime SLA

Built for the way you write Node.js.

A REST API that feels native in Node.js — one call, JSON back, and at home in anything from a script to a serverless function. Read the API overview to go deeper.

  • Three Detection Sources

    Page markup, the BIMI DNS record and the favicon as fallback — the best available asset wins, every time.
  • Zero Dependencies

    Node.js 18+ ships global fetch — the examples work with no npm install and nothing to vendor.
  • Complete Image Metadata

    Format, byte size and exact dimensions come with every logo — no HEAD requests or image probing on your side.
  • Hotlink-Ready

    The logo comes back as an absolute URL — hotlink it directly, or use embed=logo.url and the API URL is the image.
  • Real Browser Detection

    Icons injected by client-side JavaScript are detected too, with prerender=true and waitForSelector.
  • Brand Palette

    Enable palette=true and every detected image gains a dominant-color palette with WCAG-friendly pairs — theme your UI straight from the response.
  • Framework Friendly

    Drop it into Next.js, Express, or an avatar component as a route or a few-line function.
  • Zero Infrastructure

    Managed Headless Chrome, autoscaled and load-balanced. No browser pool, no servers, no patching to maintain.
  • Generous Free Tier

    Sign up for a free API key: 100 requests per month with every Pro feature, no credit card.
  • Three Detection Sources

    Page markup, the BIMI DNS record and the favicon as fallback — the best available asset wins, every time.
  • Zero Dependencies

    Node.js 18+ ships global fetch — the examples work with no npm install and nothing to vendor.
  • Complete Image Metadata

    Format, byte size and exact dimensions come with every logo — no HEAD requests or image probing on your side.
  • Hotlink-Ready

    The logo comes back as an absolute URL — hotlink it directly, or use embed=logo.url and the API URL is the image.
  • Real Browser Detection

    Icons injected by client-side JavaScript are detected too, with prerender=true and waitForSelector.
  • Brand Palette

    Enable palette=true and every detected image gains a dominant-color palette with WCAG-friendly pairs — theme your UI straight from the response.
  • Framework Friendly

    Drop it into Next.js, Express, or an avatar component as a route or a few-line function.
  • Zero Infrastructure

    Managed Headless Chrome, autoscaled and load-balanced. No browser pool, no servers, no patching to maintain.
  • Generous Free Tier

    Sign up for a free API key: 100 requests per month with every Pro feature, no credit card.

Try it live in the playground

Paste a URL and see the detected logo before you write a line of Node.js.

Node.js Logo API FAQ

Everything Node.js developers ask before integrating the Microlink logo API.

Where does the logo come from?

Microlink walks the page markup — apple-touch-icon, Open Graph and JSON-LD — checks the BIMI record in DNS, and falls back to the favicon. The best available asset wins, with its format and dimensions included.

Do I need to install a package?

No. The examples use the global fetch that ships with Node.js 18+. If you prefer the official SDK, the microlink SDK wraps the same API with typed conveniences.

What about icons injected by JavaScript?

Pass prerender=true and the page is rendered in a real browser before detection, so icons injected by React, Vue or any client-side framework are found too. Combine it with waitForSelector to wait for specific content.
Yes. Add embed=logo.url and the API URL becomes the image itself — use it in an img tag or a CSS background with no JSON parsing and nothing to store on your side.

Is there a free tier or do I need an API key?

Yes, and it is free: sign up for an API key and you get 100 requests per month with every Pro feature, no credit card. Add it as x-api-key and start extracting.
When you need more volume, pick a paid plan: same key, bigger quota. See pricing for the limits.
Responses are cached at the edge with a sane default TTL, and you control freshness per request — see the API overview for cache parameters.

Start extracting in Node.js

Sign up for a free API key: 100 requests per month with every Pro feature, no credit card. Send your first request and get logos back in minutes.
Free API key
100 requests/month
No credit card