Docs / Search

lookup_search_ids

Find LinkedIn's id for a place, company, school, industry, job title and the like, by name.

This action only reads. It changes nothing, so it is safe to try.

What you give it

InputWhat it isWhere to get it
type
needed
One of: LOCATION, REGION, PEOPLE, CONNECTIONS, COMPANY, SCHOOL, INDUSTRY, SERVICE, JOB_FUNCTION, JOB_TITLE, EMPLOYMENT_TYPE, SKILL, LANGUAGE, POST_JOB_FUNCTION, SENIORITY, GROUPS, SALES_INDUSTRY, DEPARTMENT, PERSONA, ACCOUNT_LISTS, LEAD_LISTS, TECHNOLOGIES, SAVED_ACCOUNTS, SAVED_SEARCHES, RECENT_SEARCHES, POSTAL_CODE, HIRING_PROJECTS, SAVED_FILTERS, DEGREE. What kind of thing to look up.You write it.
keywords
optional
Text, up to 200 characters. The name to look for, e.g. "Berlin" or "Software". Not used for EMPLOYMENT_TYPE.You write it.
service
optional
One of: CLASSIC, SALES_NAVIGATOR, RECRUITER. Whose list to search (default CLASSIC).You write it.
limit
optional
A number, 1 to 100. How many to return (1–100, default 10).You write it.
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/lookup_search_ids \
  -H "Authorization: Bearer YOUR_KEY" \
  -H "content-type: application/json" \
  -d '{"type":"LOCATION","keywords":"Berlin"}'
The same call in JavaScript
const response = await fetch("https://api.heyreagent.com/v1/actions/lookup_search_ids", {
  method: "POST",
  headers: {
    "Authorization": "Bearer YOUR_KEY",
    "content-type": "application/json",
  },
  body: JSON.stringify({
    "type": "LOCATION",
    "keywords": "Berlin"
  }),
});
const answer = await response.json();
console.log(answer);
The same call in Python
import requests

response = requests.post(
    "https://api.heyreagent.com/v1/actions/lookup_search_ids",
    headers={"Authorization": "Bearer YOUR_KEY"},
    json={
        "type": "LOCATION",
        "keywords": "Berlin",
    },
)
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/lookup_search_ids
Send HeadersOn. Name Authorization, Value Bearer YOUR_KEY
Send BodyOn. Body Content Type JSON, Specify Body Using JSON, then paste the body below
{
  "type": "LOCATION",
  "keywords": "Berlin"
}

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
nextCursorCursor or null
matches[].idA search filter id. Other actions take it.
matches[].titlestring
matches[].pictureUrlstring

A field that does not apply to an answer is left out, or is null.

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": null,
  "matches": [
    {
      "title": "Technology, Information and Internet",
      "id": "6"
    }
  ]
}

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