### Quickstart Guide for Logo.dev Integration
Source: https://github.com/logo-dev/docs.logo.dev.git/blob/main/introduction.mdx
This snippet shows how to quickly integrate Logo.dev into your application by calling the image CDN with your publishable API key as a token parameter.
```mdx
import Quickstart from "/snippets/quickstart.mdx";
```
--------------------------------
### Start Local Development Server
Source: https://github.com/logo-dev/docs.logo.dev.git/blob/main/README.md
Navigate to the project root containing docs.json and start the local development server using the Mintlify CLI.
```bash
mint dev
```
--------------------------------
### Example: Looking up "sweetgreen"
Source: https://github.com/logo-dev/docs.logo.dev.git/blob/main/brand-search/introduction.mdx
This example demonstrates how to perform a brand search for a specific company name, 'sweetgreen', using curl.
```bash
curl --header "Authorization: Bearer LOGO_DEV_SECRET_KEY" "https://api.logo.dev/search?q=sweetgreen"
```
--------------------------------
### Install Mintlify CLI
Source: https://github.com/logo-dev/docs.logo.dev.git/blob/main/README.md
Install the Mintlify CLI globally using npm. This tool is used for previewing documentation locally and managing deployments.
```bash
npm install -g mint
```
--------------------------------
### Fetch Company Logo in Python
Source: https://github.com/logo-dev/docs.logo.dev.git/blob/main/migrations/clearbit.mdx
Example of how to fetch a company logo using the requests library in Python. Requires the 'requests' library to be installed.
```python
import requests
def get_company_logo(domain):
url = f"https://img.logo.dev/{domain}?token=LOGO_DEV_PUBLISHABLE_KEY"
response = requests.get(url)
return response.content
```
--------------------------------
### Example Describe API Request
Source: https://github.com/logo-dev/docs.logo.dev.git/blob/main/describe/introduction.mdx
This example shows how to use cURL to look up brand data for 'sweetgreen.com'. Ensure your Authorization header contains your secret key.
```bash
curl --header "Authorization: Bearer LOGO_DEV_SECRET_KEY" "https://api.logo.dev/describe/sweetgreen.com"
```
--------------------------------
### Image CDN URL Examples
Source: https://github.com/logo-dev/docs.logo.dev.git/blob/main/skill.md
Examples of how to construct URLs for the Image CDN using different lookup modes like domain, stock ticker, crypto symbol, ISIN, and brand name. These are used client-side.
```url
https://img.logo.dev/:domain?token=pk_...
https://img.logo.dev/ticker/:symbol?token=pk_...
https://img.logo.dev/crypto/:symbol?token=pk_...
https://img.logo.dev/isin/:isin?token=pk_...
https://img.logo.dev/name/:brand?token=pk_...
```
--------------------------------
### Brand Search with Typeahead Strategy
Source: https://github.com/logo-dev/docs.logo.dev.git/blob/main/brand-search/introduction.mdx
This example shows how to use the default 'typeahead' strategy for brand search, which is suitable for autosuggest and exploratory typing. It queries for brands starting with 'fa'.
```bash
curl --header "Authorization: Bearer LOGO_DEV_SECRET_KEY" \
"https://api.logo.dev/search?q=fa"
```
--------------------------------
### Fetch Company Logo in Ruby
Source: https://github.com/logo-dev/docs.logo.dev.git/blob/main/migrations/clearbit.mdx
Example of how to fetch a company logo using Ruby's Net::HTTP library.
```ruby
require 'net/http'
def get_company_logo(domain)
uri = URI("https://img.logo.dev/#{domain}?token=LOGO_DEV_PUBLISHABLE_KEY")
Net::HTTP.get(uri)
end
```
--------------------------------
### Example Implementation with Logos and Attribution
Source: https://github.com/logo-dev/docs.logo.dev.git/blob/main/platform/attribution.mdx
This HTML snippet demonstrates how to display logos from Logo.dev and include the required attribution link. Ensure your production site is live and publicly accessible.
```html
Logos provided by Logo.dev
```
--------------------------------
### Next.js Environment Variable Setup
Source: https://github.com/logo-dev/docs.logo.dev.git/blob/main/GUIDELINES.md
Configure Next.js applications for client-side usage of the publishable key by prefixing the environment variable with `NEXT_PUBLIC_`.
```bash
NEXT_PUBLIC_LOGO_DEV_PUBLISHABLE_KEY=pk_xxxxxxxxxxxx
```
--------------------------------
### Image CDN with Token Parameter
Source: https://github.com/logo-dev/docs.logo.dev.git/blob/main/GUIDELINES.md
Example demonstrating the correct inclusion of the `token` parameter for the image CDN. The `token` parameter is required for authentication with a publishable key.
```html
```
--------------------------------
### Fetch Company Logo in PHP
Source: https://github.com/logo-dev/docs.logo.dev.git/blob/main/migrations/clearbit.mdx
Example of how to fetch a company logo using PHP's file_get_contents function.
```php
function getCompanyLogo($domain) {
$url = "https://img.logo.dev/{$domain}?token=LOGO_DEV_PUBLISHABLE_KEY";
return file_get_contents($url);
}
```
--------------------------------
### Environment Variable Setup
Source: https://github.com/logo-dev/docs.logo.dev.git/blob/main/GUIDELINES.md
Set these environment variables to configure your application with Logo.dev API keys. Use `pk_` for publishable keys and `sk_` for secret keys.
```bash
LOGO_DEV_PUBLISHABLE_KEY=pk_xxxxxxxxxxxx
LOGO_DEV_SECRET_KEY=sk_xxxxxxxxxxxx
```
--------------------------------
### Example Bitcoin Logo URL
Source: https://github.com/logo-dev/docs.logo.dev.git/blob/main/logo-images/crypto.mdx
Direct URL to fetch the Bitcoin logo. Ensure you replace LOGO_DEV_PUBLISHABLE_KEY with your valid key.
```html
https://img.logo.dev/crypto/btc?token=LOGO_DEV_PUBLISHABLE_KEY
```
--------------------------------
### Logo.dev Authenticated URL
Source: https://github.com/logo-dev/docs.logo.dev.git/blob/main/migrations/clearbit.mdx
Example of an authenticated URL for Logo.dev, including the token parameter with your publishable key.
```bash
https://img.logo.dev/:domain?token=LOGO_DEV_PUBLISHABLE_KEY
```
--------------------------------
### Display Company Logo in HTML
Source: https://github.com/logo-dev/docs.logo.dev.git/blob/main/migrations/clearbit.mdx
Example of how to display a company logo using an HTML img tag with Logo.dev authentication.
```html
```
--------------------------------
### Display Company Logo in Swift (iOS) with AsyncImage
Source: https://github.com/logo-dev/docs.logo.dev.git/blob/main/migrations/clearbit.mdx
Example of how to display a company logo in a SwiftUI view using AsyncImage. Includes placeholder and resizing capabilities.
```swift
import SwiftUI
struct CompanyLogo: View {
let domain: String
var body: some View {
AsyncImage(url: URL(string: "https://img.logo.dev/\(domain)?token=LOGO_DEV_PUBLISHABLE_KEY")) { image in
image
.resizable()
.aspectRatio(contentMode: .fit)
} placeholder: {
ProgressView()
}
.frame(width: 128, height: 128)
}
}
// Using URLSession for direct download
func downloadCompanyLogo(domain: String) async throws -> Data {
let url = URL(string: "https://img.logo.dev/\(domain)?token=LOGO_DEV_PUBLISHABLE_KEY")!
let (data, _) = try await URLSession.shared.data(from: url)
return data
}
```
--------------------------------
### Search API Response Example
Source: https://github.com/logo-dev/docs.logo.dev.git/blob/main/skill.md
A sample JSON response from the Search API, showing an array of brand objects with their names and domains.
```json
[
{ "name": "sweetgreen", "domain": "sweetgreen.com" },
{ "name": "Sweet Greens Healthy Restaurant", "domain": "sweetgreens.ae" }
]
```
--------------------------------
### Brand Search with Exact Match Strategy
Source: https://github.com/logo-dev/docs.logo.dev.git/blob/main/brand-search/introduction.mdx
This example demonstrates how to use the 'match' strategy for brand search, which prioritizes exact or near-exact name matches. It queries for brands related to 'fa' and prefers exact matches.
```bash
curl --header "Authorization: Bearer LOGO_DEV_SECRET_KEY" \
"https://api.logo.dev/search?q=fa&strategy=match"
```
--------------------------------
### Image CDN without Token Parameter (Incorrect)
Source: https://github.com/logo-dev/docs.logo.dev.git/blob/main/GUIDELINES.md
Example showing an incorrect usage of the image CDN where the `token` parameter is missing. This will likely result in an error or missing image.
```html
```
--------------------------------
### Example BIMI-Ready DMARC Record
Source: https://github.com/logo-dev/docs.logo.dev.git/blob/main/brand-visibility/email-logos.mdx
An example of a DMARC record that meets BIMI requirements. It specifies a 'reject' policy for 100% of messages and provides a reporting address.
```txt
v=DMARC1; p=reject; pct=100; rua=mailto:dmarc@yourdomain.com
```
--------------------------------
### Image CDN Usage in HTML
Source: https://github.com/logo-dev/docs.logo.dev.git/blob/main/skill.md
Demonstrates how to embed a logo fetched from the Image CDN into an HTML `
` tag, specifying size and format. This is a client-side example.
```html
```
--------------------------------
### Load Company Logo in Android (Kotlin) with Picasso
Source: https://github.com/logo-dev/docs.logo.dev.git/blob/main/migrations/clearbit.mdx
Example of how to load a company logo into an ImageView using the Picasso library in Kotlin for Android development. Includes placeholder functionality.
```kotlin
import com.squareup.picasso.Picasso
fun loadCompanyLogo(domain: String, imageView: ImageView) {
val url = "https://img.logo.dev/$domain?token=LOGO_DEV_PUBLISHABLE_KEY"
Picasso.get()
.load(url)
.placeholder(R.drawable.logo_placeholder)
.into(imageView)
}
// Using Coil (modern Android image loading)
imageView.load("https://img.logo.dev/$domain?token=LOGO_DEV_PUBLISHABLE_KEY") {
placeholder(R.drawable.logo_placeholder)
error(R.drawable.logo_error)
}
```
--------------------------------
### Search API Request
Source: https://github.com/logo-dev/docs.logo.dev.git/blob/main/skill.md
Example of how to query the Search API using `curl` to resolve a brand name to candidate domains. This requires a secret key and is a server-side operation.
```bash
curl --header "Authorization: Bearer sk_xxx" "https://api.logo.dev/search?q=sweetgreen"
```
--------------------------------
### Describe API Response Example
Source: https://github.com/logo-dev/docs.logo.dev.git/blob/main/skill.md
A sample JSON response from the Describe API, containing detailed brand metadata including name, domain, description, social links, logo URL, blurhash, and colors.
```json
{
"name": "sweetgreen",
"domain": "sweetgreen.com",
"description": "Simple, seasonal, healthy salads and grain bowls...",
"indexed_at": "2025-03-10T11:36:23Z",
"socials": { "twitter": "https://x.com/sweetgreen" },
"logo": "https://img.logo.dev/sweetgreen.com?token=pk_...",
"blurhash": "UJPanPxr?Vj[oxazj@od_FWDDoodxrodagWD",
"colors": [{ "r": 228, "g": 255, "b": 85, "hex": "#e4ff55" }]
}
```
--------------------------------
### Dark Theme Logo by Name
Source: https://github.com/logo-dev/docs.logo.dev.git/blob/main/logo-images/name.mdx
Display a brand logo optimized for dark backgrounds by using the 'theme=dark' parameter. This example also specifies PNG format.
```html
```
--------------------------------
### Store Logo in AWS S3
Source: https://github.com/logo-dev/docs.logo.dev.git/blob/main/platform/self-hosting.mdx
This example shows how to integrate with AWS S3 to store fetched logos. It uses the AWS SDK to upload the logo with appropriate content type and cache control headers.
```javascript
import AWS from "aws-sdk";
const s3 = new AWS.S3();
async function storeInS3(domain) {
const response = await fetch(
`https://img.logo.dev/${domain}?token=${LOGO_DEV_PUBLISHABLE_KEY}&format=webp`
);
const buffer = await response.arrayBuffer();
await s3
.putObject({
Bucket: "your-bucket",
Key: `logos/${domain}.webp`,
Body: Buffer.from(buffer),
ContentType: "image/webp",
CacheControl: "public, max-age=31536000",
})
.promise();
}
```
--------------------------------
### Get company logos by domain
Source: https://github.com/logo-dev/docs.logo.dev.git/blob/main/logo-images/get.mdx
Fetch company logos by specifying the domain and various customization parameters.
```APIDOC
## GET /logo-images/{domain}
### Description
Retrieves a company logo for a given domain, with options to customize its size, format, color theme, and fallback behavior.
### Method
GET
### Endpoint
`/logo-images/{domain}`
### Parameters
#### Query Parameters
- **token** (string) - Required - Your publishable API key.
- **size** (integer) - Optional - The desired width and height of the logo in pixels. Defaults to 128.
- **format** (string) - Optional - The image format to return. Options: `jpg`, `png`, `webp`, `svg` (Enterprise only). Defaults to `jpg`.
- **greyscale** (boolean) - Optional - Returns a black and white version of the logo. Defaults to `false`.
- **theme** (string) - Optional - Adjusts logo colors for light or dark backgrounds. Options: `auto`, `light`, `dark`. Defaults to `auto`.
- **retina** (boolean) - Optional - Returns a high-density image at 2x the requested size. Defaults to `false`.
- **fallback** (string) - Optional - Returns a fallback image if the logo is not found. Options: `monogram`, `404`. Defaults to `monogram`.
### Response
#### Success Response (200)
- **image** (binary) - The requested logo image in the specified format.
```
--------------------------------
### Google Sheets IMAGE formula with custom sizing
Source: https://github.com/logo-dev/docs.logo.dev.git/blob/main/integrations/google-sheets.mdx
Display logos with specific dimensions by adding size parameters to the URL. This example sets the size to 256px.
```javascript
=IMAGE(CONCAT("https://img.logo.dev/", A2, "?token=LOGO_DEV_PUBLISHABLE_KEY&size=256"))
```
--------------------------------
### Advanced Excel IMAGE formula with parameters
Source: https://github.com/logo-dev/docs.logo.dev.git/blob/main/integrations/excel.mdx
Customize logo appearance by adding parameters like format and size to the URL. This example specifies PNG format and a size of 128 pixels. Replace LOGO_DEV_PUBLISHABLE_KEY with your actual key.
```excel
=IMAGE(CONCAT("https://img.logo.dev/", A2, "?token=LOGO_DEV_PUBLISHABLE_KEY&format=png&size=128&greyscale=true"))
```
--------------------------------
### Store Logo in Azure Blob Storage
Source: https://github.com/logo-dev/docs.logo.dev.git/blob/main/platform/self-hosting.mdx
This example shows how to upload logos to Azure Blob Storage using the `@azure/storage-blob` SDK. It configures the blob with the correct content type for web images.
```javascript
import { BlobServiceClient } from "@azure/storage-blob";
const blobService = BlobServiceClient.fromConnectionString(CONNECTION_STRING);
const container = blobService.getContainerClient("logos");
async function storeInAzure(domain) {
const response = await fetch(
`https://img.logo.dev/${domain}?token=${LOGO_DEV_PUBLISHABLE_KEY}&format=webp`
);
const buffer = await response.arrayBuffer();
await container
.getBlockBlobClient(`${domain}.webp`)
.uploadData(Buffer.from(buffer), {
blobHTTPHeaders: { blobContentType: "image/webp" },
});
}
```
--------------------------------
### Display Company Logo in Vue
Source: https://github.com/logo-dev/docs.logo.dev.git/blob/main/migrations/clearbit.mdx
Example of how to display a company logo in a Vue component using an img tag and template syntax for the URL.
```vue
```
--------------------------------
### Describe API - Get Brand Data by Domain
Source: https://github.com/logo-dev/docs.logo.dev.git/blob/main/describe/introduction.mdx
Retrieve brand information for a given domain, including name, description, social links, logo URL, blurhash, and prominent colors. Requires a secret key for authentication.
```APIDOC
## GET /describe/:domain
### Description
Retrieves brand data associated with a specific domain. This includes the company name, a description, social media links, a URL to the company logo, a blurhash for a preview, and a list of prominent colors from the logo.
### Method
GET
### Endpoint
`https://api.logo.dev/describe/:domain`
### Parameters
#### Path Parameters
- **domain** (string) - Required - The domain name to look up (e.g., `sweetgreen.com`).
#### Query Parameters
None
#### Request Body
None
### Request Example
```bash
curl --header "Authorization: Bearer LOGO_DEV_SECRET_KEY" "https://api.logo.dev/describe/sweetgreen.com"
```
### Response
#### Success Response (200)
- **name** (string) - The name of the company.
- **domain** (string) - The domain name that was queried.
- **description** (string) - A brief description of the company.
- **indexed_at** (string) - The timestamp when the brand data was last indexed.
- **socials** (object) - Key-value pairs of detected social media links. Keys can include `facebook`, `github`, `instagram`, `linkedin`, `pinterest`, `reddit`, `snapchat`, `telegram`, `tumblr`, `twitter`, `wechat`, `whatsapp`, `youtube`.
- **logo** (string) - A URL to the company's logo.
- **blurhash** (string) - A blurhash string representing a blurred preview of the logo.
- **colors** (array) - An array of objects, each representing a prominent color in the logo with `r`, `g`, `b`, and `hex` values.
#### Response Example
```json
{
"name": "sweetgreen",
"domain": "sweetgreen.com",
"description": "Simple, seasonal, healthy salads and grain bowls made in-house from scratch, using whole produce delivered that morning.",
"indexed_at": "2025-03-10T11:36:23.885238001Z",
"socials": {
"facebook": "http://facebook.com/sweetgreen",
"instagram": "https://www.instagram.com/sweetgreen/",
"twitter": "https://x.com/sweetgreen"
},
"logo": "https://img.logo.dev/sweetgreen.com?token=LOGO_DEV_PUBLISHABLE_KEY",
"blurhash": "UJPanPxr?Vj[oxazj@od_FWDDoodxrodagWD",
"colors": [
{ "r": 228, "g": 255, "b": 85, "hex": "#e4ff55" },
{ "r": 10, "g": 75, "b": 43, "hex": "#0a4b2b" },
{ "r": 125, "g": 173, "b": 80, "hex": "#7dad50" }
]
}
```
```
--------------------------------
### HTML image tag for Apple logo (US Markets)
Source: https://github.com/logo-dev/docs.logo.dev.git/blob/main/logo-images/ticker.mdx
Example of fetching a logo for Apple using its ticker symbol 'AAPL' from US markets (default). Replace LOGO_DEV_PUBLISHABLE_KEY with your key.
```html
```
--------------------------------
### URL-encode Brand Names with Spaces
Source: https://github.com/logo-dev/docs.logo.dev.git/blob/main/logo-images/name.mdx
Demonstrates how to URL-encode brand names containing spaces for correct use in API requests. The example shows 'sweet green' becoming 'sweet%20green'.
```html
sweet green → sweet%20green
https://img.logo.dev/name/sweet%20green?token=LOGO_DEV_PUBLISHABLE_KEY
```
--------------------------------
### Display Company Logo in Next.js
Source: https://github.com/logo-dev/docs.logo.dev.git/blob/main/migrations/clearbit.mdx
Example of how to display a company logo in a Next.js component using the Image component, including configuration for remote patterns and environment variables for the publishable key.
```tsx
// Add img.logo.dev to your next.config.js:
// module.exports = {
// images: {
// remotePatterns: [
// {
// protocol: 'https',
// hostname: 'img.logo.dev',
// },
// ],
// },
// };
import Image from 'next/image';
function CompanyLogo({ domain }: { domain: string }) {
return (
);
}
```
--------------------------------
### Google Sheets IMAGE formula with combined parameters
Source: https://github.com/logo-dev/docs.logo.dev.git/blob/main/integrations/google-sheets.mdx
Combine multiple URL parameters like format, size, and greyscale for a highly customized logo appearance. This example uses PNG format, 256px size, and greyscale.
```javascript
=IMAGE(CONCAT("https://img.logo.dev/", A2, "?token=LOGO_DEV_PUBLISHABLE_KEY&format=png&size=256&greyscale=true"))
```
--------------------------------
### HTML image tag for Apple logo (London Stock Exchange)
Source: https://github.com/logo-dev/docs.logo.dev.git/blob/main/logo-images/ticker.mdx
Example of fetching a logo for Apple using its ticker symbol 'AAPL' specifically from the London Stock Exchange (.LSE). Replace LOGO_DEV_PUBLISHABLE_KEY with your key.
```html
```
--------------------------------
### Image Resizing and Retina Support
Source: https://github.com/logo-dev/docs.logo.dev.git/blob/main/logo-images/introduction.mdx
Demonstrates how to use the image CDN to resize images to a specified size and enable retina display optimization.
```APIDOC
## GET /
### Description
Retrieves a logo for the specified domain, with options for resizing and retina display.
### Method
GET
### Endpoint
`https://img.logo.dev/`
### Parameters
#### Query Parameters
- **size** (integer) - Optional - The desired width in pixels for the image. Recommended under 600px for raster images, with a maximum of 800px.
- **retina** (boolean) - Optional - If `true`, doubles the image resolution for sharp display on high-density screens.
- **token** (string) - Required - Your Logo.dev publishable key.
### Response
#### Success Response (200)
Returns the image file.
#### Response Example
```html
```
```
--------------------------------
### Migrate from Clearbit Logo API to Logo.dev
Source: https://github.com/logo-dev/docs.logo.dev.git/blob/main/migrations/clearbit.mdx
This prompt assists in migrating from the Clearbit Logo API to Logo.dev. It outlines steps including URL replacement, obtaining a publishable key, adding the token parameter, updating attribution, and testing.
```markdown
Help me migrate from Clearbit Logo API to Logo.dev. Here's what I need to do:
1. Find and replace all instances of 'https://logo.clearbit.com/' with 'https://img.logo.dev/' in my codebase
2. Sign up for a Logo.dev account at https://www.logo.dev/signup and get my publishable key (starts with pk_)
3. Add the token parameter to all logo URLs: https://img.logo.dev/stripe.com?token=LOGO_DEV_PUBLISHABLE_KEY
4. Update my attribution link to: Logos provided by Logo.dev
5. Test that logos display correctly before deploying
Please help me search my codebase for Clearbit references and update them to use Logo.dev.
```
--------------------------------
### Develop with Custom Port
Source: https://github.com/logo-dev/docs.logo.dev.git/blob/main/README.md
Run the Mintlify development server on a specific port, useful if the default port is already in use.
```bash
mint dev --port 3333
```
--------------------------------
### Get Logo by Company Name
Source: https://github.com/logo-dev/docs.logo.dev.git/blob/main/logo-images/introduction.mdx
Retrieve a company logo using its brand name. This is useful when only the company name is known.
```APIDOC
## GET /logo-images/name/{name}
### Description
Retrieves a company logo based on its company name.
### Method
GET
### Endpoint
/logo-images/name/{name}
### Parameters
#### Path Parameters
- **name** (string) - Required - The name of the company (e.g., Shopify).
#### Query Parameters
- **token** (string) - Required - Your publishable API key.
- **size** (integer) - Optional - The desired size of the logo (default: 128).
- **format** (string) - Optional - The desired image format (e.g., jpg, png, webp) (default: jpg).
- **theme** (string) - Optional - Adjusts logo colors for light or dark backgrounds (e.g., dark, light) (default: auto).
- **greyscale** (boolean) - Optional - Set to true to retrieve a desaturated logo (default: false).
- **fallback** (string) - Optional - Specifies a fallback image type if the logo cannot be found (e.g., monogram) (default: monogram).
### Request Example
```html
```
### Response
#### Success Response (200)
- **Image**: The company logo in the specified format.
```
--------------------------------
### Get Logo by Crypto Symbol
Source: https://github.com/logo-dev/docs.logo.dev.git/blob/main/logo-images/introduction.mdx
Retrieve a cryptocurrency logo using its symbol. Suitable for applications tracking digital currencies.
```APIDOC
## GET /logo-images/crypto/{symbol}
### Description
Retrieves a cryptocurrency logo based on its symbol.
### Method
GET
### Endpoint
/logo-images/crypto/{symbol}
### Parameters
#### Path Parameters
- **symbol** (string) - Required - The cryptocurrency symbol (e.g., BTC).
#### Query Parameters
- **token** (string) - Required - Your publishable API key.
- **size** (integer) - Optional - The desired size of the logo (default: 128).
- **format** (string) - Optional - The desired image format (e.g., jpg, png, webp) (default: jpg).
- **theme** (string) - Optional - Adjusts logo colors for light or dark backgrounds (e.g., dark, light) (default: auto).
- **greyscale** (boolean) - Optional - Set to true to retrieve a desaturated logo (default: false).
- **fallback** (string) - Optional - Specifies a fallback image type if the logo cannot be found (e.g., monogram) (default: monogram).
### Request Example
```html
```
### Response
#### Success Response (200)
- **Image**: The cryptocurrency logo in the specified format.
```
--------------------------------
### Fetch and Store a Single Logo
Source: https://github.com/logo-dev/docs.logo.dev.git/blob/main/platform/self-hosting.mdx
This snippet demonstrates the basic pattern for fetching a logo from Logo.dev, converting it to a buffer, and storing it in your own infrastructure. It's a foundational step for self-hosting.
```javascript
// 1. Fetch logo from Logo.dev
const response = await fetch(
`https://img.logo.dev/${domain}?token=${LOGO_DEV_PUBLISHABLE_KEY}&format=webp`
);
const buffer = await response.arrayBuffer();
// 2. Store in your infrastructure
await yourStorageSystem.upload(`logos/${domain}.webp`, buffer);
// 3. Serve from your CDN
return `https://your-cdn.com/logos/${domain}.webp`;
```
--------------------------------
### Check for Broken Links
Source: https://github.com/logo-dev/docs.logo.dev.git/blob/main/README.md
Use the Mintlify CLI to scan the documentation for any broken internal or external links.
```bash
mint broken-links
```
--------------------------------
### Get Logo by Stock Ticker
Source: https://github.com/logo-dev/docs.logo.dev.git/blob/main/logo-images/introduction.mdx
Retrieve a company logo using its stock ticker symbol. Ideal for financial applications.
```APIDOC
## GET /logo-images/ticker/{ticker}
### Description
Retrieves a company logo based on its stock ticker symbol.
### Method
GET
### Endpoint
/logo-images/ticker/{ticker}
### Parameters
#### Path Parameters
- **ticker** (string) - Required - The stock ticker symbol (e.g., AAPL).
#### Query Parameters
- **token** (string) - Required - Your publishable API key.
- **size** (integer) - Optional - The desired size of the logo (default: 128).
- **format** (string) - Optional - The desired image format (e.g., jpg, png, webp) (default: jpg).
- **theme** (string) - Optional - Adjusts logo colors for light or dark backgrounds (e.g., dark, light) (default: auto).
- **greyscale** (boolean) - Optional - Set to true to retrieve a desaturated logo (default: false).
- **fallback** (string) - Optional - Specifies a fallback image type if the logo cannot be found (e.g., monogram) (default: monogram).
### Request Example
```html
```
### Response
#### Success Response (200)
- **Image**: The company logo in the specified format.
```
--------------------------------
### Get Logo by Domain
Source: https://github.com/logo-dev/docs.logo.dev.git/blob/main/logo-images/introduction.mdx
Retrieve a company logo using its verified domain. This is the most reliable lookup mode when a domain is available.
```APIDOC
## GET /logo-images/{domain}
### Description
Retrieves a company logo based on its domain name.
### Method
GET
### Endpoint
/logo-images/{domain}
### Parameters
#### Path Parameters
- **domain** (string) - Required - The verified domain of the company (e.g., shopify.com).
#### Query Parameters
- **token** (string) - Required - Your publishable API key.
- **size** (integer) - Optional - The desired size of the logo (default: 128).
- **format** (string) - Optional - The desired image format (e.g., jpg, png, webp) (default: jpg).
- **theme** (string) - Optional - Adjusts logo colors for light or dark backgrounds (e.g., dark, light) (default: auto).
- **greyscale** (boolean) - Optional - Set to true to retrieve a desaturated logo (default: false).
- **fallback** (string) - Optional - Specifies a fallback image type if the logo cannot be found (e.g., monogram) (default: monogram).
### Request Example
```html
```
### Response
#### Success Response (200)
- **Image**: The company logo in the specified format.
```
--------------------------------
### Get Logo by ISIN
Source: https://github.com/logo-dev/docs.logo.dev.git/blob/main/logo-images/introduction.mdx
Retrieve a company logo using its International Securities Identification Number (ISIN). Useful for global financial identification.
```APIDOC
## GET /logo-images/isin/{isin}
### Description
Retrieves a company logo based on its International Securities Identification Number (ISIN).
### Method
GET
### Endpoint
/logo-images/isin/{isin}
### Parameters
#### Path Parameters
- **isin** (string) - Required - The ISIN of the security (e.g., US0378331005).
#### Query Parameters
- **token** (string) - Required - Your publishable API key.
- **size** (integer) - Optional - The desired size of the logo (default: 128).
- **format** (string) - Optional - The desired image format (e.g., jpg, png, webp) (default: jpg).
- **theme** (string) - Optional - Adjusts logo colors for light or dark backgrounds (e.g., dark, light) (default: auto).
- **greyscale** (boolean) - Optional - Set to true to retrieve a desaturated logo (default: false).
- **fallback** (string) - Optional - Specifies a fallback image type if the logo cannot be found (e.g., monogram) (default: monogram).
### Request Example
```html
```
### Response
#### Success Response (200)
- **Image**: The company logo in the specified format.
```
--------------------------------
### Logo.dev Base URL
Source: https://github.com/logo-dev/docs.logo.dev.git/blob/main/migrations/clearbit.mdx
The Logo.dev API base URL. Replace this with your Clearbit base URL.
```bash
https://img.logo.dev/
```
--------------------------------
### Custom Size Logo by Name
Source: https://github.com/logo-dev/docs.logo.dev.git/blob/main/logo-images/name.mdx
Embed a brand logo with a specified size using the 'size' parameter in the URL. This example requests a 256px version of the Shopify logo.
```html
```
--------------------------------
### Generating a Logo URL in PHP
Source: https://github.com/logo-dev/docs.logo.dev.git/blob/main/snippets/quickstart.mdx
Build a company logo URL in PHP, with options for size and format. Remember to substitute `nike.com` and your `LOGO_DEV_PUBLISHABLE_KEY`.
```php
$logoUrl = "https://img.logo.dev/nike.com?token=LOGO_DEV_PUBLISHABLE_KEY&size=256&format=png";
```
--------------------------------
### Generating a Logo URL in Python
Source: https://github.com/logo-dev/docs.logo.dev.git/blob/main/snippets/quickstart.mdx
Construct a URL for a company logo in Python, specifying size and format. Replace `nike.com` and `LOGO_DEV_PUBLISHABLE_KEY` as needed.
```python
logo_url = f"https://img.logo.dev/nike.com?token=LOGO_DEV_PUBLISHABLE_KEY&size=256&format=png"
```
--------------------------------
### Logo.dev Publishable Key
Source: https://github.com/logo-dev/docs.logo.dev.git/blob/main/migrations/clearbit.mdx
Your Logo.dev publishable key, obtained after creating an account.
```bash
LOGO_DEV_PUBLISHABLE_KEY=pk_xxxxxxxxxxxx
```
--------------------------------
### Clearbit Base URL
Source: https://github.com/logo-dev/docs.logo.dev.git/blob/main/migrations/clearbit.mdx
The Clearbit Logo API base URL.
```bash
https://logo.clearbit.com/
```
--------------------------------
### Host BIMI Logo and Certificate
Source: https://github.com/logo-dev/docs.logo.dev.git/blob/main/brand-visibility/email-logos.mdx
These are the standard paths for hosting your BIMI logo and certificate. Ensure they are publicly accessible via HTTPS.
```bash
https://yourdomain.com/.well-known/bimi/logo.svg
https://yourdomain.com/.well-known/bimi/certificate.pem
```
--------------------------------
### Update Mintlify CLI
Source: https://github.com/logo-dev/docs.logo.dev.git/blob/main/README.md
Update the Mintlify CLI to the latest version to ensure you have the newest features and bug fixes.
```bash
mint update
```
--------------------------------
### Validate OpenAPI Specifications
Source: https://github.com/logo-dev/docs.logo.dev.git/blob/main/README.md
Validate your OpenAPI specification files using the Mintlify CLI to ensure they adhere to the correct format.
```bash
mint openapi-check
```
--------------------------------
### HTML image tag for Toyota logo (Tokyo Stock Exchange)
Source: https://github.com/logo-dev/docs.logo.dev.git/blob/main/logo-images/ticker.mdx
Example of fetching a logo for Toyota using its ticker symbol '7203.T' from the Tokyo Stock Exchange (.T). Replace LOGO_DEV_PUBLISHABLE_KEY with your key.
```html
```
--------------------------------
### Generating a Logo URL in Ruby
Source: https://github.com/logo-dev/docs.logo.dev.git/blob/main/snippets/quickstart.mdx
Create a URL for a company logo in Ruby, including parameters for size and format. Ensure your `LOGO_DEV_PUBLISHABLE_KEY` is used.
```ruby
logo_url = "https://img.logo.dev/nike.com?token=LOGO_DEV_PUBLISHABLE_KEY&size=256&format=png"
```
--------------------------------
### Prompt Banner for Logo.dev Implementation
Source: https://github.com/logo-dev/docs.logo.dev.git/blob/main/introduction.mdx
This component displays a pre-made prompt to help users quickly implement Logo.dev in their application, covering logo display, size/format handling, fallbacks, lazy loading, and theming.
```jsx
import { PromptBanner } from "/snippets/prompt-banner.jsx";
```
--------------------------------
### Using a Publishable API Key in HTML
Source: https://github.com/logo-dev/docs.logo.dev.git/blob/main/platform/api-keys.mdx
Embed a Logo.dev image using a publishable API key. This key is safe for client-side use and works with img.logo.dev.
```html
```
--------------------------------
### Add logo to Excel header/footer
Source: https://github.com/logo-dev/docs.logo.dev.git/blob/main/integrations/excel.mdx
Insert a company logo into Excel headers or footers for branded reports. Use the 'Online Pictures' option within the Header & Footer Tools Design tab and paste the Logo.dev URL. This example sets a size of 128 pixels.
```text
https://img.logo.dev/yourcompany.com?token=LOGO_DEV_PUBLISHABLE_KEY&format=png&size=128
```
--------------------------------
### Image CDN Usage with Publishable Key
Source: https://github.com/logo-dev/docs.logo.dev.git/blob/main/GUIDELINES.md
Use this HTML snippet to embed company logos using the image CDN. Ensure the `token` parameter includes your publishable key.
```html
```
--------------------------------
### Google Sheets IMAGE function with high quality custom size
Source: https://github.com/logo-dev/docs.logo.dev.git/blob/main/integrations/google-sheets.mdx
Achieve high-quality custom sizing for logos by combining the size parameter in the URL with specific dimensions in the IMAGE function. This example uses a 256px URL size and sets cell dimensions to 64x64.
```javascript
=IMAGE(CONCAT("https://img.logo.dev/", A2, "?token=LOGO_DEV_PUBLISHABLE_KEY&size=256"), 4, 64, 64)
```
--------------------------------
### Allow Favicon Access in robots.txt
Source: https://github.com/logo-dev/docs.logo.dev.git/blob/main/brand-visibility/google-favicon.mdx
Configure your robots.txt file to allow Googlebot and Googlebot-Image to crawl your favicon file. This ensures Google can access and display your favicon.
```txt
# Allow favicon access
User-agent: Googlebot
Allow: /favicon.ico
User-agent: Googlebot-Image
Allow: /favicon.ico
```
--------------------------------
### Describe API Request
Source: https://github.com/logo-dev/docs.logo.dev.git/blob/main/describe/introduction.mdx
Use this cURL command to request brand data for a specific domain. Replace ':domain' with the actual domain and 'LOGO_DEV_SECRET_KEY' with your secret key.
```bash
curl --header "Authorization: Bearer LOGO_DEV_SECRET_KEY" "https://api.logo.dev/describe/:domain"
```
--------------------------------
### Configuring Referrer-Policy in Next.js
Source: https://github.com/logo-dev/docs.logo.dev.git/blob/main/platform/api-keys.mdx
Configure the Referrer-Policy header for all requests in a Next.js application. This helps in maintaining domain restriction compliance.
```javascript
module.exports = {
async headers() {
return [
{
source: "/:path*",
headers: [
{
key: "Referrer-Policy",
value: "strict-origin-when-cross-origin",
},
],
},
];
},
};
```
--------------------------------
### Displaying a Company Logo in iOS SwiftUI
Source: https://github.com/logo-dev/docs.logo.dev.git/blob/main/snippets/quickstart.mdx
A SwiftUI `View` struct to display a company logo using `AsyncImage`. It takes a domain and constructs the URL. Make sure to replace `LOGO_DEV_PUBLISHABLE_KEY` with your key.
```swift
import SwiftUI
struct CompanyLogo: View {
let domain: String
var body: some View {
AsyncImage(url: URL(string: "https://img.logo.dev/\(domain)?token=LOGO_DEV_PUBLISHABLE_KEY")) {
image
.resizable()
.aspectRatio(contentMode: .fit)
} placeholder: {
ProgressView()
}
.frame(width: 128, height: 128)
}
}
```
--------------------------------
### Fallback Image Configuration
Source: https://github.com/logo-dev/docs.logo.dev.git/blob/main/logo-images/introduction.mdx
Explains how to configure fallback images when a logo is not found for a domain, including options for monograms or 404 errors.
```APIDOC
## GET /
### Description
Retrieves a logo for the specified domain. If no logo is found, it can return a monogram or a 404 error based on the fallback parameter.
### Method
GET
### Endpoint
`https://img.logo.dev/`
### Parameters
#### Query Parameters
- **fallback** (string) - Optional - Controls the fallback behavior when an image is not found. Accepts `monogram` (default) or `404`.
- `monogram`: Returns a black and white monogram of the first letter of the domain.
- `404`: Returns an empty response with HTTP Status Code 404 Not Found.
- **token** (string) - Required - Your Logo.dev publishable key.
### Response
#### Success Response (200)
Returns the image file or a monogram if `fallback` is not `404`.
#### Error Response (404)
Returned if `fallback=404` and no image is found.
#### Response Example (with fallback=404)
```html
```
```
--------------------------------
### Basic Attribution Link
Source: https://github.com/logo-dev/docs.logo.dev.git/blob/main/platform/attribution.mdx
Add this simple HTML link to any page displaying Logo.dev logos to fulfill attribution requirements.
```html
Logos provided by Logo.dev
```
--------------------------------
### Add BIMI DNS Record
Source: https://github.com/logo-dev/docs.logo.dev.git/blob/main/brand-visibility/email-logos.mdx
This TXT record is essential for BIMI. It points to your hosted logo and optional certificate. The 'a=' parameter is for the certificate.
```txt
v=BIMI1; l=https://yourdomain.com/.well-known/bimi/logo.svg; a=https://yourdomain.com/.well-known/bimi/certificate.pem
```
--------------------------------
### Batch Process and Store Multiple Logos
Source: https://github.com/logo-dev/docs.logo.dev.git/blob/main/platform/self-hosting.mdx
Use this snippet to efficiently fetch and store multiple logos in parallel. It iterates over a list of domains, downloads each logo, and uploads it to your storage system.
```javascript
const domains = ["stripe.com", "shopify.com", "square.com"];
await Promise.all(
domains.map(async (domain) => {
const response = await fetch(
`https://img.logo.dev/${domain}?token=${LOGO_DEV_PUBLISHABLE_KEY}`
);
const buffer = await response.arrayBuffer();
await yourStorageSystem.upload(`logos/${domain}.webp`, buffer);
})
);
```
--------------------------------
### Generate Logo URL with JavaScript Encoding
Source: https://github.com/logo-dev/docs.logo.dev.git/blob/main/logo-images/name.mdx
This JavaScript snippet demonstrates how to dynamically construct a logo URL by using `encodeURIComponent()` to handle URL encoding of brand names.
```javascript
const brandName = "sweet green";
const encodedName = encodeURIComponent(brandName);
const logoUrl = `https://img.logo.dev/name/${encodedName}?token=${apiKey}`;
```
--------------------------------
### Setting Referrer-Policy via HTML Meta Tag
Source: https://github.com/logo-dev/docs.logo.dev.git/blob/main/platform/api-keys.mdx
Ensure referrer information is sent with requests by adding a meta tag to your HTML head. This is crucial for domain restrictions.
```html
```
--------------------------------
### Logo Embedding for Light Backgrounds
Source: https://github.com/logo-dev/docs.logo.dev.git/blob/main/logo-images/introduction.mdx
Adjust logo colors for light backgrounds using `theme=light`. This inverts dark-colored logos to ensure visibility. Requires images with transparency.
```html
```
--------------------------------
### Setting Referrer Policy on Individual Images
Source: https://github.com/logo-dev/docs.logo.dev.git/blob/main/platform/api-keys.mdx
Apply a specific referrer policy to an individual image element. This allows for granular control over referrer data transmission.
```html
```
--------------------------------
### Basic Excel IMAGE formula
Source: https://github.com/logo-dev/docs.logo.dev.git/blob/main/integrations/excel.mdx
Use this formula to display a logo directly from a company domain using Excel's IMAGE function. Replace LOGO_DEV_PUBLISHABLE_KEY with your actual key.
```excel
=IMAGE("https://img.logo.dev/microsoft.com?token=LOGO_DEV_PUBLISHABLE_KEY")
```
--------------------------------
### REST API Usage with Secret Key
Source: https://github.com/logo-dev/docs.logo.dev.git/blob/main/GUIDELINES.md
Use this bash snippet with `curl` to interact with Logo.dev REST APIs. The `Authorization` header must contain your secret key.
```bash
curl --header "Authorization: Bearer LOGO_DEV_SECRET_KEY" "https://api.logo.dev/search?q=:query"
```
--------------------------------
### Basic Google Sheets IMAGE formula
Source: https://github.com/logo-dev/docs.logo.dev.git/blob/main/integrations/google-sheets.mdx
Use this formula to display a logo for a hardcoded domain. Replace LOGO_DEV_PUBLISHABLE_KEY with your actual key.
```javascript
=IMAGE("https://img.logo.dev/apple.com?token=LOGO_DEV_PUBLISHABLE_KEY")
```
--------------------------------
### Interactive Logo Demo
Source: https://github.com/logo-dev/docs.logo.dev.git/blob/main/introduction.mdx
Use this component to interactively fetch company logos by entering a domain name. It demonstrates the core functionality of the Logo.dev API.
```jsx
import { LogoDemo } from "/snippets/logo-demo.jsx";
```
--------------------------------
### Check DMARC Policy
Source: https://github.com/logo-dev/docs.logo.dev.git/blob/main/brand-visibility/email-logos.mdx
Use this command to check your domain's current DMARC policy. Ensure it is set to 'quarantine' or 'reject' with 'pct=100' for BIMI.
```bash
dig TXT _dmarc.yourdomain.com
```
--------------------------------
### Search API
Source: https://github.com/logo-dev/docs.logo.dev.git/blob/main/skill.md
Resolve a brand name to candidate domains. This API is server-side only and requires a secret key for authentication.
```APIDOC
## Search API — `https://api.logo.dev/search`
Resolve a brand name to candidate domains. Server-side, secret key.
### Method
```bash
curl --header "Authorization: Bearer sk_xxx" "https://api.logo.dev/search?q=sweetgreen"
```
### Parameters
- **`q`** (string) - Required - The query string to search for.
- **`strategy`** (string) - Optional - `typeahead` (default) or `match`.
### Response Example
```json
[
{ "name": "sweetgreen", "domain": "sweetgreen.com" },
{ "name": "Sweet Greens Healthy Restaurant", "domain": "sweetgreens.ae" }
]
```
```
--------------------------------
### Format for Name Logo URL
Source: https://github.com/logo-dev/docs.logo.dev.git/blob/main/logo-images/name.mdx
This HTML snippet shows the general format for constructing a URL to retrieve a brand logo by its name. Replace ':brand' with the actual brand name.
```html
```