The People Data Labs Developer Hub

Welcome to the People Data Labs developer hub. You'll find comprehensive guides and documentation to help you start working with People Data Labs as quickly as possible, as well as support if you get stuck. Let's jump right in!

Get Started    Release Notes

Person Search API

The endpoint for the person search api is https://api.peopledatalabs.com/v5/person/search.

Person Search API Access and Billing.

We charge per record retrieved. Each person record in the "data" array of the response counts as a single "credit" against your total package.

Usage

PDL's Search API is perfect for finding specific segments of people that you need in order to power your projects and products. This product gives you direct access to query our full API dataset. There are many degrees of freedom which allow you to find any kind of person(s) with a single query.

Requests

See Authentication and Requests to see possible ways to input requests. We recommend using the body of your request and will do so in the examples below.

Rate Limiting

The current default rate limit is 10 requests per minute.

Input Parameters

Parameter NameDescriptionDefaultExample
queryAn Elasticsearch (v7.7) query. See our underlying Elasticsearch mapping for reference.{"query": {"term": {"name": "people data labs"}}}
sqlA SQL query of the format: SELECT * FROM person WHERE XXX, where XXX is a standard SQL boolean query involving PDL fields. Any use of column selections or the LIMIT keyword will be ignored.SELECT * FROM person WHERE job_company_name='people data labs'
sizeThe batch size or the maximum number of matched records to return for this query if they exist. Must be between 1 and 100.1100
from[LEGACY] An offset value for paginating between batches. Can be a number between 0 and 9999. Pagination can be executed up to a maximum of 10,000 records per query. NOTE, FROM CAN NOT BE USED WITH SCROLL_TOKEN IN THE SAME REQUEST00, 100, 200 ...
scroll_tokenAn offset key for paginating between batches. Unlike the legacy from parameter can be used for any number of records. Each search API response returns a scroll_token which can be used to fetch the next size records.None104$14.278746
datasetSpecify which dataset the API should search against. Valid names are resume, email, phone, mobile_phone, street_address, consumer_social, developer, allresumeall
titlecaseAll text in the data of API responses is returned as lowercase by default. Setting titlecase to true will titlecase any records returned.falsetrue
prettyWhether the output should have human-readable indentation.falsetrue
api_keyYour API key (note this can also be provided in the request header instead, as shown on the Authentication page)

Response

The HTTP Response code will be 200 for any valid request, regardless of whether records were found for your query or not. For that reason, pay close attention to the "total" value in your response object to understand query success. Each company record in the "data" array of the response counts as a single "credit" against your total package - this value has a maximum of one record by default to prevent happy accidents.

Response Fields

FieldDescriptionType
statusResponse code. See a description of our Error Codes.Integer
errorError DetailsObject
error.typeError DetailsList (String)
error.messageError DetailsString
dataData returned. See the full example response or the example company recordObject
totalNumber of records matching a given query or sql input.Integer
scroll_tokenScroll value used for paginationString

Abridged 200 Response Example (full example here):

{
    "status": 200,
    "data": [
        {
            "id": "qEnOZ5Oh0poWnQ1luFBfVw_0000",
            "full_name": "sean thorne",
            ...
        },
        ...
    ],
    "scroll_token": "1117$12.176522"
    "total": 99
}

Building a Query

It is required to provide a value for either the query parameter or the sql parameter in order to receive a successful response. The query value should align directly with the Elasticsearch DSL. SQL queries are executed using Elasticsearch SQL. Most typical query types are available but some are excluded. For all available query types see here.

When an API request is executed, the query is run directly against our API dataset without doing any additional cleaning or pre-processing. This means that you have a ton of freedom to explore the dataset and return the perfect records. It also means that understanding the available fields can be very helpful to making successful queries.

Field descriptions can be found here and the Elasticsearch mapping underlying this api can be found here. To help you identify how to best query for specific sub-entities (schools, companies, and locations), we also are planning to offer a suite of enrichment APIs for these sub-entities which will be accessible only by Search API users called the Cleaner APIs

Walkthroughs

All code is Python.

Basic Usage

"I want to use Python to make a query and save the results to a file."

import requests, json

API_KEY = # YOUR API KEY

PDL_URL = "https://api.peopledatalabs.com/v5/person/search"

H = {
  'Content-Type': "application/json",
  'X-api-key': API_KEY
}

ES_QUERY = {
  "query": {
    "bool": {
        "must": [
            {"term": {"location_country": "mexico"}},
            {"term": {"job_title_role": "health"}},
            {"exists": {"field": "phone_numbers"}}
      ]
    }
  }
}

P = {
  'query': json.dumps(ES_QUERY),
  'size': 10,
  'pretty': True
}

response = requests.get(
  PDL_URL,
  headers=H,
  params=P
).json()

if response["status"] == 200:
  data = response['data']
  with open("my_pdl_search.jsonl", "w") as out:
    for record in data:
      out.write(json.dumps(record) + "\n")
  print(f"successfully grabbed {len(data)} records from pdl")
  print(f"{response['total']} total pdl records exist matching this query")
else:
  print("NOTE. The carrier pigeons lost motivation in flight. See error and try again.")
  print("Error:", response)
import requests, json

API_KEY = # YOUR API KEY

PDL_URL = "https://api.peopledatalabs.com/v5/person/search"

H = {
  'Content-Type': "application/json",
  'X-api-key': API_KEY
}

SQL_QUERY = \
"""
  SELECT * FROM person
  WHERE location_country='mexico'
  AND job_title_role='health'
  AND phone_numbers IS NOT NULL;
 """

P = {
  'sql': SQL_QUERY,
  'size': 10,
  'pretty': True
}

response = requests.get(
  PDL_URL,
  headers=H,
  params=P
).json()

if response["status"] == 200:
  data = response['data']
  with open("my_pdl_search.jsonl", "w") as out:
    for record in data:
      out.write(json.dumps(record) + "\n")
  print(f"successfully grabbed {len(data)} records from pdl")
  print(f"{response['total']} total pdl records exist matching this query")
else:
  print("NOTE. The carrier pigeons lost motivation in flight. See error and try again.")
  print("error:", response)
# Elasticsearch
curl -X GET 'https://api.peopledatalabs.com/v5/person/search' \
-H 'X-Api-Key: xxxx' \
--data-raw '{
  "size": 10,
  "query": {
    "bool": {
      "must": [
        {"term": {"location_country": "mexico"}},
        {"term": {"job_title_role": "health"}},
        {"exists": {"field": "phone_numbers"}}
      ]
    }
  }
}'

# SQL
curl -X GET \
  'https://api.peopledatalabs.com/v5/person/search' \
  -H 'X-Api-Key: xxxx' \
  --data-raw '{
    "size": 10,
    "sql": "SELECT * FROM person WHERE location_country='\''mexico'\'' AND job_title_role='\''health'\'' AND phone_numbers IS NOT NULL;"
}'

Searching Specific Datasets

"I want to run a simple query against PDL's entire person dataset"

