curl --request POST \
--url https://api.datalegion.ai/person/discover \
--header 'API-Key: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"query": "VP of Engineering at fintech companies in New York",
"limit": 10
}
'import requests
url = "https://api.datalegion.ai/person/discover"
payload = {
"query": "VP of Engineering at fintech companies in New York",
"limit": 10
}
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({query: 'VP of Engineering at fintech companies in New York', limit: 10})
};
fetch('https://api.datalegion.ai/person/discover', 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/discover",
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([
'query' => 'VP of Engineering at fintech companies in New York',
'limit' => 10
]),
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/discover"
payload := strings.NewReader("{\n \"query\": \"VP of Engineering at fintech companies in New York\",\n \"limit\": 10\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/discover")
.header("API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"query\": \"VP of Engineering at fintech companies in New York\",\n \"limit\": 10\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.datalegion.ai/person/discover")
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 \"query\": \"VP of Engineering at fintech companies in New York\",\n \"limit\": 10\n}"
response = http.request(request)
puts response.read_body{
"matches": [
{
"person": {
"legion_id": "a7e91c34-2b8f-4d6e-9c1a-3f5b7d8e2a10",
"full_name": "michael chen",
"first_name": "michael",
"last_name": "chen",
"city": "new york",
"state": "new york",
"state_code": "US-NY",
"country": "united states",
"country_code": "US",
"job_title": "vp of engineering",
"company_name": "fintech startup",
"company_domain": "fintechstartup.com",
"company_industry": "financial services",
"company_size": "201-500",
"seniority_level": "vp",
"job_function": "engineering",
"is_decision_maker": true,
"is_platform_worker": false,
"work_email": "michael.chen@fintechstartup.com",
"linkedin_url": "https://www.linkedin.com/in/michaelchen",
"linkedin_id": "987654321",
"years_of_experience": 18,
"last_seen": "2026-01-18"
}
}
],
"total": 1247
}{
"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": {}
}{
"error": "<string>",
"message": "<string>",
"details": {}
}Person Discover API (Beta)
Person Discover API (Beta) endpoint: find people using natural language queries across 183M+ professional profiles.
curl --request POST \
--url https://api.datalegion.ai/person/discover \
--header 'API-Key: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"query": "VP of Engineering at fintech companies in New York",
"limit": 10
}
'import requests
url = "https://api.datalegion.ai/person/discover"
payload = {
"query": "VP of Engineering at fintech companies in New York",
"limit": 10
}
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({query: 'VP of Engineering at fintech companies in New York', limit: 10})
};
fetch('https://api.datalegion.ai/person/discover', 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/discover",
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([
'query' => 'VP of Engineering at fintech companies in New York',
'limit' => 10
]),
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/discover"
payload := strings.NewReader("{\n \"query\": \"VP of Engineering at fintech companies in New York\",\n \"limit\": 10\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/discover")
.header("API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"query\": \"VP of Engineering at fintech companies in New York\",\n \"limit\": 10\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.datalegion.ai/person/discover")
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 \"query\": \"VP of Engineering at fintech companies in New York\",\n \"limit\": 10\n}"
response = http.request(request)
puts response.read_body{
"matches": [
{
"person": {
"legion_id": "a7e91c34-2b8f-4d6e-9c1a-3f5b7d8e2a10",
"full_name": "michael chen",
"first_name": "michael",
"last_name": "chen",
"city": "new york",
"state": "new york",
"state_code": "US-NY",
"country": "united states",
"country_code": "US",
"job_title": "vp of engineering",
"company_name": "fintech startup",
"company_domain": "fintechstartup.com",
"company_industry": "financial services",
"company_size": "201-500",
"seniority_level": "vp",
"job_function": "engineering",
"is_decision_maker": true,
"is_platform_worker": false,
"work_email": "michael.chen@fintechstartup.com",
"linkedin_url": "https://www.linkedin.com/in/michaelchen",
"linkedin_id": "987654321",
"years_of_experience": 18,
"last_seen": "2026-01-18"
}
}
],
"total": 1247
}{
"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": {}
}{
"error": "<string>",
"message": "<string>",
"details": {}
}How It Works
Describe who you’re looking for in plain English. The API translates your query into SQL and returns matching profiles. We treat the query as yours. A query that asks for nothing to find, that tells the search how to behave instead of what to find, that is written in another script, or that needs a field your contract does not include answers400 and is not billed (see Refused Queries). If your product passes along text from its users or from documents, check it first: the refusal check is not a filter for injected text.
Example Queries
software engineers in Austin who worked at Meta
marketing directors at Fortune 500 companies in New York
nurses in California with 10+ years of experience
VP of Sales at SaaS companies with over 1000 employees
data scientists with Python skills in the Bay Area
People Like One Person
Ask for people like someone by their LinkedIn URL, email orlegion_id, alone or with the rest of the query:
people like linkedin.com/in/jane-doe
people like jane@acme.com in Texas
more like linkedin.com/in/jane-doe at software companies, not at Acme
Search-Warning header saying the results are ranked by likeness. Page with offset; these results have no next_cursor, and an offset past the last result answers 400 offset_past_end.
New Hires
A query for new hires at a named employer (“people who joined Stripe in the last 6 months”) answers with aSearch-Warning header: job changes reach the data four to six weeks after they happen, so the most recent weeks are still filling in. The first page carries it; pages fetched by cursor do not.
What Cannot Be Filtered On
A query can ask for something the data has no filter for. The API names it instead of answering as if it had applied it:not_filtered | The Query Asks For |
|---|---|
school_year | When someone graduated from the school the query names |
school_field | What someone studied at the school the query names |
contact_details | A personal or home phone number |
verified_email | Whether the work or personal email asked for is verified |
recent_change | When someone was hired or joined, with no employer named |
publications | Papers, publications or citations |
exits | Companies someone sold, took public or exited |
social_following | Social media followers, subscribers or audience |
outside_us | People outside the United States (people data covers the US) |
excluded_places | Leaving out a place it cannot name as US cities or states, such as a metro area (“outside the Bay Area”) |
unplaced_abroad | A place outside the United States it could not read |
funding | Their employer’s funding rounds, investors or valuation |
revenue | Their employer’s revenue or profit |
400 with error unsupported_filter, and nothing is billed:
{
"error": "unsupported_filter",
"message": "This search cannot filter on a personal or home phone number. Rephrase the query without it.",
"details": {
"not_filtered": ["contact_details"]
}
}
product managers in Cambridge, Massachusetts.
A query that asks for nothing else (people with a home phone number) answers the same 400, and its message says the query names nothing else to search on.
Refused Queries
These queries answer400 without running a search, and nothing is billed:
error | Meaning |
|---|---|
not_a_search | Asks for no people to find |
instructions_in_query | Tells the search how to behave, not what to find |
not_in_latin_letters | Holds letters outside the Latin script |
seed_not_found | Asks for people like someone no one person matches (by the LinkedIn URL, email or legion_id given) |
several_seeds | Asks for people like more than one person |
field_not_in_contract | Needs a field your contract does not include, such as location on a plan without contact data |
{
"error": "not_a_search",
"message": "This query does not ask for people to find. Say who you are looking for, such as a job title, company, industry or location."
}
instructions_in_query the message reads: “This query reads as instructions to the search itself. Say only who or what you are looking for, including anything to leave out of the results.”
For not_in_latin_letters the message reads: “Write the query in English, in Latin letters: Discover reads the places, names and other details it filters on in English.” Accented letters are fine (nurses in Cañon City, Colorado); a query in another script (software engineers в Остине) answers not_in_latin_letters.
For field_not_in_contract the message names what to leave out, and details.fields names the field: “Your contract does not include location data, so Discover cannot filter on a place (state_code). Leave the location out of the query and try again.” For any other field: “Your contract does not include the is_decision_maker field, so Discover cannot filter on it. Leave that part out of the query and try again.”
Pagination
Page with a cursor. A page with more results after it carriesnext_cursor; send it back as cursor, without offset, with the same query. Every page belongs to the same search, and paging can go past 10,000 results. On the last page next_cursor is null.
{
"query": "software engineers in Austin who worked at Meta",
"limit": 100,
"cursor": "k3Vb9xQp2LmZr7Ta..."
}
offset (up to 10,000) also works, but each request with an offset reads your query again, so pages can overlap or skip records. For anything past the first page, use the cursor.Body
Request model for Person Discover (plain-English search).
Continue from the previous page's next_cursor: the next page of the same search, without asking the model again (it may word the same query differently), and past offset's 10,000-row reach. Send the same query, and no offset, in a POST body (a long cursor won't fit in a GET's URL). A cursor works for the dataset build it came from.
65536Response
Success - persons found matching natural language query.
Person Discover response.
For /person/search and /person/discover, the total number of rows matching the query's WHERE clause across the database (not just this page). On search/discover, if the exact count exceeds its time budget (broad, low-selectivity queries) it falls back to the matches counted before the budget ran out (a lower bound), and if that does not cover this page, to the offset plus the rows returned; the response header Total-Count-Status reports which (exact, estimate, or page).