https://img.logo.dev/{identifier} in an <img> tag with your publishable key, and the CDN serves the latest logo from its cache. You never host a logo file yourself.
Add a logo to your page
1
Get a publishable key
Get your API keys
Your dashboard has a publishable key for the Logo.dev CDN and a secret key for the Logo.dev API. Every plan includes both.
pk_) is safe in client code. To stop other sites from using it, add domain restrictions.2
Embed the logo
Put the identifier you have in the path and your key in
token:3
Go live
Before you ship, check whether your plan needs an attribution link, and read the rate limits and fair use policy.
Lookup modes
Use the identifier your data already has. Each page covers the notes for that identifier.- By domain: the company’s website, such as
shopify.com. The most direct lookup. - By name: a brand name, such as
Shopify, when you have no domain. - By stock ticker: a symbol such as
AAPL, with suffixes for non-US exchanges. - By ISIN: a security identifier, such as
US0378331005. - By crypto symbol: a token symbol, such as
BTC. - By stock exchange: an exchange code, such as
NYSE. - By market index: an index symbol, such as
SPX.
Choose a format
The default format isjpg. JPG has no transparency, so the logo sits on a white box. For a transparent background, request format=png. For smaller files, request format=webp.
Size it for retina screens
size sets the width and height in pixels, and the logo keeps its aspect ratio. Request the size you display, and add retina=true to get a 2x image for high-density screens:
width and height instead of size.
Match light and dark themes
theme changes the colors of a transparent logo so it stays visible on your background. theme=dark lightens a dark logo for a dark background. theme=light does the reverse. Use it with format=png or format=webp, because a JPG has no transparency. Do not send theme=dark with the default jpg format: the request can return 404.
greyscale=true.
Get the wide logo or the favicon
The CDN serves each company’s square logo. For the wide logo lockup, the brandmark, callGET /v2/brands/brandmark from your server. The CDN does not serve a site’s favicon.
Fallback images
If Logo.dev has no logo for an identifier, the CDN returns a generated monogram. The status is200, or 202 on the first request for a domain Logo.dev has not seen. Either way, your UI shows an image, not a broken one.
To show your own image instead, add fallback=404. The CDN then returns 404 Not Found, and your error handler swaps in your image:
Skip domains that redirect
Some domains reach a brand only through a redirect, such as an old domain that now points to a new company. By default, the CDN follows the redirect and returns the logo of the domain it points to. To treat these domains as having no logo, addredirect=404. The CDN then returns 404 Not Found, whatever fallback is set to:
Parameters
Every lookup mode takes the same query parameters:token, size, width, height, format, theme, greyscale, retina, fallback, and redirect. The Get a logo reference lists each value and default.
Related
- Errors: what each status code from the CDN means.
- Caching: how browsers cache a logo, and how to get a changed one.
- Troubleshooting: a white box, a monogram, or a blurry logo.
- Self-hosting: to store a logo file on your server, use the Logo.dev API with a secret key, not the CDN.