DEV Community

Cover image for The Best New API For People Data and Profiles: KelvinData.com
Zeeson
Zeeson

Posted on • Originally published at zeeson.hashnode.dev

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

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

Connect with your customers in a matter of seconds

Ibrahim Saliman Zainab

Published on Sep 30, 2021

9 min read

Are you considering alternatives to FullContact, Clearbit, ZoomInfo, and other similar people data platforms? KelvinData 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. 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

What you can use KelvinData APIs for

Where can I get a KelvinData API Key

Kelvin Data API

Kelvin Data API - NodeJs

Kelvin Data API - PHP

KelvinData API - Python

Example Application

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

The complete app.js form

Reasons to choose Kelvindata

  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 by clicking either of the Get API key, Signin, Get started or Launch button from the homepage.

kelvin-2-2.png

Step 2:

Enter your email address in the login form 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

kelvindata-checkemail.png

kelvin-email-signin.png

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

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 =>console.log(res))
  .catch(err =>console.error(err));
Enter fullscreen mode Exit fullscreen mode

Kelvin Data API - PHP

$curl = curl_init();

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

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

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
Enter fullscreen mode Exit fullscreen mode

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)
Enter fullscreen mode Exit fullscreen mode

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: 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
  2. NPM: Node Package Manager is loaded together with Nodejs. It is needed to install a few packages we will use.
  3. Express : Express is a popular Nodejs web application framework used for building servers and APIs. It can be downloaded via here
  4. EJS: Embedded JavaScript Templates is a templating language that allows to generate HTML markup with plain JavaScrip. Check here for more details
  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"
  }
}
Enter fullscreen mode Exit fullscreen mode

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

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, ()=>{
    console.log("App listening on port 2000")
})
Enter fullscreen mode Exit fullscreen mode

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

  • Express is required from which appconstant 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 ejsas our templating engine
  • Server was created listening on port 2000

GET and POST APIs

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

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

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) => {
res.render('index.ejs');
})

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

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

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

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 as well and lets connect to talk software!

Top comments (0)