Professional Networks Email Finder API

August 30, 2022

7 min read

Table of contents * Introduction * Getting Started * Prerequisites * How to get B2B emails with Work Email Lookup API Endpoint * How to get personal emails...

Table of contents

Introduction

It is a common use case to reach out to a professional networks profile for hiring or sales. the platform inMail is limited because you have to pay a significant price per outreach. You will probably need an external solution.

Some tools help you fetch a work email from any professional networks profile. But more often or not, these are tools with a user interface intended for end-users. If you're seeking a user interface tool, this is not the article for you.

In this article, you'll learn how to use Enrich Layer's Contact API to get verified B2B emails and personal numbers from user profiles programmatically.

This article is for teams with software engineers looking to implement an Email Finding API within their product or business workflow, so you can fetch B2B emails at scale, programmatically. With Enrich Layer's Contact API, You can get verified work emails of any professional networks profile.

On top of just work emaills, you can also get the following data with Enrich Layer API:

  • Personal emails

  • Personal number

  • Social media accounts

In addition, emails returned by our API are:

  • Verified with a 95%+ deliverability guarantee

  • Always fresh - even if the profile has changed a job, the API can fetch his latest work email.

Getting Started

This tutorial will show you how to query the Contact API endpoints in Node.js using express and axios. This tutorial aims to show you how easy it is to use the Contact API and get your results.

Steps we'll cover
  • How to get B2B emails with Work Email Lookup API Endpoint.

  • How to get personal emails with Personal Email Lookup API Endpoint.

  • How to get personal numbers with Personal Number Lookup API Endpoint.

Prerequisites

In your preferred working directory, initialize a new project by running:

npm init -y Next, run the following command to install the packages to bootstrap your application:

npm install express axios dotenv

  • express - a minimal and flexible Node.js framework to bootstrap our server.

  • axios - a lightweight HTTP-based data fetching library to query the Contact API endpoints.

  • dotenv - lets us load environment variables seamlessly into the node.js process.

To begin using Enrich Layer's Contact API, you'll need an API KEY to make requests to the various endpoints. Sign up here to get started.

With your API KEY ready (you can copy it from API Key and billing tab in your dashboard), create a .env file in your project root directory and add the following code to it:

API_ Next, in your project root directory create another file index.js and add the following code to it:

`import express from 'express'; import dotenv from 'dotenv'; import axios from 'axios';

const

const

dotenv.config();

app.listen(port, () => { console.log(); }); Next, add"type": "module"inpackage.jsonto let Node.js know we're writing ES6 code and edit thescript` field to the following:

"scripts": \{ "dev": "node index.js" \} Run npm run dev in the terminal and the following should be logged to the console if everything went smoothly:

App connected successfully on port: 8000

How to get B2B emails with Work Email Lookup API Endpoint

The Work Email Lookup Endpoint lets you get the work email address of a professional networks profile.

Endpoint URL

The endpoint URL to get a professional networks profile work email is platform/profile/email, and every request you make to the endpoint costs 3 credits.

In this tutorial, We'll explore two methods by which you can leverage the URL to get a person's work email in your applications.

With webhooks

The Work Email Lookup Endpoint may not return results immediately since we need to perform real-time heuristics to fetch and verify the email. The endpoint requires a mandatory parameter: the platform_profile_url. This is the professional networks profile URL of the person whose work email we're looking for.

Alternatively, by adding an optional callback_url parameter to the request, we can create a webhook with Webhook.site to listen to the result once it's available. Webhook.site gives us a randomly generated URL to listen to, so whenever we query the work email endpoint, the response, which is an object in the following format: “, will be sent to your Webhook.site custom URL.

To get started, visit Webhook.site to get your custom URL. The webpage should look like the below:

Copy the URL and add it to the WEBHOOK_URL variable in your code like so:

const WEBHOOK_ Here's the complete code for this example:

