Search API Connector Documentation

Print

Import Hunter Data to Google Sheets

In this guide, we’ll walk through how to gather email leads from the Hunter API directly into Google Sheets, using the API Connector add-on for Sheets. We'll first get an API key from Hunter, and then set up a request to pull in email data to your spreadsheet.

Part 3 of this article includes a simple demo of how to make your own lead-gathering tool.

Contents

Before You Begin

Click here to install the API Connector add-on from the Google Marketplace.

Part 1: Get Your Hunter API Key

  1. If you haven't already, sign up for a Hunter account. While logged in, navigate to https://hunter.io/api_keys.
  2. It really doesn't get any easier than this. Your API key will be visible on this page, so just click to copy it. That's it, you now have access to the Hunter API!
    hunter-img1

Part 2: Pull Hunter API Data into Sheets

For our first API request, we'll get a list of email addresses from a particular company domain. Substitute in your own domain name of interest, and your own API key where it says your_api_key. Here's a sample request setup:

  1. Open up Google Sheets and click Extensions > API Connector > Open > Create request.
  2. In the request form enter the following:
    • ApplicationCustom
    • MethodGET
    • Request URLhttps://api.hunter.io/v2/domain-search?domain=stripe.com&api_key=your_api_key
  3. Create a new tab and click Set current to use that tab as your data destination.
  4. Name your request and click Run. A a moment later you’ll see a list of email addresses associated with the domain in your Google Sheet:
    hunter-response

Part 3: Get More Hunter API Data

Experiment with endpoints and query strings as described in their documentation to see other types of Hunter data. For example, you can find an email address of a user if you know their company name, first name, and last name as follows:

https://api.hunter.io/v2/email-finder?domain=DOMAIN&first_name=FIRST_NAME&last_name=LAST_NAME&api_key=API_KEY

Make sure to substitute values where indicated by capital letters. Combine this with the IMPORTAPI() Custom Sheets Function to create your own lead gathering tool.

hunter-email-finder
If you are working with lists of leads from different sources, these names may be written differently (e.g. "Jack Jones" vs. "Jack S. Jones"). Use the fuzzy-match Flookup add-on for Sheets to match and merge records together into a master list.

Part 4: Handle Pagination

By Default, Hunter will only return 10 records at a time. To get more, use the 'offset' and 'limit' parameters, as described in their documentation.
hunter-pagination

With API Connector, you can either run these manually or set up pagination handling (paid feature) to loop through them automatically like this:

  • Pagination: offset-limit
  • Offset parameter: offset
  • Limit parameter: limit
  • Limit value: 100
  • Run until: choose when to stop fetching data

pagination-offset-limit

Part 5: API Documentation

Official API documentation: https://hunter.io/api/v2/docs#introduction

Leave a Comment

Jump To...