> ## 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.

# Authentication

> Brandfetch uses a public client ID for the Logo API and Brand Search API, and a secret API key for the rest. Where each one goes.

Brandfetch uses two credentials. A **client ID** identifies your app on public requests that run in the browser, and an **API key** authorizes server-side requests that return brand data. Both live in the [developer dashboard](https://developers.brandfetch.com) and are created with a free account.

| Product | Credential | How to send it | Safe in the browser |
| - | - | - | - |
| [Logo API](https://docs.brandfetch.com/logo-api/overview.md) | Client ID | `?c=BRANDFETCH_CLIENT_ID` on the image URL | Yes |
| [Brand Search API](https://docs.brandfetch.com/brand-search-api/overview.md) | Client ID | `?c=BRANDFETCH_CLIENT_ID` on the request URL | Yes |
| [Brand API](https://docs.brandfetch.com/brand-api/overview.md) | API key | `Authorization: Bearer <api key>` | No |
| [Brand Context API](https://docs.brandfetch.com/brand-context-api/overview.md) | API key | `Authorization: Bearer <api key>` | No |
| [Transaction API](https://docs.brandfetch.com/transaction-api/overview.md) | API key | `Authorization: Bearer <api key>` | No |
| [Brandfetch MCP](https://docs.brandfetch.com/mcp/overview.md) | OAuth, or an MCP token | Sign in from your MCP client, or send the token as a bearer header | No |

## Client ID

The client ID is a public identifier, so it is fine to ship it in HTML, mobile apps, and frontend code. It tells us which app made the request, which is how free usage is counted and kept fair.

```html theme={null}
<img src="https://cdn.brandfetch.io/domain/nike.com?c=BRANDFETCH_CLIENT_ID" alt="Nike logo" />
```

A request without a client ID is refused. Logo API images must also be embedded directly, not downloaded by a script; the [Logo API usage guidelines](https://docs.brandfetch.com/logo-api/overview.md#usage-guidelines) explain why.

## API key

The API key is a secret. Keep it on your server, in an environment variable, and send it as a bearer token:

```bash theme={null}
curl https://api.brandfetch.io/v2/brands/domain/brandfetch.com \
  --header "Authorization: Bearer $BRANDFETCH_API_KEY"
```

Requests for `brandfetch.com` are free on the Brand API, so you can build and test an integration without spending your quota.

Image URLs inside a Brand API response already carry a client ID signed for your key. Use them exactly as returned.

## MCP server

The [Brandfetch MCP server](https://docs.brandfetch.com/mcp/overview.md) signs you in with OAuth when you add it to Claude, Cursor, or another MCP client. For clients without OAuth, or for scripts and CI, create an MCP token in the [Keys and MCP section](https://developers.brandfetch.com/dashboard/keys) of the dashboard and send it as `Authorization: Bearer <token>`.

## Without an account

An agent that has no account can still call the Brand API, Brand Context API, and Transaction API. A request without a credential is answered `402 Payment Required` with a price, and the agent pays it in USDC over x402 or through MPP. [Pay per request](https://docs.brandfetch.com/agents/pay-per-request.md) covers the flow, and [standing access](https://docs.brandfetch.com/agents/overview.md#standing-access) turns one payment into an API key with prepaid credits.


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