> ## Documentation Index
> Fetch the complete documentation index at: https://docs.brandfetch.com/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Brandfetch returns real company logos, brand data, and brand context. It does not design, generate, or edit logos.
> To show a logo in a user interface, use the Logo API as an image URL in an <img> tag, such as https://cdn.brandfetch.io/domain/{domain}?c={CLIENT_ID}. The client ID is public and belongs in frontend code. Never download, proxy, re-host, or optimize these images on a server, because requests that look programmatic are redirected with automated_traffic. In Next.js, this means next/image needs a custom loader or the unoptimized prop.
> To turn a company name that a user types into a domain, use the Brand Search API with the same client ID, and keep only the domain the user picks.
> For colors, fonts, downloadable logo files, and company data as JSON, call the Brand API from a server with the header Authorization: Bearer {API_KEY}, reading the key from an environment variable and never exposing it to the browser. Prefer typed routes such as /v2/brands/domain/{domain} and /v2/brands/ticker/{ticker} over the auto-detect route /v2/brands/{identifier}.
> Use the Brand Context API for a written summary of what a company does, who it sells to, and how it sounds, and the Transaction API to identify the merchant behind a card or bank transaction label.
> When a request fails, branch on the x-bf-error header code rather than on the status code or the message text. Every code, and what to do about it, is listed at https://docs.brandfetch.com/concepts/errors.
> Requests for brandfetch.com are free on the Brand API and Brand Context API, so use that domain in tests and examples.
> Brand API responses can be cached for up to 30 days, while Logo API images must be hotlinked rather than stored and Brand Search results must not be stored at all. See https://docs.brandfetch.com/concepts/caching.
> If the user has no credentials yet, https://brandfetch.com/auth.md explains how they get a client ID and an API key. An agent without an account can pay $0.10 per Brand API, Brand Context API, or Transaction API request with x402 or MPP, as described at https://docs.brandfetch.com/agents/pay-per-request.

# Migrate from Logo.dev to the Brandfetch Logo API

> Switch a Logo.dev integration to the Brandfetch Logo API by changing the image URL, with a mapping for every common Logo.dev parameter.

