Examples - Company Enrichment API

Code examples and walkthroughs using the Company Enrichment API

Examples

When using a URL, all query parameters should be separated by an ampersand (&). When using code, all request parameters should be lists.

All examples are provided in cURL, Python, Ruby, Go and JavaScript. If you aren't comfortable working in any of these languages, feel free to use this handy tool to convert from cURL to the language of your choice.

Website

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

# Create a client, specifying an API key
client = PDLPY(
    api_key="YOUR_API_KEY",
)

query_string = {"website":"google.com"}

response = client.company.enrichment(**query_string)

print(response.text)
curl -X GET -G \
  'https://api.peopledatalabs.com/v5/company/enrich'\
  -H 'X-Api-Key: xxxx'\
  --data-urlencode 'website=google.com'
// See https://github.com/peopledatalabs/peopledatalabs-js
import PDLJS from 'peopledatalabs';

const PDLJSClient = new PDLJS({ apiKey: "YOUR API KEY" });

const queryString = {"website":"google.com"}

PDLJSClient.company.enrichment(queryString).then((data) => {
    console.log(data);
}).catch((error) => {
    console.log(error);
});
# See https://github.com/peopledatalabs/peopledatalabs-ruby
require 'peopledatalabs'

Peopledatalabs.api_key = 'YOUR API KEY'

query_string = {"website":"google.com"}

response = Peopledatalabs::Enrichment.company(params: query_string)

puts response
package main

import (
    "fmt"
 )

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

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

    client := pdl.New(apiKey)
    
    queryString := pdlmodel.CompanyParams{Website: "google.com"}
    
    params := pdlmodel.EnrichCompanyParams{
        CompanyParams: queryString,
    }
    
    response, err := client.Company.Enrich(params)
    if err == nil {
        fmt.Println(response)
    }  
}
import requests

url = "https://api.peopledatalabs.com/v5/company/enrich"

query_string = {"website":"google.com"}

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

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

print(response.text)

Name

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

# Create a client, specifying an API key
client = PDLPY(
    api_key="YOUR_API_KEY",
)

query_string = {"name":"Google, Inc."}

response = client.company.enrichment(**query_string)

print(response.text)
curl -X GET -G \
  'https://api.peopledatalabs.com/v5/company/enrich'\
  -H 'X-Api-Key: xxxx'\
  --data-urlencode 'name=Google, Inc.'
// See https://github.com/peopledatalabs/peopledatalabs-js
import PDLJS from 'peopledatalabs';

const PDLJSClient = new PDLJS({ apiKey: "YOUR API KEY" });

const queryString = {"name":"Google, Inc."}

PDLJSClient.company.enrichment(queryString).then((data) => {
    console.log(data);
}).catch((error) => {
    console.log(error);
});
# See https://github.com/peopledatalabs/peopledatalabs-ruby
require 'peopledatalabs'

Peopledatalabs.api_key = 'YOUR API KEY'

query_string = {"name":"Google, Inc."}

response = Peopledatalabs::Enrichment.company(params: query_string)

puts response
package main

import (
    "fmt"
 )

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

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

    client := pdl.New(apiKey)
    
    queryString := pdlmodel.CompanyParams{Name: "Google, Inc."}
    
    params := pdlmodel.EnrichCompanyParams{
        CompanyParams: queryString,
    }
    
    response, err := client.Company.Enrich(params)
    if err == nil {
        fmt.Println(response)
    }  
}
import requests

url = "https://api.peopledatalabs.com/v5/company/enrich"

query_string = {"name":"Google, Inc."}

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

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

print(response.text)

Ticker

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

# Create a client, specifying an API key
client = PDLPY(
    api_key="YOUR_API_KEY",
)

query_string = {"ticker":"GOOGL"}

response = client.company.enrichment(**query_string)

print(response.text)
curl -X GET -G \
  'https://api.peopledatalabs.com/v5/company/enrich'\
  -H 'X-Api-Key: xxxx'\
  --data-urlencode 'ticker=GOOGL'
// See https://github.com/peopledatalabs/peopledatalabs-js
import PDLJS from 'peopledatalabs';

const PDLJSClient = new PDLJS({ apiKey: "YOUR API KEY" });

const queryString = {"ticker":"GOOGL"}

PDLJSClient.company.enrichment(queryString).then((data) => {
    console.log(data);
}).catch((error) => {
    console.log(error);
});
# See https://github.com/peopledatalabs/peopledatalabs-ruby
require 'peopledatalabs'

Peopledatalabs.api_key = 'YOUR API KEY'

query_string = {"ticker":"GOOGL"}

response = Peopledatalabs::Enrichment.company(params: query_string)

puts response
package main

import (
    "fmt"
 )

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

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

    client := pdl.New(apiKey)
    
    queryString := pdlmodel.CompanyParams{Ticker: "GOOGL"}
    
    params := pdlmodel.EnrichCompanyParams{
        CompanyParams: queryString,
    }
    
    response, err := client.Company.Enrich(params)
    if err == nil {
        fmt.Println(response)
    }  
}
import requests

url = "https://api.peopledatalabs.com/v5/company/enrich"

query_string = {"ticker":"GOOGL"}

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

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

print(response.text)

Profile

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

# Create a client, specifying an API key
client = PDLPY(
    api_key="YOUR_API_KEY",
)

query_string = {"profile":"linkedin.com/company/google"}

response = client.company.enrichment(**query_string)

print(response.text)
curl -X GET -G \
  'https://api.peopledatalabs.com/v5/company/enrich'\
  -H 'X-Api-Key: xxxx'\
  --data-urlencode 'profile=linkedin.com/company/google'
// See https://github.com/peopledatalabs/peopledatalabs-js
import PDLJS from 'peopledatalabs';

const PDLJSClient = new PDLJS({ apiKey: "YOUR API KEY" });

const queryString = {"profile":"linkedin.com/company/google"}

PDLJSClient.company.enrichment(queryString).then((data) => {
    console.log(data);
}).catch((error) => {
    console.log(error);
});
# See https://github.com/peopledatalabs/peopledatalabs-ruby
require 'peopledatalabs'

Peopledatalabs.api_key = 'YOUR API KEY'

query_string = {"profile":"linkedin.com/company/google"}

response = Peopledatalabs::Enrichment.company(params: query_string)

puts response
package main

import (
    "fmt"
 )

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

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

    client := pdl.New(apiKey)
    
    queryString := pdlmodel.CompanyParams{Profile: "linkedin.com/company/google"}
    
    params := pdlmodel.EnrichCompanyParams{
        CompanyParams: queryString,
    }
    
    response, err := client.Company.Enrich(params)
    if err == nil {
        fmt.Println(response)
    }  
}
import requests

url = "https://api.peopledatalabs.com/v5/company/enrich"

query_string = {"profile":"linkedin.com/company/google"}

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

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

print(response.text)

Did this page help you?