Join 15,000+ Subscribers
Get tactical growth tips once a week

Node bindings and more

I'm excited to share another raft of Clearbit features that we've shipped over the last week.

Node bindings

Along with our Ruby bindings for Clearbit, we now have Node bindings. These use a promise based API to asynchronously lookup people and companies via Clearbit.

You can see an example of how to use the API below.

var clearbit = require('clearbit')('API_KEY');  
var Person   = clearbit.Person;

Person.find({email: 'email@domain.com'})  
  .then(function (person) {
    console.log('Name: ', person.name.fullName);
  })
  .catch(Person.QueuedError, function (err) {
    // Person lookup is queued
    console.log(err);
  })
  .catch(Person.NotFoundError, function (err) {
    // Person could not be found
    console.log(err);
  })
  .catch(function (err) {
    console.error('Failed request', err);
  });

Our docs have been updated with Node examples.

Combined lookup

Many of you were doing two lookups to find person and company information: one based on the person's email and one based on the email's domain name. To save you making two requests to do this we now offer a combined lookup API.

This endpoint expects an email address, and will return an object containing both the person and company (if found).

curl 'https://person.clearbit.co/v1/combined/email/alex@alexmaccaw.com'  

For more information and examples see our documentation.

New attributes

We've added the emailProvider attribute to Company lookup responses. This attribute is a boolean that will be true if the company's domain name is associated with a public email provider such as gmail.com.

We've also added a new attribute geo to Person lookup responses which contains geocoded data based on the person's location.

"geo": {
  "city": "SF",
  "state": "CA",
  "country": "US",
  "lat": 37.7749295,
  "lng": -122.4194155
},

The location attribute has also been normalized when we can successfully geocode it.

CloudFront

All avatars and company logos are now served by AWS CloudFront. This ensures that you don't get any SSL mixed content errors, and that images are always available.

Next up

That's all for this week, but if you have any suggestions for improving our APIs please do get in touch - all the API features above have come directly from suggestions made by our customers.

Share this post
Join 15,000+ Subscribers
Get tactical growth tips once a week