📘

Maintaining Backwards Compatibility

The dataset parameter was introduced with the July 2021 release, which also changed the default dataset from all to resume. For users that want to maintain the same performance in their queries prior to this change, set the dataset parameter to all as shown in the example below.

import requests, json

API_KEY = # YOUR API KEY

PDL_URL = "https://api.peopledatalabs.com/v5/person/search"

H = {
  'Content-Type': "application/json",
  'X-api-key': API_KEY
}

ES_QUERY = {
  "query": {
    "bool": {
        "must": [
            {"term": {"location_country": "mexico"}},
            {"term": {"job_title_role": "health"}},
            {"exists": {"field": "phone_numbers"}}
      ]
    }
  }
}

P = {
  'query': json.dumps(ES_QUERY),
  'size': 10,
  'pretty': True,
  'dataset': "all" # Use all to search against the entire PDL dataset
}

response = requests.get(
  PDL_URL,
  headers=H,
  params=P
).json()

if response["status"] == 200:
  data = response['data']
  with open("my_pdl_search.jsonl", "w") as out:
    for record in data:
      out.write(json.dumps(record) + "\n")
  print(f"successfully grabbed {len(data)} records from pdl")
  print(f"{response['total']} total pdl records exist matching this query")
else:
  print("NOTE. The carrier pigeons lost motivation in flight. See error and try again.")
  print("Error:", response)
import requests, json

API_KEY = # YOUR API KEY

PDL_URL = "https://api.peopledatalabs.com/v5/person/search"

H = {
  'Content-Type': "application/json",
  'X-api-key': API_KEY
}

SQL_QUERY = \
"""
  SELECT * FROM person
  WHERE location_country='mexico'
  AND job_title_role='health'
  AND phone_numbers IS NOT NULL;
 """

P = {
  'sql': SQL_QUERY,
  'size': 10,
  'pretty': True,
  'dataset': "all" # Use all to search against the entire PDL dataset
}

response = requests.get(
  PDL_URL,
  headers=H,
  params=P
).json()

if response["status"] == 200:
  data = response['data']
  with open("my_pdl_search.jsonl", "w") as out:
    for record in data:
      out.write(json.dumps(record) + "\n")
  print(f"successfully grabbed {len(data)} records from pdl")
  print(f"{response['total']} total pdl records exist matching this query")
else:
  print("NOTE. The carrier pigeons lost motivation in flight. See error and try again.")
  print("error:", response)
# Elasticsearch
curl -X GET 'https://api.peopledatalabs.com/v5/person/search' \
-H 'X-Api-Key: xxxx' \
--data-raw '{
  "size": 10,
  "dataset": "all",
  "query": {
    "bool": {
      "must": [
        {"term": {"location_country": "mexico"}},
        {"term": {"job_title_role": "health"}},
        {"exists": {"field": "phone_numbers"}}
      ]
    }
  }
}'

# SQL
curl -X GET \
  'https://api.peopledatalabs.com/v5/person/search' \
  -H 'X-Api-Key: xxxx' \
  --data-raw '{
    "size": 10,
    "dataset: "all",
    "sql": "SELECT * FROM person WHERE location_country='\''mexico'\'' AND job_title_role='\''health'\'' AND phone_numbers IS NOT NULL;"
}'

Bulk Retrieval

"I want to pull all the current employees at Amazon and save their profiles to a csv file."

🚧

High Credit Usage Code Below

The code example below illustrates pulling all the employee profiles in a large company, and is meant primarily for demonstrating the use of the scroll_token parameter when retrieving large amounts of records. As a result this code mostly illustrative meaning it can use up a lot of credits, and doesn't have any error handling. The MAX_NUM_RECORDS_LIMIT parameter in the example below sets the maximum number of profiles (e.g. credits) that will be pulled, so please set that accordingly when testing this example.

import requests, json, time, csv

API_KEY = # ENTER YOUR API KEY

# Limit the number of records to pull (to prevent accidentally using up 
# more credits than expected when testing out this code).
MAX_NUM_RECORDS_LIMIT = 150 # The maximum number of records to retrieve
USE_MAX_NUM_RECORDS_LIMIT = True # Set to False to pull all available records

PDL_URL = "https://api.peopledatalabs.com/v5/person/search"

H = {
  'Content-Type': "application/json",
  'X-api-key': API_KEY
}

ES_QUERY = {
  "query": {
    "bool": {
        "must": [
            {"term": {"job_company_id": "amazon"}}
      ]
    }
  }
}

P = {
  'query': json.dumps(ES_QUERY),
  'size': 100, 
  'pretty': True
}

# Pull all results in multiple batches
batch = 1
all_records = []
start_time = time.time()
found_all_records = False
continue_scrolling = True

while continue_scrolling and not found_all_records: 

  # Check if we reached the maximum number of records we wanted to pull
  if USE_MAX_NUM_RECORDS_LIMIT:
    num_records_to_request = MAX_NUM_RECORDS_LIMIT - len(all_records)
    P['size'] = max(0, min(100, num_records_to_request))
    if num_records_to_request == 0:
      print(f"Stopping - reached maximum number of records to pull "
            f"[MAX_NUM_RECORDS_LIMIT = {MAX_NUM_RECORDS_LIMIT}]")
      break

  # Send Response
  response = requests.get(
    PDL_URL,
    headers=H,
    params=P
  ).json()

  # Check response status code:
  if response['status'] == 200:
    all_records.extend(response['data'])
    print(f"Retrieved {len(response['data'])} records in batch {batch} "
          f"- {response['total'] - len(all_records)} records remaining")
  else:
    print(f"Error retrieving some records:\n\t"
          f"[{response['status']} - {response['error']['type']}] "
          f"{response['error']['message']}")
  
  # Get scroll_token from response
  if 'scroll_token' in response:
    P['scroll_token'] = response['scroll_token']
  else:
    continue_scrolling = False
    print(f"Unable to continue scrolling")

  batch += 1
  found_all_records = (len(all_records) == response['total'])
  time.sleep(6) # avoid hitting rate limit thresholds
 
end_time = time.time()
runtime = end_time - start_time
        
print(f"Successfully recovered {len(all_records)} profiles in "
      f"{batch} batches [{round(runtime, 2)} seconds]")

# Save profiles to csv (utility function)
def save_profiles_to_csv(profiles, filename, fields=[], delim=','):
  # Define header fields
  if fields == [] and len(profiles) > 0:
      fields = profiles[0].keys()
  # Write csv file
  with open(filename, 'w') as csvfile:
    writer = csv.writer(csvfile, delimiter=delim)
    # Write Header:
    writer.writerow(fields)
    # Write Body:
    count = 0
    for profile in profiles:
      writer.writerow([ profile[field] for field in fields ])
      count += 1
  print(f"Wrote {count} lines to: '{filename}'")

# Use utility function to save profiles to csv    
csv_header_fields = ['work_email', 'full_name', "linkedin_url",
                     'job_title', 'job_company_name']
