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

# Quickstart

> Show a company logo with the Brandfetch Logo API in a minute, then fetch the full brand from your server with the Brand API.

This guide gets you from zero to a working integration. You will show a logo in the browser, which is free and needs only a client ID, and then fetch full brand data from your server with an API key.

## 1. Create a free account

Register in the [developer dashboard](https://developers.brandfetch.com/register). You get two credentials, and each one belongs in a different place:

| Credential | Used by | Where it goes |
| - | - | - |
| **Client ID** | Logo API, Brand Search API | Frontend code. It is public, like a publishable key. |
| **API key** | Brand API, Brand Context API, Transaction API | Your server only. Keep it in an environment variable. |

[Authentication](https://docs.brandfetch.com/concepts/authentication.md) explains both in detail.

## 2. Show a logo

The Logo API is a URL, so the whole integration is an `<img>` tag. Replace `BRANDFETCH_CLIENT_ID` with your client ID and open the page:

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

```jsx React theme={null}
export function CompanyLogo({ domain }) {
  return (
    <img
      src={`https://cdn.brandfetch.io/domain/${domain}?c=${process.env.NEXT_PUBLIC_BRANDFETCH_CLIENT_ID}`}
      alt={`${domain} logo`}
    />
  );
}
```

When the company updates its logo, the image behind the same URL updates too, so there is nothing to re-sync. You can ask for a specific type, theme, size, or format with [Logo API parameters](https://docs.brandfetch.com/logo-api/parameters.md).

## 3. Turn a company name into a domain

Users type company names, not domains. The Brand Search API matches a name to likely brands, each with its domain and icon, which is what you need for a company autocomplete:

```bash theme={null}
curl "https://api.brandfetch.io/v2/search/nike?c=BRANDFETCH_CLIENT_ID"
```

```json theme={null}
[
  {
    "name": "Nike",
    "domain": "nike.com",
    "claimed": true,
    "icon": "https://cdn.brandfetch.io/id_0dwKPKT/w/128/h/128/fallback/lettermark/icon.webp?c=...",
    "brandId": "id_0dwKPKT"
  }
]
```

Pass the `domain` to the Logo API or the Brand API.

## 4. Fetch full brand data

When you need more than a logo, such as colors, fonts, or company information, call the Brand API from your server with your API key. Requests for `brandfetch.com` are free, so you can build without spending quota:

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

```javascript JavaScript theme={null}
const res = await fetch("https://api.brandfetch.io/v2/brands/domain/brandfetch.com", {
  headers: { Authorization: `Bearer ${process.env.BRANDFETCH_API_KEY}` },
});
const brand = await res.json();

console.log(brand.name, brand.colors, brand.fonts);
```

```python Python theme={null}
import os, requests

res = requests.get(
    "https://api.brandfetch.io/v2/brands/domain/brandfetch.com",
    headers={"Authorization": f"Bearer {os.environ['BRANDFETCH_API_KEY']}"},
)
brand = res.json()

print(brand["name"], brand["colors"], brand["fonts"])
```

The [Brand API overview](https://docs.brandfetch.com/brand-api/overview.md#what-it-returns) shows the full response. The free plan includes 100 brand fetches, which is enough to test with real companies before you upgrade.

## Which API do I need?

| You have | You want | Use |
| - | - | - |
| A domain, ticker, or ISIN | A logo in your UI | [Logo API](https://docs.brandfetch.com/logo-api/overview.md) |
| A company name | Matching brands and their domains | [Brand Search API](https://docs.brandfetch.com/brand-search-api/overview.md) |
| A domain, URL, email, ticker, ISIN, or crypto symbol | Logos, colors, fonts, and company data as JSON | [Brand API](https://docs.brandfetch.com/brand-api/overview.md) |
| A domain, email, or URL | What the company does, who it sells to, and how it sounds, written for an LLM | [Brand Context API](https://docs.brandfetch.com/brand-context-api/overview.md) |
| A card or bank transaction label | The merchant behind it | [Transaction API](https://docs.brandfetch.com/transaction-api/overview.md) |
| An AI assistant | Brand data inside Claude, Cursor, or Codex | [MCP server](https://docs.brandfetch.com/mcp/overview.md) |

## Next steps

> [card] [Build with AI](https://docs.brandfetch.com/build-with-ai.md)
>
> Give your coding assistant the docs and a starting prompt.

> [card] [Use cases](https://docs.brandfetch.com/use-cases/overview.md)
>
> Complete builds such as onboarding, autocomplete, and transaction enrichment.

> [card] [Real-time indexing](https://docs.brandfetch.com/concepts/real-time-indexing.md)
>
> What happens when you ask for a brand we have not seen yet.

> [card] [Limits and billing](https://docs.brandfetch.com/concepts/limits-and-billing.md)
>
> Free allowances, quotas, and throughput for each API.


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