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

# Build with AI

> Connect the Brandfetch docs and the Brandfetch API to Claude Code, Cursor, Codex, or VS Code, and start your integration from a ready prompt.

If you write your integration with an AI coding tool, this page gives it what it needs to get the integration right the first time: the docs as context, the API as a tool, and a prompt to start from.

There are two different things you can connect, and they are easy to confuse:

| | What it gives your AI | URL |
| - | - | - |
| **Docs MCP server** | Search and read these docs while it writes your integration | `https://docs.brandfetch.com/mcp` |
| **Brandfetch MCP server** | Live brand data: search brands, fetch logos, colors, fonts, and brand context | `https://mcp.brandfetch.io/mcp` |

Connect the docs server when you are building with Brandfetch. Connect the Brandfetch server when your assistant needs brand data itself, such as making a deck in a client's colors.

## Give your AI the docs

> [tab] Claude Code
>
> ```bash theme={null}
> claude mcp add brandfetch-docs --transport http https://docs.brandfetch.com/mcp
> ```

> [tab] Cursor
>
> Add this to `.cursor/mcp.json`:
>
> ```json theme={null}
> {
>   "mcpServers": {
>     "brandfetch-docs": { "url": "https://docs.brandfetch.com/mcp" }
>   }
> }
> ```

> [tab] Codex
>
> ```bash theme={null}
> codex mcp add brandfetch-docs --url https://docs.brandfetch.com/mcp
> ```

> [tab] VS Code
>
> Add this to `.vscode/mcp.json`:
>
> ```json theme={null}
> {
>   "servers": {
>     "brandfetch-docs": { "type": "http", "url": "https://docs.brandfetch.com/mcp" }
>   }
> }
> ```

If your tool does not support MCP, give it a file instead:

* [`docs.brandfetch.com/llms.txt`](https://docs.brandfetch.com/llms.txt) lists every page with a one-line summary.
* [`docs.brandfetch.com/llms-full.txt`](https://docs.brandfetch.com/llms-full.txt) is the full documentation in one Markdown file.
* Any page is available as Markdown by adding `.md` to its URL, for example [`/brand-api/overview.md`](https://docs.brandfetch.com/brand-api/overview.md).
* The menu at the top of every page copies it as Markdown, opens it in ChatGPT, Claude, Cursor, or VS Code, or connects the docs MCP server.

## Start from a prompt

Paste this into your coding assistant and edit the first line to describe what you are building.

```text Prompt theme={null}
I'm adding company logos and brand data to my app with Brandfetch.
<describe what you're building, e.g. "show the user's company logo and colors after they sign up with a work email">

Before writing code, read https://docs.brandfetch.com/llms.txt and the pages it links that match my task.

Follow these rules:
- Logos in the UI: use the Logo API as an <img> URL, https://cdn.brandfetch.io/domain/{domain}?c={CLIENT_ID}. The client ID is public and safe in frontend code. Never download or proxy these images server-side.
- Company name to domain (autocomplete): use the Brand Search API with the client ID.
- Full brand data (colors, fonts, company info): call the Brand API from the server only, with Authorization: Bearer {API_KEY} read from an environment variable.
- Use typed routes such as /v2/brands/domain/{domain}, not auto-detection.
- Handle errors by the x-bf-error header code, not the status alone.
- Test with brandfetch.com, which is free on the Brand API.
```

Every [use case](https://docs.brandfetch.com/use-cases/overview.md) page also ends with a prompt tailored to that build.

## Give your AI brand data

To let Claude, Cursor, Codex, or your own agent look up brands while it works, connect the [Brandfetch MCP server](https://docs.brandfetch.com/mcp/overview.md). It signs you in with OAuth and exposes tools for brand search, brand data, brand context, transaction enrichment, and logo URLs.

```bash Claude Code theme={null}
claude mcp add brandfetch --transport http https://mcp.brandfetch.io/mcp
```

The [MCP setup guide](https://docs.brandfetch.com/mcp/overview.md#setup) covers Claude, Codex, Cursor, VS Code, and other clients.

## Agents without a human

An autonomous agent can discover Brandfetch, get access, and pay without anyone signing up:

* [`brandfetch.com/agent-onboarding/SKILL.md`](https://brandfetch.com/agent-onboarding/SKILL.md) is an agent skill that walks through choosing an API, getting a credential, and making the call.
* [Pay per request](https://docs.brandfetch.com/agents/pay-per-request.md) lets an agent pay \$0.10 per Brand API, Brand Context API, or Transaction API call with x402 or MPP.
* [Discovery](https://docs.brandfetch.com/agents/discovery.md) lists every machine-readable document Brandfetch publishes, including the API catalog and MCP server card.


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