Docs / Search
search_linkedin_people
Search people on ordinary LinkedIn, with each LinkedIn filter as its own typed input.
This action only reads. It changes nothing, so it is safe to try.
What you give it
| Input | What it is | Where to get it |
|---|---|---|
keywordsoptional | Text. Name, title, company or any words. | You write it. |
industryoptional | A search filter id. Industries: ids from lookup_search_ids type INDUSTRY. | run lookup_search_ids with type INDUSTRY, and use matches[].id from its answer. |
locationoptional | A search filter id. Places: ids from lookup_search_ids type LOCATION. | run lookup_search_ids with type LOCATION, and use matches[].id from its answer. |
profileLanguageoptional | A list (text, up to 2 characters). Profile languages, as two-letter codes such as "en". | You write it. |
networkDistanceoptional | A list (one of: 1, 2, 3). Connection degrees from you: 1, 2, 3. | You write it. |
companyoptional | A search filter id. Current companies: ids from lookup_search_ids type COMPANY. | run lookup_search_ids with type COMPANY, and use matches[].id from its answer. |
pastCompanyoptional | A search filter id. Past companies: ids from lookup_search_ids type COMPANY. | run lookup_search_ids with type COMPANY, and use matches[].id from its answer. |
schooloptional | A search filter id. Schools: ids from lookup_search_ids type SCHOOL. | run lookup_search_ids with type SCHOOL, and use matches[].id from its answer. |
serviceoptional | A search filter id. Service categories they offer: ids from lookup_search_ids type SERVICE. | run lookup_search_ids with type SERVICE, and use matches[].id from its answer. |
connectionsOfoptional | A search filter id. People whose connections to search: ids from lookup_search_ids type CONNECTIONS. | run lookup_search_ids with type CONNECTIONS, and use matches[].id from its answer. |
followersOfoptional | A search filter id. People whose followers to search: ids from lookup_search_ids type PEOPLE. | run lookup_search_ids with type PEOPLE, and use matches[].id from its answer. |
openTooptional | A list (one of: proBono, boardMember). Open to pro bono work or to a board seat. | You write it. |
advancedKeywordsoptional | A group of fields. Words that must appear in one part of the profile: first name, last name, title, company or school.What goes inside
| You write it. |
limitoptional | A number, 1 to 10. How many to return (1–10, default 10). | You write it. |
cursoroptional | A cursor. nextCursor from the previous call, to get the next page. Keep the other arguments the same. | The nextCursor from the last answer of search_linkedin_people. |
connectionIdoptional | A connection id. Which of your LinkedIn accounts to act from (its id from list_linkedin_accounts). Omit to use your first live one. | Run list_linkedin_accounts and use accounts[].id from its answer.15 more places to get it
|
Call it
curl -X POST https://api.heyreagent.com/v1/actions/search_linkedin_people \
-H "Authorization: Bearer YOUR_KEY" \
-H "content-type: application/json" \
-d '{"keywords":"head of sales"}'The same call in JavaScript
const response = await fetch("https://api.heyreagent.com/v1/actions/search_linkedin_people", {
method: "POST",
headers: {
"Authorization": "Bearer YOUR_KEY",
"content-type": "application/json",
},
body: JSON.stringify({
"keywords": "head of sales"
}),
});
const answer = await response.json();
console.log(answer);The same call in Python
import requests
response = requests.post(
"https://api.heyreagent.com/v1/actions/search_linkedin_people",
headers={"Authorization": "Bearer YOUR_KEY"},
json={
"keywords": "head of sales",
},
)
print(response.json())The same call in n8n
Add an HTTP Request node and fill it in like this:
| Method | POST |
| URL | https://api.heyreagent.com/v1/actions/search_linkedin_people |
| Send Headers | On. Name Authorization, Value Bearer YOUR_KEY |
| Send Body | On. Body Content Type JSON, Specify Body Using JSON, then paste the body below |
{
"keywords": "head of sales"
}Put your own key where it says YOUR_KEY. New here? Start with your first call.
What you get back
When it worked, the answer is { "ok": true, "result": { … } }. Inside result:
returned | number |
nextCursor | A cursor. Other actions take it. |
results[].type | PEOPLE |
results[].id | A member id. Other actions take it. |
results[].publicIdentifier | A public identifier. Other actions take it. |
results[].publicProfileUrl | A profile link. Other actions take it. |
results[].profileUrl | A profile link. Other actions take it. |
results[].profilePictureUrl | string or null |
results[].profilePictureUrlLarge | string or null |
results[].memberUrn | string or null |
results[].name | string or null |
results[].firstName | string |
results[].lastName | string |
results[].networkDistance | SELF | DISTANCE_1 | DISTANCE_2 | DISTANCE_3 | OUT_OF_NETWORK |
results[].location | string or null |
results[].industry | string or null |
results[].keywordsMatch | string |
results[].headline | string |
results[].connectionsCount | number |
results[].followersCount | number |
results[].pendingInvitation | boolean |
results[].canSendInmail | boolean |
results[].hiddenCandidate | boolean |
results[].interestLikelihood | string |
results[].recruiterCandidateId | string |
results[].recruiterPipelineCategory | string |
results[].premium | boolean |
results[].verified | boolean |
results[].sharedConnectionsCount | number |
results[].recentPostsCount | number |
results[].recentlyHired | boolean |
results[].mentionedInTheNews | boolean |
results[].interests | string |
A field that does not apply to an answer is left out, or is null. There are 82 more fields nested inside these.
An example answer
A sample from the documentation of the API underneath, put in the shape this action returns it. Lists are cut to their first entry.
{
"returned": 1,
"nextCursor": "eyJhY2NvdW50X2lkIjoiOFJma0txU0tSTy1JbXpKT2k4T1I1USIsImxpbWl0IjoxMCwic3RhcnQiOjEwLCJwYXJhbXMiOnsiYXBpIjoiY2xhc3NpYyIsImNhdGVnb3J5IjoicGVvcGxlIiwibG9jYXRpb24iOlsxMDIyNzczMzEsMTAyNDQ4MTAzXX19",
"total": 1000,
"results": [
{
"type": "PEOPLE",
"id": "ACoAAAdHsOUBYtAunOfY0wJIbiwgewolov5X55M",
"name": "Piyush Narwani",
"memberUrn": "urn:li:member:122138853",
"profileUrl": "https://www.linkedin.com/in/piyushnarwani?miniProfileUrn=urn%3Ali%3Afs_miniProfile%3AACoAAAdHsOUBYtAunOfY0wJIbiwgewolov5X55M",
"networkDistance": "DISTANCE_2",
"location": "San Francisco, CA",
"headline": "Co-Founder, Aerotime (YC W21)"
}
]
}When it did not work, the answer is { "ok": false, "error": "…", "message": "…" }. What each error means.
Good to know
- At most 10 rows per call: LinkedIn's page size for this search.
- LinkedIn returns at most 1,000 rows for one search; narrow the filters to reach the rest.
- networkDistance in a row is defined as DISTANCE_1 / DISTANCE_2 / DISTANCE_3 (a published sample row also shows OUT_OF_NETWORK), while a profile reports FIRST_DEGREE / SECOND_DEGREE / THIRD_DEGREE for the same thing: do not compare the two as text.
In Claude or ChatGPT
Once connected, ask in your own words. The assistant sees this action as a tool with the same name, search_linkedin_people, and the same inputs.