error.code of a Logo.dev API error. Message text is for people and can change, so don’t parse it.
If a logo loads with a 200 but looks wrong, such as a white box, a monogram, or a blurry image, see troubleshooting.
Logo.dev CDN status codes
img.logo.dev returns an image on success. An error body is a short JSON object with a msg or an err key, and a docs_url that links the relevant docs page.
Logo.dev API status codes
A failed request toapi.logo.dev returns an error object and a docs_url. target names the parameter at fault when there is exactly one.
A lookup that finds no brand is not an error. It returns
404 inside the normal envelope, with data.status set to not_found, and it is free.
Every API response carries a Request-Id header. Include it when you contact support. See response headers for the rest.
Authentication errors (401)
Authentication runs before the route, so an authentication error has a msg field instead of an error object, on both hosts. That covers every 401, and the 403 for a suspended account or for personal keys turned off by team membership.
401 has one of these causes:
- The key is missing or does not exist.
- The key is the wrong type for the host. See API keys.
- The key is disabled.
- On the CDN, domain restrictions block the request. The message starts with
invalid referrer.
Not found vs. still indexing (202)
An API lookup of a brand that Logo.dev has not indexed yet returns 202, not 404. Logo.dev starts to fetch the brand, which is usually ready within a minute. The response has a Retry-After: 30 header and a metadata.pending object:
reasonisindexingduring a brand’s first crawl. The valueresolvingis reserved for a lookup that is still matching the identifier to a brand.- Retry the same request after
retry_after_seconds. Retries are not billed. Stop afterexpires_in_seconds, which is 5 minutes. - If
webhookistrue, abrand.indexedevent tells you when the lookup settles, so you can stop polling.
404 with data.status set to not_found means no brand matches the identifier.
Missing logos
A CDN lookup with no logo returns200 with a generated monogram, so the image never breaks. With fallback=404, it returns 404 instead, and you show your own image. See fallback images for the pattern.
Out of API credits (402)
An API request returns 402 with the code insufficient_credits when your API credit balance is below the request’s cost. Retrying does not help. Requests work again after you add API credits or your monthly grant renews. See API credits for how to add them.