csv_filename = "all_employee_profiles.csv"
save_profiles_to_csv(all_records, csv_filename, csv_header_fields)
import requests, json, time, csv

API_KEY = # ENTER YOUR API KEY

# Limit the number of records to pull (to prevent accidentally using up 
# more credits than expected when testing out this code).
MAX_NUM_RECORDS_LIMIT = 150 # The maximum number of records to retrieve
USE_MAX_NUM_RECORDS_LIMIT = True # Set to False to pull all available records

PDL_URL = "https://api.peopledatalabs.com/v5/person/search"

H = {
  'Content-Type': "application/json",
  'X-api-key': API_KEY
}

SQL_QUERY = \
"""
 SELECT * FROM person
 WHERE job_company_id='amazon';
"""

P = {
  'sql': SQL_QUERY,
  'size': 100, 
  'pretty': True
}


# Pull all results in multiple batches
batch = 1
all_records = []
start_time = time.time()
found_all_records = False
continue_scrolling = True

while continue_scrolling and not found_all_records: 

  # Check if we reached the maximum number of records we wanted to pull
  if USE_MAX_NUM_RECORDS_LIMIT:
    num_records_to_request = MAX_NUM_RECORDS_LIMIT - len(all_records)
    P['size'] = max(0, min(100, num_records_to_request))
    if num_records_to_request == 0:
      print(f"Stopping - reached maximum number of records to pull "
            f"[MAX_NUM_RECORDS_LIMIT = {MAX_NUM_RECORDS_LIMIT}]")
      break

  # Send Response
  response = requests.get(
    PDL_URL,
    headers=H,
    params=P
  ).json()

  # Check response status code:
  if response['status'] == 200:
    all_records.extend(response['data'])
    print(f"Retrieved {len(response['data'])} records in batch {batch} "
          f"- {response['total'] - len(all_records)} records remaining")
  else:
    print(f"Error retrieving some records:\n\t"
          f"[{response['status']} - {response['error']['type']}] "
          f"{response['error']['message']}")
  
  # Get scroll_token from response
  if 'scroll_token' in response:
    P['scroll_token'] = response['scroll_token']
  else:
    continue_scrolling = False
    print(f"Unable to continue scrolling")

  batch += 1
  found_all_records = (len(all_records) == response['total'])
  time.sleep(6) # avoid hitting rate limit thresholds
 
end_time = time.time()
runtime = end_time - start_time
        
print(f"Successfully recovered {len(all_records)} profiles in "
      f"{batch} batches [{round(runtime, 2)} seconds]")

# Save profiles to csv (utility function)
def save_profiles_to_csv(profiles, filename, fields=[], delim=','):
  # Define header fields
  if fields == [] and len(profiles) > 0:
      fields = profiles[0].keys()
  # Write csv file
  with open(filename, 'w') as csvfile:
    writer = csv.writer(csvfile, delimiter=delim)
    # Write Header:
    writer.writerow(fields)
    # Write Body:
    count = 0
    for profile in profiles:
      writer.writerow([ profile[field] for field in fields ])
      count += 1
  print(f"Wrote {count} lines to: '{filename}'")

# Use utility function to save profiles to csv    
csv_header_fields = ['work_email', 'full_name', "linkedin_url",
                     'job_title', 'job_company_name']
csv_filename = "all_employee_profiles.csv"
save_profiles_to_csv(all_records, csv_filename, csv_header_fields)

Sales Prospecting

"I want to email engineering leaders at the following companies to reach out about my product: stripe.com, plaid.com, xignite.com, square.com."

import requests, json
API_KEY = #YOUR API KEY

PDL_URL = "https://api.peopledatalabs.com/v5/person/search"

H = {
  'Content-Type': "application/json",
  'X-api-key': API_KEY
}
DESIRED_COMPANY_DOMAINS = [
  'stripe.com', 'plaid.com', 'xignite.com', 'square.com'
]

# https://pdl-prod-schema.s3-us-west-2.amazonaws.com/15.0/enums/job_title_levels.txt
# for enumerated possible values of job_title_levels

ES_QUERY = {
    "query": {
        "bool": {
        "must": [
        {"terms": {"job_company_website": DESIRED_COMPANY_DOMAINS}},
        {"term": {"job_title_role": "engineering"}},
        {"terms": {"job_title_levels": ["vp", "director", "manager"]}},
        {"exists": {"field": "work_email"}}
      ]
    }
    }
}

P = {
  'query': json.dumps(ES_QUERY),
  'size': 100
}

response = requests.get(
  PDL_URL,
  headers=H,
  params=P
).json()

if response["status"] == 200:
  for record in response['data']:
    # bring in leads and make $$$
    print(
      record['work_email'],
      record['full_name'],
      record['job_title'],
      record['job_company_name']
    )

  print(f"successfully grabbed {len(response['data'])} records from pdl")
  print(f"{response['total']} total pdl records exist matching this query")
else:
  print("NOTE. The eager beaver was not so eager. See error and try again.")
  print("error:", response)
import requests, json
API_KEY = #YOUR API KEY

PDL_URL = "https://api.peopledatalabs.com/v5/person/search"

H = {
  'Content-Type': "application/json",
  'X-api-key': API_KEY
}
DESIRED_COMPANY_DOMAINS = [
  'stripe.com', 'plaid.com', 'xignite.com', 'square.com'
]

COMPANY_DOMAINS_STRING_REP = ", ".join(
  (f"'{site}'" for site in DESIRED_COMPANY_DOMAINS)
)

# https://pdl-prod-schema.s3-us-west-2.amazonaws.com/15.0/job_title_levels.txt
# for enumerated possible values of job_title_levels

SQL_QUERY = \
f"""
  SELECT * FROM person
  WHERE job_company_website IN ({COMPANY_DOMAINS_STRING_REP})
  AND job_title_role='engineering'
  AND job_title_levels IN ('vp', 'director', 'manager')
  AND work_email IS NOT NULL;
"""

P = {
  'sql': SQL_QUERY,
  'size': 100
}

response = requests.get(
  PDL_URL,
  headers=H,
  params=P
).json()



if response["status"] == 200:
  
  for record in response['data']:
    # bring in leads and make $$$
    print(
      record['work_email'],
      record['full_name'],
      record['job_title'],
      record['job_company_name']
    )

  print(f"successfully grabbed {len(response['data'])} records from pdl")
  print(f"{response['total']} total pdl records exist matching this query")
else:
  print("NOTE. The eager beaver was not so eager. See error and try again.")
  print("error:", response)

Recruiting

"I have a client looking for marketing managers and dishwashers in Oregon, but NOT in portland (don't ask why). They want to reach out on LinkedIn, so they asked that each candidate have a Linkedin URL. I want as many people as PDL can give me matching this criteria."

from time import sleep
import requests, json

API_KEY = #YOUR API KEY

PDL_URL = "https://api.peopledatalabs.com/v5/person/search"

H = {
  'Content-Type': "application/json",
  'X-api-key': API_KEY
}

