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

# Logo.dev plugin

> Look up company logos and brand profiles (name, colors, socials, logo files) by domain, ticker, ISIN, crypto symbol or name, search brands by name, and manage brand update webhooks.

Use **Logo.dev** through Corsair: one client, typed API calls, local DB sync.

Connect the Logo.dev **secret key** (`sk_…`). Every operation calls the Logo.dev API (`api.logo.dev/v2`) with it as a Bearer token. The publishable key (`pk_…`) only works on the image CDN, which this plugin does not call; the API answers `401` to it.

Lookups spend API credits: search 1 per 1,000 searches, logo 2, brandmark 3, brand profile 5. Account reads, subscriptions and webhook endpoints are free. Out of credits returns `402`. A brand Logo.dev has not indexed yet comes back as `202` with `data.status` `not_indexed` and `metadata.pending.retry_after_seconds`; retry after that delay (retries are not billed).

Subscriptions and webhook endpoints need a paid plan with webhooks turned on; the free plan answers `403`.

**What you get:**

* 14 typed API operations
* 2 synced entities (`brands`, `images`) for fast `.search()` / `.list()`

## Setup

**1. Install**

```bash npm theme={null}
npm install corsair @corsair-dev/logodev better-sqlite3
npm install --save-dev @types/better-sqlite3
```

```bash yarn theme={null}
yarn add corsair @corsair-dev/logodev better-sqlite3
yarn add --dev @types/better-sqlite3
```

```bash pnpm theme={null}
pnpm install corsair @corsair-dev/logodev better-sqlite3
pnpm install --save-dev @types/better-sqlite3
```

```bash bun theme={null}
bun add corsair @corsair-dev/logodev better-sqlite3
bun add --dev @types/better-sqlite3
```

**2. Add the plugin**

```ts corsair.ts theme={null}
import Database from 'better-sqlite3';
import { createCorsair } from 'corsair';
import { logodev } from '@corsair-dev/logodev';

export const corsair = createCorsair({
	plugins: [
		logodev(),
	],
	database: new Database('corsair.db'),
	kek: process.env.CORSAIR_KEK!,
	multiTenancy: true,
	hub: {
		projectApiKey: process.env.CORSAIR_API_KEY!,
		signingSecret: process.env.CORSAIR_SIGNING_SECRET!,
	},
});
```

With `multiTenancy: true`, scope calls with `corsair.withTenant(id)`. See [Quick start](https://docs.corsair.dev/quick-start.md) for KEK + Hub keys, and [Multi-tenancy](https://docs.corsair.dev/concepts/multi-tenancy.md) for account isolation.

**3. Choose authentication**

> [tab] API Key (Recommended)
>
> Store the Logo.dev API key before the first call: `pnpm corsair setup --plugin=logodev --tenant=acme api_key=<your-key>` (leave out `--tenant` without `multiTenancy`), or pass it as `key` in the plugin options. With Hub, each tenant enters their own key on the connect page. See [API key auth](https://docs.corsair.dev/concepts/api-key).
>
> ```ts theme={null}
> logodev()
> ```
>
> More: [API Key](https://docs.corsair.dev/concepts/api-key)

**4. Connect a tenant**

Mint a connect link and send the tenant to it. Hub hosts the page and delivers the result to your app — see [Connect / OAuth](https://docs.corsair.dev/management/connect).

```ts theme={null}
const { connectUrl } = await corsair.manage.connect.createLink({
	plugin: 'logodev',
	tenantId: 'acme',
});
// redirect the user's browser to connectUrl
```

## Example API calls

**Look up a brand profile by domain**

```ts theme={null}
const tenant = corsair.withTenant('acme');
await tenant.logodev.api.brands.lookup({ domain: 'stripe.com' });
```

**`subscriptions.subscribe`**

```ts theme={null}
const tenant = corsair.withTenant('acme');
await tenant.logodev.api.subscriptions.subscribe({});
```

See the full list on the [API](https://docs.corsair.dev/plugins/logodev/api.md) page.

## Query synced data

Synced entities support `tenant.logodev.db.<entity>.search()` and `.list()`: `brands`, `images`.

See [Database](https://docs.corsair.dev/plugins/logodev/database.md) for filters and operators.

## What's next

> [card] [API reference](https://docs.corsair.dev/plugins/logodev/api.md)
>
> Every `logodev.api.*` operation with input and output types.

> [card] [Database](https://docs.corsair.dev/plugins/logodev/database.md)
>
> Synced entities, search filters, and operators.

> [card] [Connect / OAuth](https://docs.corsair.dev/management/connect)
>
> createLink, Hub delivery, and tenant connect flows.

> [card] [Use with agents](https://docs.corsair.dev/mcp-adapters/mcp-adapters)
>
> Expose this plugin's operations as MCP tools.


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