> ## 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`}
    />
  );
}
```

```tsx Next.js theme={null}
"use client";

import Image, { type ImageLoaderProps } from "next/image";

// next/image needs this loader, or Brandfetch logos won't load
const brandfetchLoader = ({ src, width }: ImageLoaderProps) =>
  `https://cdn.brandfetch.io/domain/${src}/w/${width}/h/${width}?c=${process.env.NEXT_PUBLIC_BRANDFETCH_CLIENT_ID}`;

export function CompanyLogo({ domain }: { domain: string }) {
  return <Image loader={brandfetchLoader} src={domain} alt={`${domain} logo`} width={64} height={64} />;
}
```

```tsx shadcn/ui theme={null}
// npx shadcn@latest add https://brandfetch.com/r/logo.json
import { Logo } from "@/components/ui/logo";

export function Customer() {
  return <Logo domain="nike.com" />;
}
```

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

The [Next.js integration](https://docs.brandfetch.com/integrations/nextjs.md) and [Brandfetch shadcn/ui registry](https://docs.brandfetch.com/integrations/shadcn.md) pages cover each tab in full, including company search and the five other shadcn/ui components.

## 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 Request theme={null}
curl "https://api.brandfetch.io/v2/search/nike?c=BRANDFETCH_CLIENT_ID"
```

```json Response 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:

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

> [!TIP]
>
> Requests for `brandfetch.com` are free, so you can build without spending quota. After that, the free plan includes 100 brand fetches to test with real companies before you upgrade.

The [Brand API overview](https://docs.brandfetch.com/brand-api/overview.md#what-it-returns) shows the full response, and the [playground](https://brandfetch.com/developers/playground) shows what it returns for any brand, with no key needed.

## Which API do I need?

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

> [card] [Real-time indexing](https://docs.brandfetch.com/concepts/real-time-indexing.md)
>
> What happens when you ask for a brand that is not indexed 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.