def get_all_pdl_records_es(query):
    #runs search in batches with 6 second intervals 

    PAGE_SIZE = 100

    all_records = []
    batch = 1

    params = {
        'query': json.dumps(query),
        'size': PAGE_SIZE,
        'dataset': "all"
    }

    while batch == 1 or params['scroll_token']:

        response = requests.get(
            PDL_URL,
            headers=H,
            params=params
        ).json()
                
        if response['status'] == 200:
          all_records.extend(response['data'])
          params['scroll_token'] = response['scroll_token']

          print(f"batch {batch} success!")
          sleep(6)
          batch += 1
          
        else:
          print("Unable to continue scrolling")
          break
    
    print("done!")

    return all_records


if __name__ == '__main__':
    ES_QUERY = {
        "query": {
        "bool": {
        "must": [
            {"term": {"location_region": "oregon"}},
            {"bool": {
            "should": [
                {"match": {"job_title": "dishwasher"}},
                {"bool": {
                "must": [
                    {"term": {"job_title_role": "marketing"}},
                    {"term": {"job_title_levels": "manager"}}
                ]
                }}
            ]
            }
            },
        {"exists": {"field": "linkedin_url"}}
       ],
       "must_not":[
          {"term": {"location_locality": "portland"}},
       ]
        }
    }
    }

    recruiting_leads = get_all_pdl_records_es(ES_QUERY)
            
    print(f"Got {len(recruiting_leads)} recruiting leads for my wealthy client!")

    #GO make_money_with_data(recruiting_leads)!
from time import sleep 
import requests

API_KEY = #YOUR API KEY

PDL_URL = "https://api.peopledatalabs.com/v5/person/search"

H = {
  'Content-Type': "application/json",
  'X-api-key': API_KEY
}

def get_all_pdl_records_sql(query):
    #runs search in batches with 6 second intervals 

    PAGE_SIZE = 100

    all_records = []
    batch = 1

    params = {
        'sql': query,
        'size': PAGE_SIZE,
        'dataset': "all"
    }

    while batch == 1 or params['scroll_token']:

        response = requests.get(
            PDL_URL,
            headers=H,
            params=params
        ).json()

        if response['status'] == 200:
          all_records.extend(response['data'])
          params['scroll_token'] = response['scroll_token']

          print(f"batch {batch} success!")
          sleep(6)
          batch += 1
          
        else:
          print("Unable to continue scrolling")
          break
        batch += 1
    
    print("done!")

    return all_records

SQL_QUERY = \
  """
    SELECT * FROM person
    WHERE location_region='oregon'
    AND NOT location_locality='portland'
    AND (
      job_title LIKE '%dishwasher%'
      OR (
        job_title_role='marketing'
        AND job_title_levels='manager'
      )
    )
    AND linkedin_url IS NOT NULL;
  """

recruiting_leads = get_all_pdl_records_sql(SQL_QUERY)

print(f"got {len(recruiting_leads)} recruiting leads for my wealthy client!")

make_money_with_data(recruiting_leads)

Ads

"I want to sell yachts to rich people via ads on Facebook."

ES_QUERY = {
    "query": {
    "bool": {
        "must": [
        {"exists": {"field": "facebook_id"}},
        {"prefix": {"interests": "yacht"}},
        {"term": {"inferred_salary": ">250,000"}}
      ]
    }
  }
}

rich_yacht_people = get_all_pdl_records_es(ES_QUERY)

# building a customer list for facebook audiences:
# https://www.facebook.com/business/help/2082575038703844?id=2469097953376494&recommended_by=341425252616329

with open("rich_yacht_people_for_facebook.csv", "w") as out:
  out.write("pageuid\n")
  for record in rich_yacht_people:
    out.write(record['facebook_id'] + "\n")

# upload your target list to facebook audiences!
SQL_QUERY = \
"""
  SELECT * FROM person
  WHERE facebook_id IS NOT NULL
  AND interests LIKE 'yacht%'
  AND inferred_salary='>250,000';
"""

rich_yacht_people = get_all_pdl_records_sql(SQL_QUERY)

# building a customer list for facebook audiences:
# https://www.facebook.com/business/help/2082575038703844?id=2469097953376494&recommended_by=341425252616329

with open("rich_yacht_people_for_facebook.csv", "w") as out:
  out.write("pageuid\n")
  for record in rich_yacht_people:
    out.write(record['facebook_id'] + "\n")

# upload your target list to facebook audiences!

Customer Insights

"I want to discover some things about my biggest customer, Zenefits."

ES_QUERY = {
    "query": {
    "term": {"job_company_website": "zenefits.com"}
  } 
}

all_zenefits_employees = get_all_pdl_records_es(ES_QUERY)

skills_agg = {}
titles_agg = {}
schools_agg = {}
other_companies_agg = {}

for record in all_zenefits_employees:
  for skill in record['skills']:
    skills_agg.setdefault(skill, 0)
    skills_agg[skill] += 1
  if record['job_title']:
    titles_agg.setdefault(record['job_title'], 0)
    titles_agg[record['job_title']] += 1
  for edu in record['education']:
    if edu['school'] and edu['school']['type'] == "post-secondary institution":
      schools_agg.setdefault(edu['school']['name'], 0)
      schools_agg[edu['school']['name']] += 1
  for exp in record['experience']:
    if exp['company'] and exp['company']['name'] != 'zenefits':
      other_companies_agg.setdefault(exp['company']['name'], 0)
      other_companies_agg[exp['company']['name']] += 1

print("top 10 skills for zenefits employees:")
for skill, count in sorted(
  skills_agg.items(), key = lambda x: x[1], reverse=True
)[:10]:
  print(count, skill)

print("top 10 titles for zenefits employees:")
for title, count in sorted(
  titles_agg.items(), key = lambda x: x[1], reverse=True
)[:10]:
  print(count, title)
 
print("top 10 universities for zenefits employees:")
for school, count in sorted(
  schools_agg.items(), key = lambda x: x[1], reverse=True
)[:10]:
  print(count, school)
  
print("top 10 former companies for zenefits employees:")
for company, count in sorted(
  other_companies_agg.items(), key = lambda x: x[1], reverse=True
)[:10]:
  print(count, company)
SQL_QUERY = \
"""
  SELECT * FROM person
  WHERE job_company_website='zenefits.com';
"""

all_zenefits_employees = get_all_pdl_records_sql(SQL_QUERY)

skills_agg = {}
titles_agg = {}
schools_agg = {}
other_companies_agg = {}

for record in all_zenefits_employees:
  for skill in record['skills']:
    skills_agg.setdefault(skill, 0)
    skills_agg[skill] += 1
  if record['job_title']:
    titles_agg.setdefault(record['job_title'], 0)
    titles_agg[record['job_title']] += 1
  for edu in record['education']:
    if edu['school'] and edu['school']['type'] == "post-secondary institution":
      schools_agg.setdefault(edu['school']['name'], 0)
      schools_agg[edu['school']['name']] += 1
  for exp in record['experience']:
    if exp['company'] and exp['company']['name'] != 'zenefits':
      other_companies_agg.setdefault(exp['company']['name'], 0)
      other_companies_agg[exp['company']['name']] += 1

