SDKs
The API is plain HTTP, so the smallest integration is a URL and no SDK at all. When you want types, a client and a component that handles missing logos for you, there are two small packages.
No SDK required
Section titled “No SDK required”Every endpoint works from an img tag, from curl, or from browser code — all of them are CORS-enabled, search included.
<!-- an img tag is a complete integration --><img src="https://img.anylogo.dev/stripe.com?size=64" alt="Stripe logo" width="64" height="64">
<!-- square mark for an avatar, monogram tile if we miss --><img src="https://img.anylogo.dev/linear.app?variant=icon&size=40&fallback=monogram">
<!-- a ticker resolves to the company's logo --><img src="https://img.anylogo.dev/ticker/AAPL?size=64">curl -O https://img.anylogo.dev/stripe.comcurl https://api.anylogo.dev/company/stripe.comcurl https://api.anylogo.dev/colors/stripe.comcurl https://api.anylogo.dev/kit/linear.app// every endpoint is CORS-enabled, search includedconst res = await fetch('https://api.anylogo.dev/search?q=spot');const { suggestions } = await res.json();@anylogo/logokit
Section titled “@anylogo/logokit”A tiny typed client: zero dependencies, ESM, fully typed. logoUrl builds a URL without touching the network; the AnyLogo client wraps company lookups and search, and accepts an optional key and a custom fetch.
Reach for it when you want the compiler to catch a bad size or a misspelled field, and when company lookups and search are going through your own server rather than the browser.
# publishing to npm shortlynpm install @anylogo/logokitimport { logoUrl, AnyLogo } from '@anylogo/logokit';
// no network call — just builds the URLlogoUrl('stripe.com', { size: 64 });// -> https://img.anylogo.dev/stripe.com?size=64
// the key is optional: it raises limits and unlocks more fieldsconst client = new AnyLogo({ apiKey: 'al_…' });
const company = await client.company('stripe.com'); // Company | nullconst matches = await client.search('spoti'); // CompanySuggestion[]| Export | Description |
|---|---|
logoUrl(domain, opts) | Returns a logo URL without touching the network. Options: size (16 · 32 · 64 · 128 · 256 · 512 · 1024) and format (png · webp). |
client.company(domain) | Resolves to a Company, or null when the domain is unknown or unreachable. Which fields come back depends on your tier — see the company endpoint. |
client.search(query) | Resolves to CompanySuggestion[] — name, domain and logo URL. Queries under two characters short-circuit to an empty array without a request. |
| Types | Company, CompanySuggestion, LogoSize, LogoFormat, LogoOptions are all exported. |
@anylogo/react
Section titled “@anylogo/react”One component with the missing-logo case already handled: the real logo when it exists, a deterministic letter tile when it doesn’t. The tile’s colour is derived from the domain, so the same company always gets the same tile. The whole logokit client is re-exported, so one dependency covers both.
Reach for it when you are rendering companies in a React list and do not want to write the miss, the alt text and the lazy loading yourself.
# publishing to npm shortlynpm install @anylogo/reactimport { CompanyLogo } from '@anylogo/react';
// real logo when it exists…<CompanyLogo domain="stripe.com" size={64} />
// …deterministic letter tile when it doesn't<CompanyLogo domain="unknown-startup.io" name="Unknown Startup" size={32} />
// or bring your own fallback<CompanyLogo domain="unknown-startup.io" fallback={<Placeholder />} />| Prop | Description |
|---|---|
domain | Required. The bare domain to render a logo for. |
size | Defaults to 64. Sets the requested logo size and the rendered box. |
name | Used for alt text and the fallback tile’s letter. Falls back to the domain. |
fallback | Any node to render instead of the built-in letter tile when no logo exists. |
className · style | Passed through to the image and the fallback tile, so it drops into your own design system. |
React 18 or newer is required as a peer dependency. Images are lazy-loaded by default.