Docs / Search
search_linkedin
Run a search from a results link copied out of LinkedIn, Sales Navigator or Recruiter.
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 |
|---|---|---|
kindoptional | One of: classic/people, classic/companies, classic/posts, classic/jobs, sales_navigator/people, sales_navigator/companies, recruiter/people. What to search. Required unless url is given. | You write it. |
filtersoptional | A group of fields. The search filters for that kind, e.g. { keywords: "head of sales", network_distance: [2], location: ["106967730"] }. | You write it. |
urloptional | A link. A LinkedIn / Sales Navigator / Recruiter search URL to run instead of kind + filters. | You write it. |
limitoptional | A number, 1 to 100. How many to return (1–100, 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. |
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 \
-H "Authorization: Bearer YOUR_KEY" \
-H "content-type: application/json" \
-d '{"url":"https://www.linkedin.com/search/results/people/?keywords=head%20of%20sales"}'The same call in JavaScript
const response = await fetch("https://api.heyreagent.com/v1/actions/search_linkedin", {
method: "POST",
headers: {
"Authorization": "Bearer YOUR_KEY",
"content-type": "application/json",
},
body: JSON.stringify({
"url": "https://www.linkedin.com/search/results/people/?keywords=head%20of%20sales"
}),
});
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",
headers={"Authorization": "Bearer YOUR_KEY"},
json={
"url": "https://www.linkedin.com/search/results/people/?keywords=head%20of%20sales",
},
)
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 |
| 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 |
{
"url": "https://www.linkedin.com/search/results/people/?keywords=head%20of%20sales"
}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 | JOB |
results[].id | string |
results[].publicIdentifier | string or null |
results[].publicProfileUrl | string or null |
results[].profileUrl | string |
results[].profilePictureUrl | string or null |
results[].profilePictureUrlLarge | string or null |
results[].memberUrn | string or null |
results[].name | string |
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 |
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 |
results[].summary | string or null |
results[].jobOffersCount | number |
results[].headcount | string |
results[].socialId | string |
results[].shareUrl | string |
results[].title | string |
results[].text | string |
results[].date | string |
results[].parsedDatetime | string |
results[].reactionCounter | number |
results[].commentCounter | number |
results[].repostCounter | number |
results[].impressionsCounter | number |
results[].userReacted | LIKE | PRAISE | APPRECIATION | EMPATHY | INTEREST | ENTERTAINMENT |
results[].isRepost | boolean |
results[].repostId | string |
results[].repostParsedDatetime | string |
results[].referenceId | string |
results[].postedAt | any or null |
results[].reposted | boolean |
results[].url | string |
results[].promoted | boolean |
results[].benefits | string[] |
results[].easyApply | boolean |
A field that does not apply to an answer is left out, or is null. There are 267 more fields nested inside these.
When it did not work, the answer is { "ok": false, "error": "…", "message": "…" }. What each error means.
Good to know
- Use it for url. For filters use the typed actions (search_linkedin_people, …_companies, …_posts, …_jobs, …_sales_navigator_people, …_sales_navigator_companies, …_recruiter_people): this one takes them as a free-form object in LinkedIn's own snake_case names, unchecked.
- Rows are of the kind searched; their fields are those of the typed action for that kind.
- A limit above LinkedIn's page size for the kind searched is brought down to it: 10 for ordinary people and companies, 49 for posts, 50 for jobs, 100 on Sales Navigator and Recruiter. A pasted ordinary link does not say its kind and is held to 50.
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, and the same inputs.