Easily Enrich Company Data with Explorium’s Google Sheet Formula

Are you tired of manually searching for company information online? Fear not, because we have a solution for you. In this post, we’ll introduce you to a powerful formula in Google Sheets that can enrich any company name with its firmographic data in just a few seconds. Using Explorium’s API, this formula allows you to easily retrieve information such as a company’s website, foundation date, revenue, number of employees, industry, and more. Plus, Explorium provides free enrichments for lots of data sources, up to 500 per month. We’ll show you how to use the formula and give you a brief overview of the types of data that Explorium offers.

Watch the Magic Happen

The Power of Data Enrichment

With just a simple formula, you can transform a company name into a wealth of information. The formula is “=ENRICH_COMPANY(A2)”, with the company name entered in cell A2. This will automatically fill in data for the following columns: Company Name, Website, Foundation, Revenue, Employees, Industry, Description, Country, City, and Street.

How to Use the Formula

To use the formula, you have two options:

Option 1: Copy the template spreadsheet (easier)

  1. Enter this Google spreadsheet – https://docs.google.com/spreadsheets/d/1PVqhQXOvf3yT9pp1mZzOtKV9iSv38GYJgwUf2zQFdQI/edit?usp=sharing.
  2. Click “File” then “Make a copy”.
  3. This will create a copy of the template spreadsheet with the formula in your Google Sheets.
  4. In the “Explorium Settings” worksheet, paste your API key into cell A2.

Option 2: Manually copy the code

/**
 * Find company information by a company name using Explorium API
 *
 * @param {string} companyName A company name
 * @return if found the Company name, Company website, Foundation year, Yearly revenue range all sites, Number of employees range all sites, NAICS industry group description, Business description, Country, City and Street
 * @customfunction
 */
function ENRICH_COMPANY(companyName) {
    // Define here the fields you want to take from Explorium
    // You can view all available Firmographics fields at https://developers.explorium.ai/reference/business-firmographics-firmographics
    const EXPLORIUM_FIELDS_c = [
        "Company name", "Company website", "Foundation year", "Yearly revenue range all sites", "Number of employees range all sites",
        "NAICS industry group description", "Business description", "Country", "City", "Street"
    ];

    // Send HTTP request to Firmographics Explorium API - https://developers.explorium.ai/reference/business-firmographics-firmographics
    const response = UrlFetchApp.fetch("https://app.explorium.ai/api/bundle/v1/enrich/firmographics", {
        method: "post",
        payload: JSON.stringify([{
            "company": companyName
        }]),
        headers: {
            "Content-Type": "application/json",
            "x-explorium-ref": "gsheets_formula_enrich_company",
            "API_KEY": readExploriumAPIKey()
        },
        muteHttpExceptions: true
    });

    const responseCode = response.getResponseCode();
    const responseJson = JSON.parse(response);

    if (responseCode !== 200)
        return responseJson.message;

    const signals = responseJson[0];
    const relevantFields = EXPLORIUM_FIELDS_c.map(field => signals[field]);

    return [relevantFields];
}

// Reads Explorium API Key from Settings sheet, B1 cell
function readExploriumAPIKey() {
  var spreadsheet = SpreadsheetApp.getActiveSpreadsheet();
  var worksheet = spreadsheet.getSheetByName("Settings");
  var cell = worksheet.getRange("B1");
  return cell.getValue();
}
  1. Copy the above code
  2. Create or enter an existing spreadsheet
  3. Go to “Extensions” then “Apps Scripts”.
  4. Paste the code into the editor.
  5. Click the save icon.
  6. Create a worksheet named “Explorium Settings” with the first cell (A1) labeled “API Key”.
  7. Paste your API key into cell A2.

Unlock the Full Potential of Your Data with Explorium

This post has introduced you to the convenience and power of the Google Sheet formula for enriching company names with firmographic data using Explorium’s API. With just a few clicks, you can quickly access a wealth of information about any company. But that’s not all – Explorium has a vast catalog of data beyond just firmographics, including tech stack data, growth indicators, web presence data, points of interest data, people contact information and much more! You can browse Explorium’s full data catalog, as well as access its API documentation. If you’re interested in using Explorium for your own data enrichment needs, be sure to sign up for a free account. Thank you for reading and we look forward to helping you with all your data enrichment needs!