LinkedIn Sales Navigator account search API
Sales Navigator account search on your connected account’s seat: industry, headcount, region and hiring.
GET /v1/linkedin/accounts/{account}/salesnav/accountsBeta5 credits per callRefunded on failureimport os, requests
res = requests.get(
"https://api.groundsocial.dev/v1/linkedin/accounts/csn_01JDX9EXAMPLE0000000000/salesnav/accounts?industry_ids=43&headcount=E",
headers={"Authorization": f"Bearer {os.environ['GROUNDSOCIAL_API_KEY']}"},
)
res.raise_for_status()
data = res.json()No bundled sample for this call. The response is a LinkedInSalesAccountsPage; its fields are listed below.
Parameters
| Name | Type | Description |
|---|---|---|
accountpath · required | string | The id of the LinkedIn account you connected (from GET /v1/linkedin/accounts). Example: csn_01JDX9EXAMPLE0000000000. |
keywordsquery | string | |
industry_idsquery | string | |
headcountquery | string | Company size codes, comma-separated: B 1-10, C 11-50, D 51-200, E 201-500, F 501-1,000, G 1,001-5,000, H 5,001-10,000, I 10,001+. |
region_idsquery | string | Headquarters geo ids. |
job_opportunitiesquery | "true" | "false" | true: companies hiring on LinkedIn. One of true, false. |
afterquery | string | Cursor: the previous page’s after, unchanged. |
Response fields
200 with a LinkedInSalesAccountsPage, in LinkedIn’s own schema.org JSON-LD, with the rest of the public page beside it.
| Field | Type | Description |
|---|---|---|
account | string | The connected account id (csn_…). |
total | integer | null | |
total_display | string | null | |
data | LinkedInSalesAccount[] | |
after | string | null | Cursor for the next page (pass it as after); null on the last. |
Status codes
| Status | Meaning |
|---|---|
200 | One page of companies. |
400 | Invalid input. Nothing was charged. |
401 | Missing or invalid API key. |
402 | Not enough credits, a spend cap was reached, or payment is required. |
403 | The target is private, or the account is suspended. |
404 | LinkedIn has no such public page, or it was removed. |
429 | Too many requests. Wait for Retry-After seconds. |
503 | LinkedIn is temporarily unavailable. Retryable; nothing was charged. |
Every error has code, message, hint and retryable. All error codes
Questions
Whose LinkedIn account does it use?
Only one you connected yourself with POST /v1/linkedin/accounts (your session’s cookies, never your password), and only with your API key. Someone else’s account id answers 404, an account LinkedIn asked for a security check answers 403 until you reconnect it.
Do I need Sales Navigator?
Yes: it runs on your connected account’s own Sales Navigator seat. Connect the account with its li_a cookie (LinkedIn sets it once you open Sales Navigator in that browser). Without a seat it answers 403 forbidden, never charged.
LinkedIn is a trademark of LinkedIn Corporation. We are not affiliated with or endorsed by LinkedIn.