curl --request POST \
--url https://api.datalegion.ai/person/enrich \
--header 'API-Key: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"city": "San Francisco",
"company": "Acme Corp",
"first_name": "John",
"last_name": "Doe",
"state": "CA"
}
'import requests
url = "https://api.datalegion.ai/person/enrich"
payload = {
"city": "San Francisco",
"company": "Acme Corp",
"first_name": "John",
"last_name": "Doe",
"state": "CA"
}
headers = {
"API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
city: 'San Francisco',
company: 'Acme Corp',
first_name: 'John',
last_name: 'Doe',
state: 'CA'
})
};
fetch('https://api.datalegion.ai/person/enrich', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.datalegion.ai/person/enrich",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'city' => 'San Francisco',
'company' => 'Acme Corp',
'first_name' => 'John',
'last_name' => 'Doe',
'state' => 'CA'
]),
CURLOPT_HTTPHEADER => [
"API-Key: <api-key>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.datalegion.ai/person/enrich"
payload := strings.NewReader("{\n \"city\": \"San Francisco\",\n \"company\": \"Acme Corp\",\n \"first_name\": \"John\",\n \"last_name\": \"Doe\",\n \"state\": \"CA\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("API-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.datalegion.ai/person/enrich")
.header("API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"city\": \"San Francisco\",\n \"company\": \"Acme Corp\",\n \"first_name\": \"John\",\n \"last_name\": \"Doe\",\n \"state\": \"CA\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.datalegion.ai/person/enrich")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"city\": \"San Francisco\",\n \"company\": \"Acme Corp\",\n \"first_name\": \"John\",\n \"last_name\": \"Doe\",\n \"state\": \"CA\"\n}"
response = http.request(request)
puts response.read_body{
"matches": [
{
"person": {
"legion_id": "fdd85569-f0f0-53a9-bc60-089507193c28",
"full_name": "jane marie doe",
"first_name": "jane",
"middle_name": "marie",
"middle_initial": "m",
"last_name": "doe",
"last_initial": "d",
"suffix": null,
"prefix": null,
"sex": "female",
"birth_date": "1985-03-15",
"birth_year": 1985,
"birth_month": 3,
"birth_day": 15,
"age": 41,
"work_email": "jane.doe@techcompany.com",
"mobile_phone": "+15551234567",
"linkedin_url": "https://www.linkedin.com/in/janedoe",
"linkedin_id": "123456789",
"city": "san francisco",
"state": "california",
"state_code": "US-CA",
"country": "united states",
"country_code": "US",
"job_title": "senior product manager",
"company_name": "tech company",
"company_domain": "techcompany.com",
"company_industry": "technology, information and internet",
"company_size": "1001-5000",
"company_legion_id": "c8a1b2c3-d4e5-6f7a-8b9c-0d1e2f3a4b5c",
"company_linkedin_url": "https://www.linkedin.com/company/tech-company-inc",
"company_linkedin_id": "12345678",
"seniority_level": "senior",
"job_function": "product",
"expense_category": "research_and_development",
"is_decision_maker": false,
"is_platform_worker": false,
"years_of_experience": 12,
"avg_tenure_months": 24.5,
"highest_degree_level": "masters",
"current_jobs_last_confirmed": "2026-01-15",
"current_jobs_last_updated": "2026-01-10",
"current_location_last_confirmed": "2026-01-15",
"current_location_last_updated": "2025-12-20",
"linkedin_followers": 1250,
"linkedin_connections": 500,
"npi": null,
"npi_last_updated": null,
"headline": {
"cleaned": "senior product manager at tech company",
"raw": [
"Senior Product Manager at Tech Company"
]
},
"summary": {
"cleaned": "experienced product leader with 10+ years in technology...",
"raw": [
"Experienced product leader with 10+ years in technology..."
]
},
"num_sources": 3,
"last_seen": "2026-01-20",
"build_version": "1.6.0_2026-11-12",
"phones": [
{
"type": "mobile",
"number": "+15551234567",
"current": true,
"confidence": "high",
"last_seen": "2026-01-15",
"num_sources": 3
}
],
"emails": [
{
"address": "jane.doe@techcompany.com",
"type": "professional",
"current": true,
"validated": true,
"confidence": "high",
"last_seen": "2026-01-20",
"num_sources": 2,
"validation_status": "valid",
"hash_sha256": "30635629dd8765da9df5e2eaf96313b4ec1ecaa918fc75586a34dada419cc150",
"hash_sha1": "8536f7aa61cbb79c1ed3771e4cce7eb9fcf009d6",
"hash_md5": "44087cd018be7077209cf1eccd76d0f8"
}
],
"locations": [
{
"street_address": "123 main st",
"address_line_2": "apt 4b",
"city": "san francisco",
"state": "california",
"state_code": "US-CA",
"country": "united states",
"country_code": "US",
"continent": "north america",
"continent_code": "NA",
"postal_code": "94102",
"postal_code_4": "1234",
"geo": "37.7749,-122.4194",
"raw": [
"123 Main St, Apt 4B, San Francisco, CA 94102"
],
"current": true,
"num_sources": 2,
"confidence": "high",
"last_seen": "2026-01-10"
}
],
"experience": [
{
"title": {
"cleaned": "senior product manager",
"raw": [
"Senior Product Manager"
]
},
"seniority_level": "senior",
"job_function": "product",
"expense_category": "research_and_development",
"is_decision_maker": false,
"is_platform_worker": false,
"organization": {
"name": {
"cleaned": "tech company inc",
"raw": [
"Tech Company Inc"
]
},
"website": "techcompany.com",
"linkedin_url": "https://www.linkedin.com/company/tech-company-inc",
"linkedin_id": "12345678",
"legion_id": "c8a1b2c3-d4e5-6f7a-8b9c-0d1e2f3a4b5c",
"industry": "technology, information and internet",
"size": "1001-5000"
},
"start_date": "2020-06-01",
"end_date": null,
"current": true,
"tenure_months": 67,
"description": {
"cleaned": "leading product strategy for enterprise platform...",
"raw": [
"Leading product strategy for enterprise platform..."
]
}
}
],
"education": [
{
"organization": {
"name": {
"cleaned": "stanford university",
"raw": [
"Stanford University"
]
},
"website": "stanford.edu",
"linkedin_url": "https://www.linkedin.com/school/stanford-university"
},
"degree": {
"cleaned": "master of business administration",
"raw": [
"Master of Business Administration"
]
},
"degree_level": "masters",
"field_of_study": {
"cleaned": "business administration",
"raw": [
"Business Administration"
]
},
"start_date": "2015",
"end_date": "2017",
"current": false
}
],
"certifications": [
{
"name": {
"cleaned": "project management professional",
"raw": [
"Project Management Professional",
"PMP"
]
},
"institution": {
"cleaned": "project management institute",
"raw": [
"Project Management Institute"
]
},
"credential_id": "1234567",
"issue_date": "2018-06",
"expiration_date": "2024-06"
}
],
"socials": [
{
"network": "linkedin",
"url": "https://www.linkedin.com/in/janedoe",
"username": "janedoe",
"id": null,
"current": true,
"num_sources": 2,
"confidence": "high",
"last_seen": "2026-01-20"
},
{
"network": "github",
"url": "https://github.com/janedoe",
"username": "janedoe",
"id": "12345678",
"current": true,
"num_sources": 1,
"confidence": "moderate",
"last_seen": "2026-01-20"
}
],
"skills": [
{
"cleaned": "project management",
"raw": [
"Project Management"
]
},
{
"cleaned": "data analysis",
"raw": [
"Data Analysis"
]
}
],
"languages": [
{
"cleaned": "english",
"raw": [
"English"
],
"proficiency": "native"
}
]
},
"match_metadata": {
"matched_on": [
"email",
"first_name",
"last_name"
],
"match_type": "exact",
"match_confidence": "high"
}
}
]
}{
"error": "<string>",
"message": "<string>",
"details": {}
}{
"error": "<string>",
"message": "<string>",
"details": {}
}{
"error": "<string>",
"message": "<string>",
"details": {}
}{
"error": "<string>",
"message": "<string>",
"details": {}
}{
"error": "<string>",
"message": "<string>",
"details": {}
}{
"error": "<string>",
"message": "<string>",
"details": {}
}{
"error": "<string>",
"message": "<string>",
"details": {}
}{
"error": "<string>",
"message": "<string>",
"details": {}
}{
"error": "<string>",
"message": "<string>",
"details": {}
}{
"error": "<string>",
"message": "<string>",
"details": {}
}Person Enrichment API
Person Enrichment API endpoint: match records by email, phone, name, social URL, or other identifiers and append 100+ profile data points.
curl --request POST \
--url https://api.datalegion.ai/person/enrich \
--header 'API-Key: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"city": "San Francisco",
"company": "Acme Corp",
"first_name": "John",
"last_name": "Doe",
"state": "CA"
}
'import requests
url = "https://api.datalegion.ai/person/enrich"
payload = {
"city": "San Francisco",
"company": "Acme Corp",
"first_name": "John",
"last_name": "Doe",
"state": "CA"
}
headers = {
"API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
city: 'San Francisco',
company: 'Acme Corp',
first_name: 'John',
last_name: 'Doe',
state: 'CA'
})
};
fetch('https://api.datalegion.ai/person/enrich', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.datalegion.ai/person/enrich",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'city' => 'San Francisco',
'company' => 'Acme Corp',
'first_name' => 'John',
'last_name' => 'Doe',
'state' => 'CA'
]),
CURLOPT_HTTPHEADER => [
"API-Key: <api-key>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.datalegion.ai/person/enrich"
payload := strings.NewReader("{\n \"city\": \"San Francisco\",\n \"company\": \"Acme Corp\",\n \"first_name\": \"John\",\n \"last_name\": \"Doe\",\n \"state\": \"CA\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("API-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.datalegion.ai/person/enrich")
.header("API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"city\": \"San Francisco\",\n \"company\": \"Acme Corp\",\n \"first_name\": \"John\",\n \"last_name\": \"Doe\",\n \"state\": \"CA\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.datalegion.ai/person/enrich")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"city\": \"San Francisco\",\n \"company\": \"Acme Corp\",\n \"first_name\": \"John\",\n \"last_name\": \"Doe\",\n \"state\": \"CA\"\n}"
response = http.request(request)
puts response.read_body{
"matches": [
{
"person": {
"legion_id": "fdd85569-f0f0-53a9-bc60-089507193c28",
"full_name": "jane marie doe",
"first_name": "jane",
"middle_name": "marie",
"middle_initial": "m",
"last_name": "doe",
"last_initial": "d",
"suffix": null,
"prefix": null,
"sex": "female",
"birth_date": "1985-03-15",
"birth_year": 1985,
"birth_month": 3,
"birth_day": 15,
"age": 41,
"work_email": "jane.doe@techcompany.com",
"mobile_phone": "+15551234567",
"linkedin_url": "https://www.linkedin.com/in/janedoe",
"linkedin_id": "123456789",
"city": "san francisco",
"state": "california",
"state_code": "US-CA",
"country": "united states",
"country_code": "US",
"job_title": "senior product manager",
"company_name": "tech company",
"company_domain": "techcompany.com",
"company_industry": "technology, information and internet",
"company_size": "1001-5000",
"company_legion_id": "c8a1b2c3-d4e5-6f7a-8b9c-0d1e2f3a4b5c",
"company_linkedin_url": "https://www.linkedin.com/company/tech-company-inc",
"company_linkedin_id": "12345678",
"seniority_level": "senior",
"job_function": "product",
"expense_category": "research_and_development",
"is_decision_maker": false,
"is_platform_worker": false,
"years_of_experience": 12,
"avg_tenure_months": 24.5,
"highest_degree_level": "masters",
"current_jobs_last_confirmed": "2026-01-15",
"current_jobs_last_updated": "2026-01-10",
"current_location_last_confirmed": "2026-01-15",
"current_location_last_updated": "2025-12-20",
"linkedin_followers": 1250,
"linkedin_connections": 500,
"npi": null,
"npi_last_updated": null,
"headline": {
"cleaned": "senior product manager at tech company",
"raw": [
"Senior Product Manager at Tech Company"
]
},
"summary": {
"cleaned": "experienced product leader with 10+ years in technology...",
"raw": [
"Experienced product leader with 10+ years in technology..."
]
},
"num_sources": 3,
"last_seen": "2026-01-20",
"build_version": "1.6.0_2026-11-12",
"phones": [
{
"type": "mobile",
"number": "+15551234567",
"current": true,
"confidence": "high",
"last_seen": "2026-01-15",
"num_sources": 3
}
],
"emails": [
{
"address": "jane.doe@techcompany.com",
"type": "professional",
"current": true,
"validated": true,
"confidence": "high",
"last_seen": "2026-01-20",
"num_sources": 2,
"validation_status": "valid",
"hash_sha256": "30635629dd8765da9df5e2eaf96313b4ec1ecaa918fc75586a34dada419cc150",
"hash_sha1": "8536f7aa61cbb79c1ed3771e4cce7eb9fcf009d6",
"hash_md5": "44087cd018be7077209cf1eccd76d0f8"
}
],
"locations": [
{
"street_address": "123 main st",
"address_line_2": "apt 4b",
"city": "san francisco",
"state": "california",
"state_code": "US-CA",
"country": "united states",
"country_code": "US",
"continent": "north america",
"continent_code": "NA",
"postal_code": "94102",
"postal_code_4": "1234",
"geo": "37.7749,-122.4194",
"raw": [
"123 Main St, Apt 4B, San Francisco, CA 94102"
],
"current": true,
"num_sources": 2,
"confidence": "high",
"last_seen": "2026-01-10"
}
],
"experience": [
{
"title": {
"cleaned": "senior product manager",
"raw": [
"Senior Product Manager"
]
},
"seniority_level": "senior",
"job_function": "product",
"expense_category": "research_and_development",
"is_decision_maker": false,
"is_platform_worker": false,
"organization": {
"name": {
"cleaned": "tech company inc",
"raw": [
"Tech Company Inc"
]
},
"website": "techcompany.com",
"linkedin_url": "https://www.linkedin.com/company/tech-company-inc",
"linkedin_id": "12345678",
"legion_id": "c8a1b2c3-d4e5-6f7a-8b9c-0d1e2f3a4b5c",
"industry": "technology, information and internet",
"size": "1001-5000"
},
"start_date": "2020-06-01",
"end_date": null,
"current": true,
"tenure_months": 67,
"description": {
"cleaned": "leading product strategy for enterprise platform...",
"raw": [
"Leading product strategy for enterprise platform..."
]
}
}
],
"education": [
{
"organization": {
"name": {
"cleaned": "stanford university",
"raw": [
"Stanford University"
]
},
"website": "stanford.edu",
"linkedin_url": "https://www.linkedin.com/school/stanford-university"
},
"degree": {
"cleaned": "master of business administration",
"raw": [
"Master of Business Administration"
]
},
"degree_level": "masters",
"field_of_study": {
"cleaned": "business administration",
"raw": [
"Business Administration"
]
},
"start_date": "2015",
"end_date": "2017",
"current": false
}
],
"certifications": [
{
"name": {
"cleaned": "project management professional",
"raw": [
"Project Management Professional",
"PMP"
]
},
"institution": {
"cleaned": "project management institute",
"raw": [
"Project Management Institute"
]
},
"credential_id": "1234567",
"issue_date": "2018-06",
"expiration_date": "2024-06"
}
],
"socials": [
{
"network": "linkedin",
"url": "https://www.linkedin.com/in/janedoe",
"username": "janedoe",
"id": null,
"current": true,
"num_sources": 2,
"confidence": "high",
"last_seen": "2026-01-20"
},
{
"network": "github",
"url": "https://github.com/janedoe",
"username": "janedoe",
"id": "12345678",
"current": true,
"num_sources": 1,
"confidence": "moderate",
"last_seen": "2026-01-20"
}
],
"skills": [
{
"cleaned": "project management",
"raw": [
"Project Management"
]
},
{
"cleaned": "data analysis",
"raw": [
"Data Analysis"
]
}
],
"languages": [
{
"cleaned": "english",
"raw": [
"English"
],
"proficiency": "native"
}
]
},
"match_metadata": {
"matched_on": [
"email",
"first_name",
"last_name"
],
"match_type": "exact",
"match_confidence": "high"
}
}
]
}{
"error": "<string>",
"message": "<string>",
"details": {}
}{
"error": "<string>",
"message": "<string>",
"details": {}
}{
"error": "<string>",
"message": "<string>",
"details": {}
}{
"error": "<string>",
"message": "<string>",
"details": {}
}{
"error": "<string>",
"message": "<string>",
"details": {}
}{
"error": "<string>",
"message": "<string>",
"details": {}
}{
"error": "<string>",
"message": "<string>",
"details": {}
}{
"error": "<string>",
"message": "<string>",
"details": {}
}{
"error": "<string>",
"message": "<string>",
"details": {}
}{
"error": "<string>",
"message": "<string>",
"details": {}
}Minimum Requirements
Every request must include at least one of the following:- A primary identifier (any single field is sufficient)
- Name + context (a first and last name plus at least one contextual field)
400 Bad Request.
Primary Identifiers
Any one of these fields is enough to look up a person on its own:| Field | Example |
|---|---|
email | jane.doe@example.com |
phone | +15551234567 |
social_url | https://linkedin.com/in/janedoe |
linkedin_id | 123456789 |
legion_id | fdd85569-f0f0-53a9-bc60-089507193c28 |
npi | 1234567893 |
email_hash | SHA-256, SHA-1, or MD5 hash of normalized email |
npi needs npi in your contract, since it is a Premium field. A lookup by a field your contract does not include returns 403 with field_not_in_contract.
Name + Context
When no primary identifier is available, provide a first and last name (first_name and last_name, or a full_name of two or more words such as "Jane Doe") plus at least one contextual field:
| Context | Fields | Example |
|---|---|---|
| Location | city, state, country, postal_code, address | "first_name": "Jane", "last_name": "Doe", "city": "San Francisco", "state": "CA" |
| Company | company | "first_name": "Jane", "last_name": "Doe", "company": "Acme Corp" |
| School | school | "first_name": "Jane", "last_name": "Doe", "school": "Stanford University" |
| Job title | job_title | "first_name": "Jane", "last_name": "Doe", "job_title": "VP of Engineering" |
| Birth date | birth_date | "first_name": "Jane", "last_name": "Doe", "birth_date": "1985" |
José and Jose, D'Souza and DSouza). Records hold names the way their sources wrote them, mostly in Latin letters, so a romanized name (Ivan Petrov) usually finds more than one written in another script.URLs and Domains
Thecompany and school fields accept names, website URLs, or social URLs:
{"first_name": "Jane", "last_name": "Doe", "company": "Acme Corp"}
{"first_name": "Jane", "last_name": "Doe", "company": "acme.com"}
{"first_name": "Jane", "last_name": "Doe", "company": "https://www.acme.com"}
{"first_name": "Jane", "last_name": "Doe", "school": "https://linkedin.com/school/stanford-university"}
Locations
City names match across their common spellings, andpostal_code accepts a five-digit ZIP or a ZIP+4.Body
Request model for Person Enrichment. Requires a primary identifier (email, phone, social_url, linkedin_id, legion_id, email_hash, npi) OR a first and last name + context (location, company, school, job_title, birth_date).
Fields a match must have, else it is filtered out (and not billed). Top-level fields ('work_email'), a non-empty subfield of a list item ('emails.type'), or a subfield equal to a value ('emails.type:personal', 'phones.type:mobile', 'socials.network:linkedin'). Combine them with AND, OR and parentheses: '(work_email OR mobile_phone) AND job_title'. Put a value holding the word "and" or "or", a comma or a parenthesis in double quotes: 'company_industry:"oil and energy"'.
1000