`// index.js

const

const

dotenv.config();

const WORK_EMAIL_; const the platform_PROFILE_; const WEBHOOK_

const params: { the platform_profile_url: the platform_PROFILE_URL, callback_url: WEBHOOK_URL } };

const () => { try { return await axios(workEmailConfig); } catch (err) { throw new Error(err) } }

const getWorkEmail();

console.log('Work Email:', email.data.email_queue_count);

app.listen(port, () => { console.log(); }); ` Now if you visit Webhook.site the response of the query can be seen as shown below:

In our example, the professional networks profile we searched for doesn't have a work email, so the email and status fields in the response returned null and email_not_found, respectively.

With Dashboard logs

What's interesting to note is that Enrich Layer automatically logs every response to the dashboard whenever the Work Email API Endpoint is queried. So log on to your dashboard and navigate the Work Email Lookup Logs tab to see it in action.Here's what it looks like with the logs of our previous queries:

The dashboard logs also provide additional information, such as the timestamp of the query and the professional networks profile URL we're searching for, which is pretty awesome. You can also export the logs by clicking the Download as CSV button on your dashboard.

How to get personal emails with Personal Email Lookup API Endpoint

With the Personal Email Lookup API Endpoint you can get the list of personal emails belonging to a professional networks profile at the cost of 1 credit per every email returned.

Endpoint URL

The endpoint for the personal email lookup is “.

Parameters

The endpoint requires a mandatory parameter: the platform_profile_url, which is the professional networks profile URL of the person whose personal email we're looking for, and an optional email_validation parameter to specify if we want an additional validation of the emails found in the profile (this comes at an additional cost of 1 credit per every email that is found). The email_validation parameter accepts a string value of include. Defaults to exclude.

// axios config example params: \{ email_validation: 'include' \}

Response

The personal email lookup returns an object with two properties: an emails field containing a list of personal emails of the given professional networks profile, and an invalid_emails field containing invalid emails of a professional networks profile. If the email_validation parameter isn't specified, the invalid_emails field will return an empty array.

The demo below shows how easy it is to use the endpoint:

`// index.js

{ … } const PERSONAL_EMAIL_; const the platform_PROFILE_;

const params: { the platform_profile_url: the platform_PROFILE_URL, email_validation: "include", }, };

const () => { try { return await axios(personalEmailConfig); } catch (err) { throw new Error(err); } };

const getPersonalEmail();

console.log("Personal Email:", email.data);

{ … } ` Which logs the following response to the console:

Personal Email: \{ emails: [ '[email protected]' ], invalid_emails: [ '[email protected]' ]

How to get personal numbers with Personal Number Lookup API Endpoint

With the Personal Number Lookup API Endpoint you can get the list of personal numbers belonging to a professional networks profile at the cost of 1 credit per every contact number returned.

Endpoint

The endpoint for the personal number lookup is: .

Parameters

The personal number lookup endpoint accepts a single required parameter: the platform_profile_url. This is the URL of the professional networks profile whose number we're looking for.

Response

The endpoint returns an object with a numbers field which is an array containing all contact numbers of a professional networks profile.

Example code:

`{…} const PERSONAL_CONTACT_NUMBER_; const the platform_PROFILE_;

const params: { the platform_profile_url: the platform_PROFILE_URL, }, };

const () => { try { return await axios(personalContactNumberConfig); } catch (err) { throw new Error(err); } };

const getPersonalContactNumber();

console.log("Personal number:", number.data); {…} ` The above example logs the following response to the console:

Personal number: \{ numbers: [ '+1123123123' ] \}

Summary

B2B work emails are not easily available on user profiles. You need external tools, and most external tools do not work with user profiles programmatically, at scale.

With Enrich Layer's Contact API for user profiles, you get to enjoy a fast and reliable experience scaling your applications with fresh and rich data without worrying about compliance or legal issues. Get started now at to get a plan that suits your development need.