Import Clearbit Company Data for URLs in Airtable

In this guide, we will import company data such as name, industry and address for a list of URLs in Airtable using the Clearbit API and the Data Fetcher app. We'll get a Clearbit API key, then set up an API request that fetches the company data for a list of URLs. Finally, we'll see how to schedule this to run automatically.

Create Companies Table

  • Create a table in your base called 'Companies'.
  • Add a field called 'URL' with type 'URL'. Add the URLs you want to get company data for in this field.
Screenshot 2021-09-30 at 11.26.27.png
  • Create a Grid view in the 'Companies' table called 'To process' with the following filters:
    • 'URL' is not empty.
    • 'Name' is empty.
Screenshot 2021-09-30 at 11.27.23.png

Get a Clearbit API Key

Screenshot 2021-09-30 at 12.03.02.png

Install Data Fetcher

Lookup Clearbit Company Data for URLs in Airtable

  • On the home screen of the Data Fetcher app, click 'Create request'.
  • On the create request screen, enter the request name 'Fetch Company Data'.
  • Based on the Clearbit company enrichment API documentation, enter this URL in the URL input on the create request screen:

https://company.clearbit.com/v2/companies/find

  • Add a parameter called 'domain'. For the value we want to use a reference to the 'URL' column in the 'Companies' table, so enter ***Companies*URL***..

The full URL should now be:

https://company.clearbit.com/v2/companies/find?domain=***Companies*URL***

  • Set the output table to the 'Companies' table by clicking 'Use current'.
  • Set the output view to 'To process'.
  • Set up basic authorization with your API key from the previous step as the username. You can leave the password empty.
Screenshot 2021-09-30 at 12.16.41.png
  • Click 'Advanced' to open the advanced settings.
  • Under 'Run on Multiple Records', click 'Use current' to set the table to 'Companies', then select the 'To process' view. This means an API request will run for every record in our 'To process' view, import the company data from Clearbit, and move it out of the view so it does not get updated next time we run the request.
  • Turn on the 'If one of these records causes an error, run the next request anyway.' option.
Screenshot 2021-09-30 at 12.19.20.png
  • Click 'Run'. You will see a loading message while the request runs, then the response field mapping modal will open. This is where we select which fields from the API response to keep and how they should map to the fields in the output table. Click 'Show response' on this modal to see the actual response.
  • Click 'Filter all' to deselect all fields, then select the following fields and data types (as well as any other fields you want):

Response field

Data type

Use table field

Or, create field

name

Single line text

Name

legalName

Single line text

Legal name

description

Single line text

Description

location

Single line text

Address

Screenshot 2021-09-30 at 12.29.05.png

  • Click 'Confirm'. Data Fetcher will create the new fields in the output table, then the request will run again and import the company data for each URL from Clearbit into Airtable.
  • Click 'Save'.

Import Company Data Automatically

At the moment you have to import the company data by manually clicking the 'Run' button. Let's automate this by using Data Fetcher's scheduled requests feature.

  • On the create request screen in Data Fetcher, scroll to 'Schedule'.
  • You will need a paid account to use this feature, so click the button to upgrade your account if you haven't already. After upgrading, click the 'I've done this' button.
  • Add your Airtable API key if you haven't already.
  • Turn on 'Schedule this API request'.
  • Set how often you want the request to run.
  • Click 'Save'.
Screenshot 2021-07-28 at 16.07.36.png