The Best New API For People Data and Profiles: KelvinData.com
Published: 2021-09-30 13:54:51

## The Best New Source For People Data and Profiles: KelvinData.com

## Connect with your customers in a matter of seconds

[](https://hashnode.com/@Zeeson)

[Ibrahim Saliman Zainab](https://hashnode.com/@Zeeson)

[Published on Sep 30, 2021](https://zeeson.hashnode.dev/the-best-new-source-for-people-data-and-profiles-kelvindatacom)

9 min read

Are you considering alternatives to FullContact, Clearbit, ZoomInfo, and other similar people data platforms? [KelvinData](https://www.kelvindata.com/) got you covered. 

Hi devs, Today I will like to show you a great data API that can save you hours of development time. And that is [KelvinData.com](https://www.kelvindata.com/). KelvinData makes millions of people's records available through modern APIs. With  KelvinData, you can search across 1.5 billion people's records in a single line of code.

Both GraphQL API, and a REST API are available, so it is easy to choose anyone you want for your next project. Do not worry! I will also show you how you can easily get started using KelvinData APIs and how you can integrate the APIs into your application with a code-along example. 

You can take a look at the table of content below to see what we are going to cover in this post.

## Table of Content

[Reasons to choose](#reasons-to-choose)

[What you can use KelvinData APIs for](#what-you-can-use-kelvindata-apis-for)

[Where can I get a KelvinData API Key](#where-can-i-get-a-kelvindata-api-key)

[Kelvin Data API](#kelvin-data-api)

[Kelvin Data API - NodeJs](#kelvin-data-api-nodejs)

[Kelvin Data API - PHP](#kelvin-data-api-php)

[KelvinData API - Python](#kelvindata-api-python)

[Example Application](#example-application)

[Pre-requisite - What we need to build this great app](#pre-requisite-what-we-need-to-build-this-great-app)

[The complete app.js form](#the-complete-app.js-form)

## Reasons to choose [Kelvindata](https://www.kelvindata.com/)

1. Get nearly anyone's profile
2. Organized data at your fingertips
3. Powerful and simple platform
4. Easy API integration

## What you can use KelvinData APIs for

There is countless exciting stuff you can do with Kelvindata APIs. It all depends on your use case. KelvinData gives you access to billions of users which can allow making great decisions for your business. some of the stuff you can do with kelvinData include:

* An application that allows users to get full information about a person they want to know more about;
* Looking up Social media profiles for your users when they sign up; Useful for any company that wishes to tailor ads to specific users.
* Building a chrome extension that finds the email of a LinkedIn profile;
* Making a caller ID app;
* Building a personal CRM.

KelvinData APIs can help you understand your users better and find a way to personalize and tailor the way you approach them and serve them the best they required. 

## Where can I get a KelvinData API Key?

First of all, I will like to take us to the kevindata Dashboard to show us how we can generate our API key. 

Step 1:

Login in to [kelvindata](https://www.kelvindata.com/dashboard) by clicking either of the [Get API key](https://www.kelvindata.com/dashboard), [Signin](https://www.kelvindata.com/dashboard), [Get started](https://www.kelvindata.com/dashboard) or [Launch](https://www.kelvindata.com/dashboard) button from the [ homepage](https://www.kelvindata.com/).

![kelvin-2-2.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1632397334779/3GkhahOai.png?auto=compress,format&format=webp)

Step 2: 

Enter your email address in the [login form](https://www.kelvindata.com/sign-in) and click continue. You can now check your email for a secure sign-in link. A personalized link has just been sent to your mail. Click the Sign In button or sign in by copying the sent link into your browser address bar. You will be redirected to the dashboard page. 

![kelvindata-signin.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1632398118258/Cik2gvbFB.png?auto=compress,format&format=webp)

![kelvindata-checkemail.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1632398143555/R3SiHnXr-.png?auto=compress,format&format=webp)

![kelvin-email-signin.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1632398530681/JW-uabvDL.png?auto=compress,format&format=webp)

Step 3:

Congratulations! you are now in the dashboard of Kelvin Data. From here, you can manage your data access, create and manage API keys, search for data on the search page and read the documentation. Also, there is a default API key named Alpha generated for you for testing purposes. You can always create and delete yours as you required. API keys are very important as they are required for every call to the API server; from authentication to getting data. 

## Kelvin Data API

The KelvinData API can be used to find a person's information such as:

* Email
* Phone number
* company profile
* Social media profiles
* and so much more

The right side of the page allows you to select the programming language of your choice. You can drop KelvinData API into any project of any programming language. Once selected, the code snippet containing the code will change to the specific language selected. Then followed the Authentication field where the API key should be inserted. Remember that the API key is needed to make any call. 
The left side of the page allows you to see your request history. The MetaData fields below that allow you to insert the detail of the user you want to search. One metadata is enough to search for the whole information about the user. You can use email, phone number, or LinkedIn URL. 
As you fill the fields, the code snippet is automatically filled up, after which you can click the **Try It!** button under the code snippet. The response will display a long object that contains the person's information.

![kelvin-getapi.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1632411729224/_WKZhbwxn.png?auto=compress,format&format=webp)

## Kelvin Data API - NodeJs

install the API SDK:

npm install api --save

```
const sdk = require('api')('@kelvin-data/v1.0#6o3ak2rktrh101h');

sdk.auth('6##################################');
sdk['searchV2_query']({email: 'kelvindata@google.com'})
  .then(res =&gt;console.log(res))
  .catch(err =&gt;console.error(err));
```

## Kelvin Data API - PHP

```
$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_URL =&gt; "https://api.kelvindata.com/rest/v1/search-v2?email=vpaquet@google.com&amp;apiKey=6%23#################################",
  CURLOPT_RETURNTRANSFER =&gt; true,
  CURLOPT_ENCODING =&gt; "",
  CURLOPT_MAXREDIRS =&gt; 10,
  CURLOPT_TIMEOUT =&gt; 30,
  CURLOPT_HTTP_VERSION =&gt; CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST =&gt; "GET",
  CURLOPT_HTTPHEADER =&gt; [
    "Accept: application/json"
  ],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
```

## KelvinData API - Python

install the API SDK:

python -m pip install requests

```
import requests

url = "https://api.kelvindata.com/rest/v1/search-v2"querystring = {"email":"kelvindata@google.com","apiKey":"6##########################"}

headers = {"Accept": "application/json"}

response = requests.request("GET", url, headers=headers, params=querystring)

print(response.text)
```

Taking a closer look at the kelvindata API, the auth required the API keys. While the user parameter consists of a JSON object with key-value pairs with at least one field that has to be included in the metadata. Each field represents data about the person available before the request is made. It can be an email, a phone number, or a Linkedin URL.

## Example Application

Now let's dive deeper by showing an example of how to use the KelvinData API in the real-world application. Yeah! it is unlikely to use the API as a standalone app or as the main component of any application. It will rather be a key aspect of an application component that makes life easy for you. 
However, Let's create a pretty Nodejs application that will allow users to fill in the data of someone they want to know more about. Let's get started!

In this application, we will create a form and allow users to fill the form with the data of the person they want. Upon submitting the form, it will fetch the whole information about the person. 

## Pre-requisite - What we need to build this great app

1. [NodeJs](https://nodejs.org/en/download/): Nodejs is JavaScript run time enviroment that allows you to build serverside applications. It is needed to build this application. In case you don't have it installed on your machine, NodeJs can be downloaded via [here](https://nodejs.org/en/download/)
2. NPM: Node Package Manager is loaded together with Nodejs. It is needed to install a few packages we will use.
3. [Express](https://expressjs.com/en/starter/installing.html) : Express is a popular Nodejs web application framework used for building servers and APIs. It can be downloaded via [here](https://expressjs.com/en/starter/installing.html)
4. EJS: Embedded JavaScript Templates is a templating language that allows to generate HTML markup with plain JavaScrip. [Check here for more details ](https://ejs.co/)
5. Kelvin Data SDK: This is the Software Development Kit that makes life easier for us to easily plug the Kelvindata API into our application.

Let's start by creating a folder named kelvindata-api. the folder will house the files of the pretty application we want to build. feel free to name it anything you like. 

## Initialize npm

Inside the kelvindata-api folder, we need to initialize npm by doing: 

npm init --y

This creates package.json file for our app. Package.json file is the structure of our application. 
On the app name, you can change it to app.js. We then create a file called app.js which will serve as an entry for our application. 

## Installing packages

npm install express ejs api

## Package.json file

```
 "name": "kelvindata-api",
  "version": "1.0.0",
  "main": "app.js",
  "author": "Kelvin Data Team",
  "license": "MIT",
  "scripts": {
    "start": "nodemon app.js"
  },
  "dependencies": {
    "api": "^3.4.0",
    "ejs": "^3.1.6",
    "express": "^4.17.1"
  }
}
```

## Files

Let's create the remaining files: 

1. Create an app.js file in the root directory of the app;
2. Create a view folder and index.ejs file inside the folder;
3. Create a public folder and create index.css file inside it.

## File structure

![kelvin-filestructure.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1632510118708/qv136dd0C.png?auto=compress,format&format=webp)

## App.js file

In the app.js file, we will require our packages including the kelvindata SDK and start our sever. 

```
const express = require("express");const ejs   = require("ejs");const sdk = require('api')('@kelvin-data/v1.0#6o3ak2rktrh101h');const app = express();

app.use(express.json())
app.use(express.urlencoded({ extended: true }));
app.set("view engine", "ejs");
app.use(express.static('public'));const port = 2000app.listen(2000, ()=&gt;{
    console.log("App listening on port 2000")
})
```

Let's look at what is in the app.js file closely. 

* **Express** is required from which **app**constant is used to save the express function. With that, we can do a lot of stuff with express.
* we use **json** to be able to format our result in JSON.
* we use **express.urlencoded** to parse our form input
* we use **ejs**as our templating engine
* Server was created listening on **port 2000**

## GET and POST APIs

```
app.get('/', (req, res) =&gt; {
res.render('index.ejs');
})

app.post('/get-details', (request, response) =&gt; {const userdata = request.body.userdataconsole.log(userdata)
    sdk.auth('your-api-key');
    sdk['searchV2_query']({email: userdata})
  .then(res =&gt; response.json(res))
  .catch(err =&gt;console.error(err));
})
```

In the app.js file, we have gotten 2 APIs, one GET API that displays our entry page (index.ejs) which is also the form page for users to enter the information of the person they wish to get more information about. 
the second is the POST API that gets the form detail and sends it to the kelvindata SDK. The SDK will look up the data from kelvindata database and send it back to the user asking for the details. the SDK required your API key. userdata constant will grab the request from the form. 

## The complete app.js form

app.js

```
const express = require("express");const ejs   = require("ejs");const sdk = require('api')('@kelvin-data/v1.0#6o3ak2rktrh101h');const app = express();

app.use(express.json())
app.use(express.urlencoded({ extended: true }));
app.set("view engine", "ejs");
app.use(express.static('public'));

app.get('/', (req, res) =&gt; {
res.render('index.ejs');
})

app.post('/get-details', (request, response) =&gt; {const userdata = request.body.userdataconsole.log(userdata)
    sdk.auth('your-api-key');
    sdk['searchV2_query']({email: userdata})
  .then(res =&gt; response.json(res))
  .catch(err =&gt;console.error(err));
})const port = 2000app.listen(2000, ()=&gt;{console.log("App listening on port 2000")
})
```

## Routes

The index route displays the form, while the details route displays the JSON data of the requested person from kelvin data. When the users enter the email of the person they want to know more about, the form load and display the json data of the person. 

Index.ejs

```
&lt;!DOCTYPE html&gt;&lt;htmllang="en"&gt;&lt;head&gt;&lt;title&gt;Kelvin Data&lt;/title&gt;&lt;linkrel="stylesheet"href="/index.css"&gt;&lt;/head&gt;&lt;body&gt;&lt;divclass="login-container"&gt;&lt;div&gt;&lt;h3&gt; Who do you want to know more about ?&lt;/h3&gt;&lt;formaction="/get-details"method="POST"&gt;&lt;divclass=""&gt;&lt;divclass=""&gt;&lt;labelfor=""&gt;Person's Data&lt;/label&gt;&lt;divclass="user-form"&gt;&lt;inputid="userdata"type="text"name="userdata"required &gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;divclass="btn user-form"&gt;&lt;inputtype="submit"value="CONTINUE"&gt;&lt;/div&gt;&lt;/form&gt;&lt;/div&gt;&lt;/div&gt;&lt;/body&gt;&lt;/html&gt;
```

## Conclusion

We have come to the end of this tutorial. Kelvin Data API is easier and simple to integrate. The SDK also made it really easy to drop into any application. Additionally, the documentation is simple to follow along. The app example is just to show you a bit of what you can do with Kelvin Data API. 
Kelvin Data API is really what you need to move your (or your clients') business forward. 

Let me know in the comment section if you have any questions or there is anything you wish to add to the sample tutorial. 

Thank you for your time.

Please like and share if you enjoy this tutorial. 

You can follow me on [Twitter](https://twitter.com/salimanibrahimz) as well and lets connect to talk software!