Examples - Company Enrichment API

Code examples and walkthroughs using the Company Enrichment API

Examples

When specifying query parameters within a URL, you should separate them with an ampersand (&). When specifying query parameters within a JSON object, you should use lists for the request parameters.

We've provided code samples 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 code from cURL to the language of your choice.

📘

See a Bug? Want To See a Specific Example?

Feel free to use the Suggest Edits button in the top right-hand corner of this page to point out any bugs or to request any specific code examples for this API that you'd like to see here.

PDL ID

# 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 = {"pdl_id":"google"}

# Pass the parameters object to the Company Enrichment API
response = CLIENT.company.enrichment(**QUERY_STRING)

# Print the API response
print(response.text)
curl -X GET -G \
  'https://api.peopledatalabs.com/v5/company/enrich'\
  -H 'X-Api-Key: xxxx'\
  --data-urlencode 'pdl_id=google'
// 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 = {"pdl_id":"google"}

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

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

# Create a parameters JSON object
QUERY_STRING = {"pdl_id":"google"}

# Pass the parameters object to the Company Enrichment API
response = Peopledatalabs::Enrichment.company(params: QUERY_STRING)

# Print the API response
puts response
package main

import (
    "fmt"
    "context"
)

// 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.CompanyParams{PdlId: "google"}
    
    params := pdlmodel.EnrichCompanyParams{
        CompanyParams: queryString,
    }
    
    // Pass the parameters object to the Company Enrichment API
    response, err := client.Company.Enrich(context.Background(), params)
    // Check for successful response
    if err == nil {
        // Print the API response
        fmt.Println(response)
    }  
}
import requests

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

# Set the Company Enrichment API URL
PDL_URL = "https://api.peopledatalabs.com/v5/company/enrich"

# Create a parameters JSON object
QUERY_STRING = {"pdl_id":"google"}

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

# Pass the parameters object to the Company Enrichment API
response = requests.request("GET", PDL_URL, headers=HEADERS, params=QUERY_STRING)

# Print the API response
print(response.text)

Website

# 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":"google.com"}

# Pass the parameters object to the Company Enrichment API
response = CLIENT.company.enrichment(**QUERY_STRING)

# Print the API response
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';

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

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

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

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

# Create a parameters JSON object
QUERY_STRING = {"website":"google.com"}

# Pass the parameters object to the Company Enrichment API
response = Peopledatalabs::Enrichment.company(params: QUERY_STRING)

# Print the API response
puts response
package main

import (
    "fmt"
    "context"
)

// 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.CompanyParams{Website: "google.com"}
    
    params := pdlmodel.EnrichCompanyParams{
        CompanyParams: queryString,
    }
    
    // Pass the parameters object to the Company Enrichment API
    response, err := client.Company.Enrich(context.Background(), params)
    // Check for successful response
    if err == nil {
        // Print the API response
        fmt.Println(response)
    }  
}
import requests

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

# Set the Company Enrichment API URL
PDL_URL = "https://api.peopledatalabs.com/v5/company/enrich"

# Create a parameters JSON object
QUERY_STRING = {"website":"google.com"}

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

# Pass the parameters object to the Company Enrichment API
response = requests.request("GET", PDL_URL, headers=HEADERS, params=QUERY_STRING)

# Print the API response
print(response.text)

Name

# 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 = {"name":"Google, Inc."}

# Pass the parameters object to the Company Enrichment API
response = CLIENT.company.enrichment(**QUERY_STRING)

# Print the API response
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';

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

// Create a parameters JSON object
const queryString = {"name":"Google, Inc."}

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

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

# Create a parameters JSON object
QUERY_STRING = {"name":"Google, Inc."}

# Pass the parameters object to the Company Enrichment API
response = Peopledatalabs::Enrichment.company(params: QUERY_STRING)

# Print the API response
puts response
package main

import (
    "fmt"
    "context"
)

// 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.CompanyParams{Name: "Google, Inc."}
    
    params := pdlmodel.EnrichCompanyParams{
        CompanyParams: queryString,
    }
    
    // Pass the parameters object to the Company Enrichment API
    response, err := client.Company.Enrich(context.Background(), params)
    // Check for successful response
    if err == nil {
        // Print the API response
        fmt.Println(response)
    }  
}
import requests

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

# Set the Company Enrichment API URL
PDL_URL = "https://api.peopledatalabs.com/v5/company/enrich"

# Create a parameters JSON object
QUERY_STRING = {"name":"Google, Inc."}

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

# Pass the parameters object to the Company Enrichment API
response = requests.request("GET", PDL_URL, headers=HEADERS, params=QUERY_STRING)

# Print the API response
print(response.text)

Ticker

# 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 = {"ticker":"GOOGL"}

# Pass the parameters object to the Company Enrichment API
response = CLIENT.company.enrichment(**QUERY_STRING)

# Print the API response
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';

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

// Create a parameters JSON object
const queryString = {"ticker":"GOOGL"}

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

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

# Create a parameters JSON object
QUERY_STRING = {"ticker":"GOOGL"}

# Pass the parameters object to the Company Enrichment API
response = Peopledatalabs::Enrichment.company(params: QUERY_STRING)

# Print the API response
puts response
package main

import (
    "fmt"
    "context"
)

// 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.CompanyParams{Ticker: "GOOGL"}
    
    params := pdlmodel.EnrichCompanyParams{
        CompanyParams: queryString,
    }
    
    // Pass the parameters object to the Company Enrichment API
    response, err := client.Company.Enrich(context.Background(), params)
    // Check for successful response
    if err == nil {
        // Print the API response
        fmt.Println(response)
    }  
}
import requests

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

# Set the Company Enrichment API URL
PDL_URL = "https://api.peopledatalabs.com/v5/company/enrich"

# Create a parameters JSON object
QUERY_STRING = {"ticker":"GOOGL"}

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

# Pass the parameters object to the Company Enrichment API
response = requests.request("GET", PDL_URL, headers=HEADERS, params=QUERY_STRING)

# Print the API response
print(response.text)

Profile

# 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 = {"profile":"linkedin.com/company/google"}

# Pass the parameters object to the Company Enrichment API
response = CLIENT.company.enrichment(**QUERY_STRING)

# Print the API response
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';

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

// Create a parameters JSON object
const queryString = {"profile":"linkedin.com/company/google"}

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

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

# Create a parameters JSON object
QUERY_STRING = {"profile":"linkedin.com/company/google"}

# Pass the parameters object to the Company Enrichment API
response = Peopledatalabs::Enrichment.company(params: QUERY_STRING)

# Print the API response
puts response
package main

import (
    "fmt"
    "context"
)

// 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.CompanyParams{Profile: "linkedin.com/company/google"}
    
    params := pdlmodel.EnrichCompanyParams{
        CompanyParams: queryString,
    }
    
    // Pass the parameters object to the Company Enrichment API
    response, err := client.Company.Enrich(context.Background(), params)
    // Check for successful response
    if err == nil {
        // Print the API response
        fmt.Println(response)
    }  
}
import requests

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

# Set the Company Enrichment API URL
PDL_URL = "https://api.peopledatalabs.com/v5/company/enrich"

# Create a parameters JSON object
QUERY_STRING = {"profile":"linkedin.com/company/google"}

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

# Pass the parameters object to the Company Enrichment API
response = requests.request("GET", PDL_URL, headers=HEADERS, params=QUERY_STRING)

# Print the API response
print(response.text)