Skip to content

logo

The brand logo behind any URL. The result is an asset object with url, type, width, height, size, and size_pretty:
const { url } = await microlink.logo('https://github.com', { square: true })
The logo is detected from the page markup — favicons, Apple touch icons, manifest icons, structured data — and falls back to a logo service when the page doesn't declare one. It resolves to null when nothing usable is found.

Options

  • square <boolean> — prefers a square variant of the logo when available, the right pick for avatars and app icons.
Any shared option applies too; palette is the one to know about here.

Examples

A square logo with its dominant colors, ready to tint a card or a favicon background:
const { url, palette, background_color, color } = await microlink.logo('https://stripe.com', {
  square: true,
  palette: true
})
The logo is one of the data fields metadata returns, so when you need the title and description too, one metadata call covers all of them.