Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.brandsapi.com/llms.txt

Use this file to discover all available pages before exploring further.

Follow these best practices to ensure your users have the best possible experience when viewing brand logos in your application.

1. Use the Client ID

Always include your Client ID (?c=...) in every request. This allows us to track your usage accurately and ensures that your requests are not throttled.
<!-- Correct -->
<img src="https://cdn.brandapi.io/github.com?c=MY_CLIENT_ID" />

<!-- Incorrect -->
<img src="https://cdn.brandapi.io/github.com" />

2. Set Alt Text

For accessibility and SEO, always provide descriptive alt text for images. If the logo is purely decorative, you can use an empty alt="", but typically identifying the brand is helpful.
<img 
  src="https://cdn.brandapi.io/github.com?c=ID" 
  alt="GitHub Logo" 
/>

3. Specify Dimensions

To prevent layout shifts (CLS), always specify the width and height of your images. Use our sizing parameters to get the exact size you need from the CDN.
<img 
  src="https://cdn.brandapi.io/github.com/h/64/w/64?c=ID" 
  width="64" 
  height="64" 
  alt="GitHub"
/>

4. Implement Smart Fallbacks

While BrandApi has 44M+ brands, occasionally a logo might not be found. Use our built-in fallback options or implement a custom React fallback.

Built-in Fallback

<img src="https://cdn.brandapi.io/unknown.com/fallback/lettermark/icon?c=ID" />

5. Leverage Modern Formats

By default, we serve images in WebP, which provides excellent quality at a fraction of the file size of PNG or JPEG. Stick with the default unless you have specific compatibility requirements.

6. Prefer SVG for Logos

When using the logo type (the full company wordmark), requesting the svg format ensures the logo remains crisp at any zoom level or resolution.
<img src="https://cdn.brandapi.io/github.com/logo.svg?c=ID" />

7. Avoid Re-hosting

Do not download and re-host logos on your own servers. This prevents you from receiving automatic updates when a brand changes its identity. Our CDN is optimized for delivery and ensures your UI is always current.