Docs / Search

search_linkedin_companies

Search company pages 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

InputWhat it isWhere to get it
keywords
optional
Text. Words to search for.You write it.
industry
optional
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.
location
optional
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.
hasJobOffers
optional
True or false. Only companies with job listings on LinkedIn.You write it.
headcount
optional
A list (a group of fields). Company sizes, as LinkedIn's own bands, e.g. { min: 51, max: 200 }.
What goes inside
  • min (optional): one of: 1, 11, 51, 201, 501, 1001, 5001, 10001.
  • max (optional): one of: 1, 10, 50, 200, 500, 1000, 5000, 10000.
You write it.
networkDistance
optional
A list (one of: 1, 2, 3). Connection degrees from you: 1, 2, 3.You write it.
limit
optional
A number, 1 to 10. How many to return (1–10, 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_companies.
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_companies \
  -H "Authorization: Bearer YOUR_KEY" \
  -H "content-type: application/json" \
  -d '{"keywords":"software"}'
The same call in JavaScript
const response = await fetch("https://api.heyreagent.com/v1/actions/search_linkedin_companies", {
  method: "POST",
  headers: {
    "Authorization": "Bearer YOUR_KEY",
    "content-type": "application/json",
  },
  body: JSON.stringify({
    "keywords": "software"
  }),
});
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_companies",
    headers={"Authorization": "Bearer YOUR_KEY"},
    json={
        "keywords": "software",
    },
)
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_companies
Send HeadersOn. Name Authorization, Value Bearer YOUR_KEY
Send BodyOn. Body Content Type JSON, Specify Body Using JSON, then paste the body below
{
  "keywords": "software"
}

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[].typeCOMPANY
results[].idA company id. Other actions take it.
results[].namestring
results[].locationstring or null
results[].profileUrlA company link. Other actions take it.
results[].industrystring
results[].summarystring or null
results[].followersCountnumber
results[].jobOffersCountnumber
results[].headcountstring

A field that does not apply to an answer is left out, or is null. There are 3 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": "eyJhY2NvdW50X2lkIjoiOFJma0txU0tSTy1JbXpKT2k4T1I1USIsImxpbWl0IjoxMCwic3RhcnQiOjEwLCJwYXJhbXMiOnsiYXBpIjoiY2xhc3NpYyIsImNhdGVnb3J5IjoiY29tcGFuaWVzIiwiaGFzX2pvYl9vZmZlcnMiOnRydWUsImxvY2F0aW9uIjpbMTAyMjc3MzMxLDEwMjQ0ODEwM119fQ==",
  "total": 1000,
  "results": [
    {
      "type": "COMPANY",
      "id": "165158",
      "name": "Netflix",
      "profileUrl": "https://www.linkedin.com/company/netflix/",
      "summary": "Where you come to do the best work of your life. Follow @Netflix on Twitter, Instagram, TikTok and Youtube for more",
      "industry": "Entertainment Providers",
      "location": "Los Gatos, CA",
      "followersCount": 11000000,
      "jobOffersCount": 427
    }
  ]
}

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_companies, and the same inputs.