print("top 10 skills for zenefits employees:")
for skill, count in sorted(
  skills_agg.items(), key = lambda x: x[1], reverse=True
)[:10]:
  print(count, skill)

print("top 10 titles for zenefits employees:")
for title, count in sorted(
  titles_agg.items(), key = lambda x: x[1], reverse=True
)[:10]:
  print(count, title)
 
print("top 10 universities for zenefits employees:")
for school, count in sorted(
  schools_agg.items(), key = lambda x: x[1], reverse=True
)[:10]:
  print(count, school)
  
print("top 10 former companies for zenefits employees:")
for company, count in sorted(
  other_companies_agg.items(), key = lambda x: x[1], reverse=True
)[:10]:
  print(count, company)

Advanced Examples

Company Enrichment and Person Search

I want to find X number of people at each company in my list

import json
import requests

PDL_COMPANY_ENRICH_URL = "https://api.peopledatalabs.com/v5/company/enrich"
PDL_PERSON_SEARCH_URL = "https://api.peopledatalabs.com/v5/person/search"

API_KEY = "####" # Enter your api key here

company_websites = [
    "facebook.com",
    "amazon.com",
    "apple.com",
    "netflix.com",
    "google.com"
]

max_num_people = 100

# Enrich company then find people at that company:
all_profile_matches = []
for company_website in company_websites:

    # Company Enrichment
    querystring = { "website": company_website }

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

    response = requests.request("GET", PDL_COMPANY_ENRICH_URL, headers=headers, params=querystring)

    if response.status_code == 200:
        enriched_company = response.json()
    else:
        enriched_company = {}
        print(f"Company Enrichment Error for [{company_website}]: {response.text}")

    # Person Search
    company_employee_matches = {}

    if enriched_company:
        headers = {
            'Content-Type': "application/json",
            'X-api-key': API_KEY
        }

        ES_QUERY = {
        "query": {
            "bool": {
                "must": [
                        {"term": {"job_company_id": enriched_company["id"]}},
                    ]
                }
            }
        }

        params = {
            'query': json.dumps(ES_QUERY),
            'size': max_num_people
        }

        response = requests.get( PDL_PERSON_SEARCH_URL, headers=headers, params=params)

        if response.status_code == 200:
            company_employee_matches = response.json()['data']
        else:
            company_employee_matches = {}
            print(f"Person Search Error for [{company_website}]: {response.text}")

    print(f"Found {len(company_employee_matches)} employee profiles at {company_website}")
    all_profile_matches.append(company_employee_matches)

print("Final Results:")
for company_website, company_profiles in zip(company_websites, all_profile_matches):
    print(f"\t{company_website}: {len(company_profiles)} employees found")
import json
import requests

PDL_COMPANY_ENRICH_URL = "https://api.peopledatalabs.com/v5/company/enrich"
PDL_PERSON_SEARCH_URL = "https://api.peopledatalabs.com/v5/person/search"

API_KEY = "####" # Enter your api key here

company_websites = [
    "facebook.com",
    "amazon.com",
    "apple.com",
    "netflix.com",
    "google.com"
]

max_num_people = 100

# Enrich company then find people at that company:
all_profile_matches = []
for company_website in company_websites:

    # Company Enrichment
    querystring = { "website": company_website }

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

    response = requests.request("GET", PDL_COMPANY_ENRICH_URL, headers=headers, params=querystring)

    if response.status_code == 200:
        enriched_company = response.json()
    else:
        enriched_company = {}
        print(f"Company Enrichment Error for [{company_website}]: {response.text}")

    # Person Search
    company_employee_matches = {}

    if enriched_company:
        headers = {
            'Content-Type': "application/json",
            'X-api-key': API_KEY
        }

        SQL_QUERY = f"""
        SELECT * FROM person
        WHERE job_company_id = '{enriched_company['id']}'
        """

        params = {
            'sql': SQL_QUERY,
            'size': max_num_people
        }

        response = requests.get( PDL_PERSON_SEARCH_URL, headers=headers, params=params)

        if response.status_code == 200:
            company_employee_matches = response.json()['data']
        else:
            company_employee_matches = {}
            print(f"Person Search Error for [{company_website}]: {response.text}")

    print(f"Found {len(company_employee_matches)} employee profiles at {company_website}")
    all_profile_matches.append(company_employee_matches)

print("Final Results:")
for company_website, company_profiles in zip(company_websites, all_profile_matches):
    print(f"\t{company_website}: {len(company_profiles)} employees found")

Query Limitations

The following Elasticsearch query types will be accepted:

Most specialized options are disabled, such as boosting and custom scoring. No aggregations.

Any SQL query that translates to the above available query types via the ES SQL translate API will be accepted. This means most basic SQL. No joins, groupbys, etc.

Any array found in the query (such as a terms array) will have a hard limit of 100 elements. Any query containing an array surpassing this limit will be rejected.

Full Example Response

