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
| Input | What it is | Where to get it |
|---|---|---|
keywordsoptional | Text. Words to search for. | 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. |
hasJobOffersoptional | True or false. Only companies with job listings on LinkedIn. | You write it. |
headcountoptional | A list (a group of fields). Company sizes, as LinkedIn's own bands, e.g. { min: 51, max: 200 }.What goes inside
| You write it. |
networkDistanceoptional | A list (one of: 1, 2, 3). Connection degrees from you: 1, 2, 3. | 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_companies. |
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_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:
| Method | POST |
| URL | https://api.heyreagent.com/v1/actions/search_linkedin_companies |
| 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": "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:
returned | number |
nextCursor | A cursor. Other actions take it. |
results[].type | COMPANY |
results[].id | A company id. Other actions take it. |
results[].name | string |
results[].location | string or null |
results[].profileUrl | A company link. Other actions take it. |
results[].industry | string |
results[].summary | string or null |
results[].followersCount | number |
results[].jobOffersCount | number |
results[].headcount | string |
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
- 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.
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.