Quickstart - Cleaner APIs

A fast hands-on introduction to the Cleaner APIs

Getting Started

In order to use one of our Cleaner APIs, you must have an active API key. You can look up your API key by logging into our self-serve dashboard and going to the API Keys section.

👍

Need an API Key?

If you don't have an API key, you can easily create one by signing up for a self-serve account. Check out our Self-Serve Quickstart Guide, which walks you through the sign-up process as well as how to use the self-serve API dashboard.

Simple Example

As mentioned in the Overview, the Cleaner APIs are a way to clean company, school and location data in order to get the best results from your API queries. To use the Cleaner APIs, you will need a set of Input Parameters for the particular Cleaner API you are using.

Here's a quick example that demonstrates cleaning a company record with a website of peopledatalabs.com:

# See https://github.com/peopledatalabs/peopledatalabs-python
from peopledatalabs import PDLPY

# Create a client, specifying your API key
client = PDLPY(
    api_key="YOUR API KEY",
)

# Create a parameters JSON object
query_string = {"website":"peopledatalabs.com"}

# Pass the parameters object to the Company Cleaner API
response = client.company.cleaner(**query_string)

# Print the API response
print(response.text)
// See https://github.com/peopledatalabs/peopledatalabs-js
import PDLJS from 'peopledatalabs';

// Create a client, specifying your API key
const PDLJSClient = new PDLJS({ apiKey: "YOUR API KEY" });

// Create a parameters JSON object
const queryString = {
  website: "peopledatalabs.com"
}

// Pass the parameters object to the Company Cleaner API
PDLJSClient.company.cleaner(queryString).then((response) => {
  // Print the API response
  console.log(response);
}).catch((error) => {
  console.log(error);
});
# See https://github.com/peopledatalabs/peopledatalabs-ruby
require 'peopledatalabs'

# Set your API key
Peopledatalabs.api_key = 'YOUR API KEY'

# Pass parameters to the Company Cleaner API
response = Peopledatalabs::Cleaner.company(kind: 'website', value: "peopledatalabs.com")

# Print the API response
puts response
package main

import (
    "fmt"
)

// See https://github.com/peopledatalabs/peopledatalabs-go
import (
    pdl "github.com/peopledatalabs/peopledatalabs-go"
    pdlmodel "github.com/peopledatalabs/peopledatalabs-go/model"
)

func main() {
    // Set your API key
    apiKey := "YOUR API KEY"
    // Set API key as environmental variable
    // apiKey := os.Getenv("API_KEY")

    // Create a client, specifying your API key
    client := pdl.New(apiKey)
    
    // Create a parameters JSON object
    queryString := pdlmodel.CleanCompanyParams{Website: "peopledatalabs.com"}

    // Pass the parameters object to the Company Cleaner API
    response, err := client.Company.Clean(queryString)
  
    // Check for successful response
    if err == nil {
        // Print the API response
        fmt.Println(response)
    }  
}
import requests

# Set your API key
API_KEY = # ENTER YOUR API KEY

# Set the Company Cleaner API URL
url = "https://api.peopledatalabs.com/v5/company/clean"

# Create a parameters JSON object
query_string = {"website":"peopledatalabs.com"}

# Set headers
headers = {
    'accept': "application/json",
    'content-type': "application/json",
    'x-api-key': API_KEY
}

# Pass the parameters object to the Company Cleaner API
response = requests.request("GET", url, headers=headers, params=query_string)

# Print the API response
print(response.text)

The response returned is a cleaned company profile if the input parameters passed matches a record in our company dataset:

{
  "status": 200,
  "name": "people data labs",
  "size": "11-50",
  "id": "peopledatalabs",
  "founded": 2015,
  "industry": "computer software",
  "location": {
    "name": "san francisco, california, united states",
    "locality": "san francisco",
    "region": "california",
    "metro": "san francisco, california",
    "country": "united states",
    "continent": "north america",
    "street_address": "455 market street",
    "address_line_2": "suite 1670",
    "postal_code": "94105",
    "geo": "37.77,-122.41"
  },
  "linkedin_url": "linkedin.com/company/peopledatalabs",
  "linkedin_id": "18170482",
  "facebook_url": "facebook.com/peopledatalabs",
  "twitter_url": "twitter.com/peopledatalabs",
  "website": "peopledatalabs.com",
  "ticker": null,
  "type": "private",
  "raw": [],
  "score": 3.0,
  "fuzzy_match": false
}

If you don't get this response, check out our errors page for more information.



Did this page help you?