{
  "status": 200,
  "data": [
    {
      "id": "qEnOZ5Oh0poWnQ1luFBfVw_0000",
      "full_name": "sean thorne",
      "first_name": "sean",
      "middle_initial": "f",
      "middle_name": "fong",
      "last_name": "thorne",
      "gender": "male",
      "birth_year": "1990",
      "birth_date": null,
      "linkedin_url": "linkedin.com/in/seanthorne",
      "linkedin_username": "seanthorne",
      "linkedin_id": "145991517",
      "facebook_url": "facebook.com/deseanthorne",
      "facebook_username": "deseanthorne",
      "facebook_id": "1089351304",
      "twitter_url": "twitter.com/seanthorne5",
      "twitter_username": "seanthorne5",
      "github_url": null,
      "github_username": null,
      "work_email": "[email protected]",
      "personal_emails": ["[email protected]"],
      "mobile_phone": "+14155688415",
      "industry": "computer software",
      "job_title": "co-founder and chief executive officer",
      "job_title_role": null,
      "job_title_sub_role": null,
      "job_title_levels": [
        "owner",
        "cxo"
      ],
      "job_company_id": "peopledatalabs",
      "job_company_name": "people data labs",
      "job_company_website": "peopledatalabs.com",
      "job_company_size": "11-50",
      "job_company_founded": "2015",
      "job_company_industry": "computer software",
      "job_company_linkedin_url": "linkedin.com/company/peopledatalabs",
      "job_company_linkedin_id": "18170482",
      "job_company_facebook_url": "facebook.com/peopledatalabs",
      "job_company_twitter_url": "twitter.com/peopledatalabs",
      "job_company_location_name": "san francisco, california, united states",
      "job_company_location_locality": "san francisco",
      "job_company_location_metro": "san francisco, california",
      "job_company_location_region": "california",
      "job_company_location_geo": "37.77,-122.41",
      "job_company_location_street_address": "455 market street",
      "job_company_location_address_line_2": "suite 1670",
      "job_company_location_postal_code": "94105",
      "job_company_location_country": "united states",
      "job_company_location_continent": "north america",
      "job_last_updated": "2020-12-01",
      "job_start_date": "2015-03",
      "location_name": "san francisco, california, united states",
      "location_locality": "san francisco",
      "location_metro": "san francisco, california",
      "location_region": "california",
      "location_country": "united states",
      "location_continent": "north america",
      "location_street_address": null,
      "location_address_line_2": null,
      "location_postal_code": null,
      "location_geo": "37.77,-122.41",
      "location_last_updated": "2020-12-01",
      "phone_numbers": [
        "+14155688415"
      ],
      "emails": [
        {
          "address": "[email protected]",
          "type": null
        },
        {
          "address": "[email protected]",
          "type": "professional"
        },
        {
          "address": "[email protected]",
          "type": "professional"
        },
        {
          "address": "[email protected]",
          "type": "professional"
        },
        {
          "address": "[email protected]",
          "type": "current_professional"
        },
        {
          "address": "[email protected]",
          "type": "current_professional"
        },
        {
          "address": "[email protected]",
          "type": "current_professional"
        }
      ],
      "interests": [
        "location based services",
        "mobile",
        "social media",
        "colleges",
        "university students",
        "consumer internet",
        "college campuses"
      ],
      "skills": [
        "entrepreneurship",
        "start ups",
        "management",
        "public speaking",
        "strategic partnerships",
        "strategy",
        "fundraising",
        "saas",
        "enterprise technology sales",
        "social networking"
      ],
      "location_names": [
        "san francisco, california, united states",
        "albany, california, united states",
        "portland, oregon, united states"
      ],
      "regions": [
        "california, united states",
        "oregon, united states"
      ],
      "countries": [
        "united states"
      ],
      "street_addresses": [],
      "experience": [
        {
          "company": {
            "name": "hallspot",
            "size": "1-10",
            "id": "hallspot",
            "founded": "2013",
            "industry": "computer software",
            "location": {
              "name": "portland, oregon, united states",
              "locality": "portland",
              "region": "oregon",
              "metro": "portland, oregon",
              "country": "united states",
              "continent": "north america",
              "street_address": "1231 northwest hoyt street",
              "address_line_2": "suite 202",
              "postal_code": "97209",
              "geo": "45.52,-122.67"
            },
            "linkedin_url": "linkedin.com/company/hallspot",
            "linkedin_id": "3019184",
            "facebook_url": null,
            "twitter_url": "twitter.com/hallspot",
            "website": "hallspot.com"
          },
          "location_names": [],
          "end_date": "2015-02",
          "start_date": "2012-08",
          "title": {
            "name": "co-founder",
            "role": null,
            "sub_role": null,
            "levels": [
              "owner"
            ]
          },
          "is_primary": false
        },
        {
          "company": {
            "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"
          },
          "location_names": [],
          "end_date": null,
          "start_date": "2015-03",
          "title": {
            "name": "co-founder and chief executive officer",
            "role": null,
            "sub_role": null,
            "levels": [
              "owner",
              "cxo"
            ]
          },
          "is_primary": true
        }
      ],
      "education": [
        {
          "school": {
            "name": "university of oregon",
            "type": "post-secondary institution",
            "id": "64LkgfdwWYkCC2TjbldMDQ_0",
            "location": {
              "name": "eugene, oregon, united states",
              "locality": "eugene",
              "region": "oregon",
              "country": "united states",
              "continent": "north america"
            },
            "linkedin_url": "linkedin.com/school/university-of-oregon",
            "facebook_url": "facebook.com/universityoforegon",
            "twitter_url": "twitter.com/uoregon",
            "linkedin_id": "19207",
            "website": "uoregon.edu",
            "domain": "uoregon.edu"
          },
          "end_date": "2014",
          "start_date": "2010",
          "gpa": null,
          "degrees": [],
          "majors": [
            "entrepreneurship"
          ],
          "minors": []
        }
      ],
      "profiles": [
        {
          "network": "linkedin",
          "id": "145991517",
          "url": "linkedin.com/in/seanthorne",
          "username": "seanthorne"
        },
        {
          "network": "facebook",
          "id": "1089351304",
          "url": "facebook.com/deseanthorne",
          "username": "deseanthorne"
        },
        {
          "network": "twitter",
          "id": null,
          "url": "twitter.com/seanthorne5",
          "username": "seanthorne5"
        },
        {
          "network": "linkedin",
          "id": null,
          "url": "linkedin.com/in/sean-thorne-9b9a8540",
          "username": "sean-thorne-9b9a8540"
        },
        {
          "network": "angellist",
          "id": null,
          "url": "angel.co/deseanthorne",
          "username": "deseanthorne"
        },
        {
          "network": "gravatar",
          "id": null,
          "url": "gravatar.com/seanthorne5",
          "username": "seanthorne5"
        },
        {
          "network": "klout",
          "id": null,
          "url": "klout.com/seanthorne5",
          "username": "seanthorne5"
        },
        {
          "network": "aboutme",
          "id": null,
          "url": "about.me/sean_thorne",
          "username": "sean_thorne"
        }
      ]
    }
  ],
"scroll_token": "1117$12.176522"  
"total": 94
}

Full Field Mapping

