Clearbit Logo API

Development

Clearbit Logo API

Clearbit's Logo API allows you to retrieve high quality logos for any domain. With the Logo API, you can easily incorporate company logos into your applications or websites.

Getting Started

To use the Logo API, you will need to obtain an API key from Clearbit. Once you have an API key, you can start making requests to the Logo API.

API Endpoints

Retrieve a Logo

Retrieve a logo for a specific domain:

const API_KEY = 'YOUR_API_KEY';
const domain = 'example.com';

fetch(`https://logo.clearbit.com/${domain}?size=500&greyscale=true&apikey=${API_KEY}`)
  .then(response => {
    if (!response.ok) {
      throw new Error('Network response was not ok');
    }
    return response.blob();
  })
  .then(logo => {
    const image = document.createElement('img');
    image.src = URL.createObjectURL(logo);
    document.body.appendChild(image);
  })
  .catch(error => console.error(error));

This example retrieves the logo for the domain example.com and sets the parameters size and greyscale to 500 and true, respectively. The API key is included in the query string.

Possible parameters for the Logo API include:

  • size: the size in pixels for the width and height of the logo (default is 400).
  • greyscale: whether or not to return the logo in greyscale (default is false).

Conclusion

With Clearbit's Logo API, it's easy to retrieve high quality logos for any domain. By incorporating logos into your applications or websites, you can provide your users with a more engaging and informative experience.

Related APIs in Development