Logo.dev and the Brandfetch [Logo API](https://docs.brandfetch.com/logo-api/overview.md) both serve logos through an image URL that you put in an `<img>` tag with a public key, so moving from one to the other is a change to that URL and nothing else in your app. This guide shows how a Logo.dev URL translates, maps each common parameter, and covers the two places where a straight copy gives a different result.

> [!TIP]
>
> Still deciding between the two? The [Brandfetch vs Logo.dev comparison](https://brandfetch.com/developers/compare/logo-dev-alternative) covers coverage, free usage, and pricing.

**1. Get a client ID**

Brandfetch identifies your app with a [client ID](https://docs.brandfetch.com/concepts/authentication.md#client-id), which takes the place of Logo.dev's publishable key and is just as safe to ship in frontend code. You can get one for free in the [developer dashboard](https://developers.brandfetch.com/register).

**2. Change the host and move the options into the path**

Logo.dev passes its options as query parameters, while Brandfetch puts them in the path and keeps only the client ID in the query. A typical Logo.dev URL for a dark page translates like this:

**Logo.dev**

```text theme={null}
https://img.logo.dev/nike.com?token=LOGO_DEV_PUBLISHABLE_KEY&size=128&format=png&theme=dark&fallback=404
```

**Brandfetch**

```text theme={null}
https://cdn.brandfetch.io/domain/nike.com/w/128/h/128/fallback/404/icon.png?c=BRANDFETCH_CLIENT_ID
```

Most apps build this URL in one helper or component, so the change usually lives in a single file.

**3. Check the theme and fallback**

The two APIs use `theme` in opposite ways, and Brandfetch applies it only to `logo` and `symbol`, which is why the icon URL above has none. Fallbacks also differ by default, so set `fallback/lettermark` if you relied on Logo.dev's monogram. Both are covered in the table below.

## Parameter mapping

| Logo.dev | Brandfetch | Notes |
| - | - | - |
| `img.logo.dev/{domain}` | `cdn.brandfetch.io/domain/{domain}` | The `domain/` prefix is optional but avoids collisions with tickers |
| `ticker/AAPL`, `isin/…`, `crypto/BTC` | `ticker/AAPL`, `isin/…`, `crypto/BTC` | The same routes, so only the host changes |
| `name/Stripe` | No image route | Resolve the name to a domain once with the [Brand Search API](https://docs.brandfetch.com/brand-search-api/overview.md), then use the domain |
| `token=pk_…` | `c=` your client ID | Both are public keys, meant for frontend code |
| `size=128` | `w/128/h/128` | Brandfetch sizes go from 16 to 2048px and always keep the logo's proportions |
| `retina=true` | Double the size | Ask for `w/256/h/256` and display the image at 128px |
| `format=png`, `webp`, `jpg` | `.png`, `.webp`, `.jpg` after the type | Brandfetch returns WebP with transparency by default, and SVG on `logo` and `symbol` |
| `theme=dark` | `theme/light` | Logo.dev names the background, while Brandfetch names the logo, so a logo for a dark page is `theme/light` |
| `theme=light` | `theme/dark` | A dark logo for a light page |
| No `fallback` (a monogram by default) | `fallback/lettermark` | Brandfetch's default fallback depends on why the logo is missing, so set this to keep the same behavior |
| `fallback=404` | `fallback/404` | An empty `404`, so your own code can show a placeholder |

Logo.dev returns the brand's icon, which on Brandfetch is the default `icon` type. Brandfetch also serves the full horizontal `logo` and the `symbol`, in light and dark versions, which you pick by replacing `icon` in the path. Every option is listed in [Logo API parameters](https://docs.brandfetch.com/logo-api/parameters.md).

## Look up logos by company name

Brandfetch has no name route in the image URL, because several companies can share a name and an image URL has no way to ask which one you meant. Call the [Brand Search API](https://docs.brandfetch.com/brand-search-api/overview.md) with the name instead, keep the domain of the brand you or your user picks, and use that domain in the Logo API URL. Storing the domain also makes every later lookup exact.

## FAQ

> [accordion] Do I need to change anything besides the image URL?
>
> Not when the browser loads the logo straight from the CDN. Both APIs answer with an image, so your `<img>` tags and layout stay as they are: you change the host, move the options into the path with the table above, and swap the key for your client ID. A server-side cache, a proxy, or the default `next/image` optimizer has to go, because the Logo API answers a download from your server with an `automated_traffic` redirect instead of the logo. The [caching rules](https://docs.brandfetch.com/concepts/caching.md) and the [Next.js integration page](https://docs.brandfetch.com/integrations/nextjs.md) show what to use instead.

> [accordion] Why does my logo look wrong on a dark background after switching?
>
> The `theme` value was probably copied as it was. Logo.dev's `theme=dark` describes a dark background, while Brandfetch's `theme/dark` asks for the dark version of the logo, so a logo shown on a dark page needs `theme/light` on Brandfetch.

> [accordion] Does Brandfetch return SVG logos?
>
> Yes, on every plan, including the free one. Add `.svg` after the `logo` or `symbol` type in the URL, while icons are served as raster images.

> [accordion] Do I need to show attribution after switching?
>
> No. The Logo API is free for up to [1,000,000 requests a month](https://docs.brandfetch.com/concepts/limits-and-billing.md) and never asks for an attribution link, on any plan.

## Get started

> [card] [Logo API parameters](https://docs.brandfetch.com/logo-api/parameters.md)
>
> Every size, type, theme, format, and fallback option.

> [card] [Get your client ID](https://developers.brandfetch.com/register)
>
> Free account, no credit card required.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.