{
  "_routing": {
    "required": true
  },
  "date_detection": false,
  "properties": {
    "full_name": {
      "type": "keyword",
      "index": true,
      "doc_values": true
    },
    "first_name": {
      "type": "keyword",
      "index": true,
      "doc_values": true
    },
    "middle_initial": {
      "type": "keyword",
      "index": true,
      "doc_values": true
    },
    "middle_name": {
      "type": "keyword",
      "index": true,
      "doc_values": true
    },
    "last_name": {
      "type": "keyword",
      "index": true,
      "doc_values": true
    },
    "gender": {
      "type": "keyword",
      "index": true,
      "doc_values": true
    },
    "birth_year": {
      "type": "keyword",
      "index": true,
      "doc_values": true
    },
    "birth_date": {
      "type": "keyword",
      "index": true,
      "doc_values": true
    },
    "linkedin_url": {
      "type": "keyword",
      "index": true,
      "doc_values": true
    },
    "linkedin_username": {
      "type": "keyword",
      "index": true,
      "doc_values": true
    },
    "linkedin_id": {
      "type": "keyword",
      "index": true,
      "doc_values": true
    },
    "facebook_url": {
      "type": "keyword",
      "index": true,
      "doc_values": true
    },
    "facebook_username": {
      "type": "keyword",
      "index": true,
      "doc_values": true
    },
    "facebook_id": {
      "type": "keyword",
      "index": true,
      "doc_values": true
    },
    "twitter_url": {
      "type": "keyword",
      "index": true,
      "doc_values": true
    },
    "twitter_username": {
      "type": "keyword",
      "index": true,
      "doc_values": true
    },
    "github_url": {
      "type": "keyword",
      "index": true,
      "doc_values": true
    },
    "github_username": {
      "type": "keyword",
      "index": true,
      "doc_values": true
    },
    "work_email": {
      "type": "keyword",
      "index": true,
      "doc_values": true
    },
    "personal_emails": {
      "type": "keyword",
      "index": true,
      "doc_values": true
    },
    "mobile_phone": {
      "type": "keyword",
      "index": true,
      "doc_values": true
    },
    "industry": {
      "type": "keyword",
      "index": true,
      "doc_values": true
    },
    "job_title": {
      "type": "text",
      "index": true,
      "doc_values": false,
      "fields": {
        "keyword": {
          "type": "keyword",
          "doc_values": true,
          "ignore_above": 256
        }
      }
    },
    "job_title_role": {
      "type": "keyword",
      "index": true,
      "doc_values": true
    },
    "job_title_sub_role": {
      "type": "keyword",
      "index": true,
      "doc_values": true
    },
    "job_title_levels": {
      "type": "keyword",
      "index": true,
      "doc_values": true
    },
    "job_company_id": {
      "type": "keyword",
      "index": true,
      "doc_values": true
    },
    "job_company_name": {
      "type": "keyword",
      "index": true,
      "doc_values": true
    },
    "job_company_website": {
      "type": "keyword",
      "index": true,
      "doc_values": true
    },
    "job_company_size": {
      "type": "keyword",
      "index": true,
      "doc_values": true
    },
    "job_company_industry": {
      "type": "keyword",
      "index": true,
      "doc_values": true
    },
    "job_company_founded": {
      "type": "keyword",
      "index": true,
      "doc_values": true
    },
    "job_company_linkedin_url": {
      "type": "keyword",
      "index": true,
      "doc_values": true
    },
    "job_company_linkedin_id": {
      "type": "keyword",
      "index": true,
      "doc_values": true
    },
    "job_company_facebook_url": {
      "type": "keyword",
      "index": true,
      "doc_values": true
    },
    "job_company_twitter_url": {
      "type": "keyword",
      "index": true,
      "doc_values": true
    },
    "job_company_type": {
      "type": "keyword",
      "index": true,
      "doc_values": true
    },
    "job_company_ticker": {
      "type": "keyword",
      "index": true,
      "doc_values": true
    },
    "job_company_location_name": {
      "type": "keyword",
      "index": true,
      "doc_values": true
    },
    "job_company_location_locality": {
      "type": "keyword",
      "index": true,
      "doc_values": true
    },
    "job_company_location_region": {
      "type": "keyword",
      "index": true,
      "doc_values": true
    },
    "job_company_location_metro": {
      "type": "keyword",
      "index": true,
      "doc_values": true
    },
    "job_company_location_country": {
      "type": "keyword",
      "index": true,
      "doc_values": true
    },
    "job_company_location_continent": {
      "type": "keyword",
      "index": true,
      "doc_values": true
    },
    "job_company_location_street_address": {
      "type": "keyword",
      "index": true,
      "doc_values": true
    },
    "job_company_location_address_line_2": {
      "type": "keyword",
      "index": true,
      "doc_values": true
    },
    "job_company_location_postal_code": {
      "type": "keyword",
      "index": true,
      "doc_values": true
    },
    "job_company_location_geo": {
      "type": "geo_point",
      "index": true,
      "doc_values": false
    },
    "job_last_updated": {
      "type": "keyword",
      "index": true,
      "doc_values": true
    },
    "job_start_date": {
      "type": "keyword",
      "index": true,
      "doc_values": true
    },
    "job_summary": {
      "type": "text",
      "index": true,
      "doc_values": false
    },
    "location_name": {
      "type": "keyword",
      "index": true,
      "doc_values": true
    },
    "location_locality": {
      "type": "keyword",
      "index": true,
      "doc_values": true
    },
    "location_region": {
      "type": "keyword",
      "index": true,
      "doc_values": true
    },
    "location_metro": {
      "type": "keyword",
      "index": true,
      "doc_values": true
    },
    "location_country": {
      "type": "keyword",
      "index": true,
      "doc_values": true
    },
    "location_continent": {
      "type": "keyword",
      "index": true,
      "doc_values": true
    },
    "location_full_address": {
      "type": "keyword",
      "index": true,
      "doc_values": true
    },
    "location_street_address": {
      "type": "keyword",
      "index": true,
      "doc_values": true
    },
    "location_address_line_2": {
      "type": "keyword",
      "index": true,
      "doc_values": true
    },
    "location_postal_code": {
      "type": "keyword",
      "index": true,
      "doc_values": true
    },
    "location_geo": {
      "type": "geo_point",
      "index": true,
      "doc_values": false
    },
    "location_last_updated": {
      "type": "keyword",
      "index": true,
      "doc_values": true
    },
    "linkedin_connections": {
      "type": "integer",
      "index": true,
      "doc_values": false
    },
    "inferred_salary": {
      "type": "keyword",
      "index": true,
      "doc_values": true
    },
    "inferred_years_experience": {
      "type": "integer",
      "index": true,
      "doc_values": false
    },
    "summary": {
      "type": "text",
      "index": true,
      "doc_values": false
    },
    "phone_numbers": {
      "type": "keyword",
      "index": true,
      "doc_values": true
    },
    "interests": {
      "type": "keyword",
      "index": true,
      "doc_values": true
    },
    "skills": {
      "type": "keyword",
      "index": true,
      "doc_values": true
    },
    "location_names": {
      "type": "keyword",
      "index": true,
      "doc_values": true
    },
    "regions": {
      "type": "keyword",
      "index": true,
      "doc_values": true
    },
    "countries": {
      "type": "keyword",
      "index": true,
      "doc_values": true
    },
    "emails": {
      "properties": {
        "address": {
          "type": "keyword",
          "index": true,
          "doc_values": true
        },
        "type": {
          "type": "keyword",
          "index": true,
          "doc_values": true
        }
      }
    },
    "street_addresses": {
      "properties": {
        "name": {
          "type": "keyword",
          "index": true,
          "doc_values": true
        },
        "locality": {
          "type": "keyword",
          "index": true,
          "doc_values": true
        },
        "region": {
          "type": "keyword",
          "index": true,
          "doc_values": true
        },
        "metro": {
          "type": "keyword",
          "index": true,
          "doc_values": true
        },
        "country": {
          "type": "keyword",
          "index": true,
          "doc_values": true
        },
        "continent": {
          "type": "keyword",
          "index": true,
          "doc_values": true
        },
        "street_address": {
          "type": "keyword",
          "index": true,
          "doc_values": true
        },
        "address_line_2": {
          "type": "keyword",
          "index": true,
          "doc_values": true
        },
        "postal_code": {
          "type": "keyword",
          "index": true,
          "doc_values": true
        },
        "geo": {
          "type": "geo_point",
          "index": true,
          "doc_values": false
        }
      }
    },
    "experience": {
      "properties": {
        "company": {
          "properties": {
            "name": {
              "type": "keyword",
              "index": true,
              "doc_values": true
            },
            "size": {
              "type": "keyword",
              "index": true,
              "doc_values": true
            },
            "id": {
              "type": "keyword",
              "index": true,
              "doc_values": true
            },
            "founded": {
              "type": "keyword",
              "index": true,
              "doc_values": true
            },
            "industry": {
              "type": "keyword",
              "index": true,
              "doc_values": true
            },
            "location": {
              "properties": {
                "name": {
                  "type": "keyword",
                  "index": true,
                  "doc_values": true
                },
                "locality": {
                  "type": "keyword",
                  "index": true,
                  "doc_values": true
                },
                "region": {
                  "type": "keyword",
                  "index": true,
                  "doc_values": true
                },
                "metro": {
                  "type": "keyword",
                  "index": true,
                  "doc_values": true
                },
                "country": {
                  "type": "keyword",
                  "index": true,
                  "doc_values": true
                },
                "continent": {
                  "type": "keyword",
                  "index": true,
                  "doc_values": true
                },
                "street_address": {
                  "type": "keyword",
                  "index": true,
                  "doc_values": true
                },
                "address_line_2": {
                  "type": "keyword",
                  "index": true,
                  "doc_values": true
                },
                "postal_code": {
                  "type": "keyword",
                  "index": true,
                  "doc_values": true
                },
                "geo": {
                  "type": "geo_point",
                  "index": true,
                  "doc_values": false
                }
              }
            },
            "linkedin_url": {
              "type": "keyword",
              "index": true,
              "doc_values": true
            },
            "linkedin_id": {
              "type": "keyword",
              "index": true,
              "doc_values": true
            },
            "facebook_url": {
              "type": "keyword",
              "index": true,
              "doc_values": true
            },
            "twitter_url": {
              "type": "keyword",
              "index": true,
              "doc_values": true
            },
            "website": {
              "type": "keyword",
              "index": true,
              "doc_values": true
            },
            "ticker": {
              "type": "keyword",
              "index": true,
              "doc_values": true
            },
            "type": {
              "type": "keyword",
              "index": true,
              "doc_values": true
            },
            "raw": {
              "type": "keyword",
              "index": true,
              "doc_values": true
            },
          }
        },
        "start_date": {
          "type": "keyword",
          "index": true,
          "doc_values": true
        },
        "end_date": {
          "type": "keyword",
          "index": true,
          "doc_values": true
        },
        "title": {
          "properties": {
            "name": {
              "type": "text",
              "index": true,
              "doc_values": false,
              "fields": {
                "keyword": {
                  "type": "keyword",
                  "doc_values": true,
                  "ignore_above": 256
                }
              }
            },
            "raw": {
              "type": "keyword",
              "index": true,
              "doc_values": true
            },
            "role": {
              "type": "keyword",
              "index": true,
              "doc_values": true
            },
            "sub_role": {
              "type": "keyword",
              "index": true,
              "doc_values": true
            },
            "levels": {
              "type": "keyword",
              "index": true,
              "doc_values": true
            }
          }
        },
        "location_names": {
          "type": "keyword",
          "index": true,
          "doc_values": true
        },
        "type": {
          "type": "keyword",
          "index": true,
          "doc_values": true
        },
        "is_primary": {
          "type": "boolean",
          "index": true,
          "doc_values": false
        },
        "summary": {
          "type": "text",
          "index": true,
          "doc_values": false
        }
      }
    },
    "education": {
      "properties": {
        "school": {
          "properties": {
            "name": {
              "type": "keyword",
              "index": true,
              "doc_values": true
            },
            "type": {
              "type": "keyword",
              "index": true,
              "doc_values": true
            },
            "id": {
              "type": "keyword",
              "index": true,
              "doc_values": true
            },
            "location": {
              "properties": {
                "name": {
                  "type": "keyword",
                  "index": true,
                  "doc_values": true
                },
                "locality": {
                  "type": "keyword",
                  "index": true,
                  "doc_values": true
                },
                "region": {
                  "type": "keyword",
                  "index": true,
                  "doc_values": true
                },
                "country": {
                  "type": "keyword",
                  "index": true,
                  "doc_values": true
                },
                "continent": {
                  "type": "keyword",
                  "index": true,
                  "doc_values": true
                }
              }
            },
            "linkedin_url": {
              "type": "keyword",
              "index": true,
              "doc_values": true
            },
            "facebook_url": {
              "type": "keyword",
              "index": true,
              "doc_values": true
            },
            "twitter_url": {
              "type": "keyword",
              "index": true,
              "doc_values": true
            },
            "linkedin_id": {
              "type": "keyword",
              "index": true,
              "doc_values": true
            },
            "website": {
              "type": "keyword",
              "index": true,
              "doc_values": true
            },
            "domain": {
              "type": "keyword",
              "index": true,
              "doc_values": true
            },
            "raw": {
              "type": "keyword",
              "index": true,
              "doc_values": true
            }
          }
        },
        "degrees": {
          "type": "keyword",
          "index": true,
          "doc_values": true
        },
        "start_date": {
          "type": "keyword",
          "index": true,
          "doc_values": true
        },
        "end_date": {
          "type": "keyword",
          "index": true,
          "doc_values": true
        },
        "majors": {
          "type": "keyword",
          "index": true,
          "doc_values": true
        },
        "minors": {
          "type": "keyword",
          "index": true,
          "doc_values": true
        },
        "gpa": {
          "type": "float",
          "index": true,
          "doc_values": false
        },
        "raw": {
          "type": "keyword",
          "index": false,
          "doc_values": true
        },
        "summary": {
          "type": "keyword",
          "index": false,
          "doc_values": true
        }
      }
    },
    "profiles": {
      "properties": {
        "network": {
          "type": "keyword",
          "index": true,
          "doc_values": true
        },
        "id": {
          "type": "keyword",
          "index": true,
          "doc_values": true
        },
        "url": {
          "type": "keyword",
          "index": true,
          "doc_values": true
        },
        "username": {
          "type": "keyword",
          "index": true,
          "doc_values": true
        }
      }
    },
    "certifications": {
      "properties": {
        "organization": {
          "type": "keyword",
          "index": false,
          "doc_values": true
        },
        "start_date": {
          "type": "keyword",
          "index": false,
          "doc_values": true
        },
        "end_date": {
          "type": "keyword",
          "index": false,
          "doc_values": true
        },
        "name": {
          "type": "keyword",
          "index": false,
          "doc_values": true
        }
      }
    },
    "languages": {
      "properties": {
        "name": {
          "type": "keyword",
          "index": false,
          "doc_values": true
        },
        "proficiency": {
          "type": "integer",
          "index": false,
          "doc_values": false
        }
      }
    },
    "id": {
      "type": "keyword",
      "index": false,
      "doc_values": true
    }
  }
}

All Field Descriptions

See this doc.

Updated a day ago


Person Search API


Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.