This document defines standards for writing Logo.dev documentation. It is used by Cursor and Claude Code to maintain consistency.
Logo.dev uses two types of API keys. Always use the correct terminology.
| Term | Prefix | Purpose | Security |
|---|---|---|---|
| Publishable Key | pk_ |
Image CDN (img.logo.dev) via token param |
Safe for client-side |
| Secret Key | sk_ |
REST APIs via Authorization: Bearer header |
Server-side only |
Use these exact placeholders in code examples:
| Key Type | Placeholder |
|---|---|
| Publishable Key | LOGO_DEV_PUBLISHABLE_KEY |
| Secret Key | LOGO_DEV_SECRET_KEY |
These placeholders work as both inline examples and environment variable names, making it easy for developers to copy examples directly.
Use lowercase with colon prefix for URL path parameters:
:domain- for domain lookups (e.g.,stripe.com):symbol- for ticker/crypto symbols (e.g.,AAPL,BTC):query- for search queries:isin- for ISIN codes:brand- for brand name lookups
For the image CDN (publishable key):
<img
src="https://img.logo.dev/:domain?token=LOGO_DEV_PUBLISHABLE_KEY"
alt="Company logo"
/>For REST APIs (secret key):
curl --header "Authorization: Bearer LOGO_DEV_SECRET_KEY" "https://api.logo.dev/search?q=:query"For environment variable setup:
LOGO_DEV_PUBLISHABLE_KEY=pk_xxxxxxxxxxxx
LOGO_DEV_SECRET_KEY=sk_xxxxxxxxxxxxFor framework-specific env vars (e.g., Next.js client-side):
NEXT_PUBLIC_LOGO_DEV_PUBLISHABLE_KEY=pk_xxxxxxxxxxxxDo NOT use these terms when referring to API keys:
| Incorrect Term | Correct Term |
|---|---|
| public key | publishable key |
| public token | publishable key |
| private key | secret key |
| API key (generic) | publishable key or secret key (be specific) |
| token (alone) | publishable key (for image CDN) |
- When discussing the image CDN (
img.logo.dev), always refer to "publishable key" - When discussing REST APIs (search, describe), always refer to "secret key"
- The
tokenparameter in URLs takes a publishable key - The
Authorization: Bearerheader takes a secret key
Correct:
"Get your publishable key from the dashboard and add it to the
tokenparameter."
Incorrect:
"Get your public key from the dashboard and add it to the
tokenparameter."
Correct:
"Use your secret key in the Authorization header to access the Search API."
Incorrect:
"Use your private key in the Authorization header to access the Search API."
Always include the token parameter in URL examples:
<!-- Correct: includes token -->
<img src="https://img.logo.dev/stripe.com?token=LOGO_DEV_PUBLISHABLE_KEY" />
<!-- Incorrect: missing token -->
<img src="https://img.logo.dev/stripe.com" />The feature that restricts publishable key usage to specific domains.
| Term | Usage |
|---|---|
| domain restrictions | The feature name (lowercase in prose) |
| Allowed Domains Only | The toggle label in the dashboard (title case) |
| referrer | The HTTP header that identifies the request origin |
| whitelist | Avoid — use "allowed domains" instead |
| blacklist | Avoid — use "blocked" or "restricted" instead |
When documenting referrer configuration:
- Use
strict-origin-when-cross-originas the recommended default - Use
originas the simplest option that works with domain restrictions - Warn against
no-referrerandsame-originas they break domain restrictions