Getting Started With the Kelvin Data API
Tags: webdev, graphql, javascript, tutorial
Published: 2021-09-22 07:56:27

👉 Learn How to navigate over 1.8 billion people records by email, phone number, name, social media, and more in a single line of code  with the Kelvin Data API

If you are new to the Kelvin Data API, then you've come to the right place!

Intro to Developer Resources
* [API documentation] (https://kelvin-data.readme.io/reference/intro)
* [Installation Guide](https://kelvin-data.readme.io/reference/searchv2_query)
* [Javascript Client Playground] (https://api.kelvindata.com/graphql?query=query%20exampleQuery%20%7B%0A%20%20searchV2%28phone%3A%20%227043628945%22%29%20%7B%0A%20%20%20%20emailAddresses%0A%20%20%20%20name%20%7B%0A%20%20%20%20%20%20first%0A%20%20%20%20%20%20last%0A%20%20%20%20%7D%0A%20%20%7D%0A%7D)
* [Authentication Keys] (https://kelvin-data.readme.io/reference/authentication)

###Introduction
This reference will get you started with working with the Kelvin Data API

If this is your first look at the Kelvin Data API, visit our [HomePage](https://www.kelvindata.com/) for a quick Overview.

###Conventions and Architecture
* The base URL  for sending API Requests is https://www.kelvindata.com

* The Kelvin Data follows both <b>RESTful</b> and <b>GraphQl</b> Conventions and <b>HTTPS</b> is required for all API Requests.
* API calls are performed with the <b>GET</b> request as we are extracting information from both page and database resources.
* Request and Response bodies are encoded in <b>JSON</b> format

###Code Samples & SDKs
* Sample requests and responses are shown for each endpoint as illustrated below:
![Response](https://www.kelvindata.com/_next/image?url=https%3A%2F%2Fcdn.kacdn.org%2Ffile%2Fkacdn1%2Fkelvindata%2Fhero.png&w=3840&q=75)
* Requests are shown using the Kelvin data [cURL](https://curl.se/) as shown below:These make it easy to copy,paste,modify as you work  with the API.
```javascript
  curl --request GET \
     --url https://api.kelvindata.com/rest/v1/search-v2 \
     --header 'Accept: application/json'
```
* You may also choose any language or library of your preference that allows you to make <b>HTTP</b> requests.

###Authentication
* All API requests/calls with the Kelvin data API  require an API Key for Authentication.
* You can create and manage your API Keys on your [developer page](https://www.kelvindata.com/dashboard) on the Kelvin data dashboard.
* Authentication is in both the <b>REST</b> & <b>GraphQl</b> architectural patterns  though slightly different. take a look below!

######REST API Authentication:
* Include a URL query parameter apiKey as shown:
```javascript
https://api.kelvindata.com/rest/v1/search-v2?phone=4158675309&apiKey=your-apikey-here
```

######GRAPHQL Authentication:
* Set the <b>Authorization header</b>  to Bearer your-apikey-here as illustrated below:
```javascript
{"Authorization": "Bearer your-apikey-here"}

curl 'https://api.kelvindata.com/graphql' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer your-apikey-here' \
--data-binary '
{"query":"query exampleQuery { searchV2(phone: \"7043628945\") { emailAddresses name { first last } } }"}
'
```
* Learn more about it in our [Authentication guide](https://kelvin-data.readme.io/reference/authentication)

###Conclusion
I am just getting your feet wet in this blog post. Check out our [Kelvin data docs](https://kelvin-data.readme.io/reference/intro) for more capabilities

###Get in Touch
* Want to get in Touch? We'd love to hear from you! Send us a message or inquiry Hello@KelvinData.com