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

InputWhat it isWhere to get it
kind
optional
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.
filters
optional
A group of fields. The search filters for that kind, e.g. { keywords: "head of sales", network_distance: [2], location: ["106967730"] }.You write it.
url
optional
A link. A LinkedIn / Sales Navigator / Recruiter search URL to run instead of kind + filters.You write it.
limit
optional
A number, 1 to 100. How many to return (1–100, default 10).You write it.
cursor
optional
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.
connectionId
optional
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:

MethodPOST
URLhttps://api.heyreagent.com/v1/actions/search_linkedin
Send HeadersOn. Name Authorization, Value Bearer YOUR_KEY
Send BodyOn. 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:

returnednumber
nextCursorA cursor. Other actions take it.
results[].typeJOB
results[].idstring
results[].publicIdentifierstring or null
results[].publicProfileUrlstring or null
results[].profileUrlstring
results[].profilePictureUrlstring or null
results[].profilePictureUrlLargestring or null
results[].memberUrnstring or null
results[].namestring
results[].firstNamestring
results[].lastNamestring
results[].networkDistanceSELF | DISTANCE_1 | DISTANCE_2 | DISTANCE_3 | OUT_OF_NETWORK
results[].locationstring or null
results[].industrystring
results[].keywordsMatchstring
results[].headlinestring
results[].connectionsCountnumber
results[].followersCountnumber
results[].pendingInvitationboolean
results[].canSendInmailboolean
results[].hiddenCandidateboolean
results[].interestLikelihoodstring
results[].recruiterCandidateIdstring
results[].recruiterPipelineCategorystring
results[].premiumboolean
results[].verifiedboolean
results[].sharedConnectionsCountnumber
results[].recentPostsCountnumber
results[].recentlyHiredboolean
results[].mentionedInTheNewsboolean
results[].interestsstring
results[].summarystring or null
results[].jobOffersCountnumber
results[].headcountstring
results[].socialIdstring
results[].shareUrlstring
results[].titlestring
results[].textstring
results[].datestring
results[].parsedDatetimestring
results[].reactionCounternumber
results[].commentCounternumber
results[].repostCounternumber
results[].impressionsCounternumber
results[].userReactedLIKE | PRAISE | APPRECIATION | EMPATHY | INTEREST | ENTERTAINMENT
results[].isRepostboolean
results[].repostIdstring
results[].repostParsedDatetimestring
results[].referenceIdstring
results[].postedAtany or null
results[].repostedboolean
results[].urlstring
results[].promotedboolean
results[].benefitsstring[]
results[].easyApplyboolean

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

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.