We're happy to announce Clearbit's free Logo API.
While services like Gravatar make it straightforward to pull in a user's default avatar, we haven't found anything that caters well to company logos. And yet there's a lot of clear use-cases ranging from setting an organization's default image on signup to pulling in logos next to job listings.
The API is incredibly simple, taking a company's domain and returning an image.
Behind the scenes we're using Clearbit's Company API, pulling images from lots of different sources such as Twitter, Facebook, Wikipedia, or the company's own site's meta links. We then resize and standardize the images, serving them up from a CDN.
Here's the API in action - an
img tag containing the domain
Produces Baremetric's logo:
You can also pass us the following optional query parameters.
|`size`||**integer** Size of the image returned|
|`format`||**string** Format of the default - either `png` or `jpg`|
|`greyscale`||**boolean** Enables greyscaling|
To specify a default image (for when we don't have logo handy) you can use the image's
onerror event--we've put together an example here.