# nv.retrieveListAccounts

Retrieve the accounts in one of your Sales Navigator account lists, with the URLs used to open, save or remove them.

> The API Reference is also the SDK and CLI reference. Consecutive code fences marked `tab=HTTP`, `tab=Node`, `tab=Python` and `tab=CLI` are the same call on each surface (a fence marked `tab=HTTP,CLI` is the same text for both), and a block between `:::surface <names>` and `:::` applies only to the surfaces it names. Identifiers in the text are written as in Node and in HTTP JSON (camelCase); the Python SDK spells methods, parameters and result attributes in snake_case (`sendMessage` → `send_message`, `reconnectionLink` → `reconnection_link`), while names inside HTTP JSON stay camelCase.

Retrieve the accounts in one of your Sales Navigator account lists. For example, export a list to your CRM, or check which companies are in it before removing one with [`nv.removeAccountFromList`](/docs/action-nv-remove-account-from-list). Each account's `hashedUrl` can be passed straight to [`nv.openCompanyPage`](/docs/action-nv-open-company-page), [`nv.saveAccount`](/docs/action-nv-save-account) or [`nv.removeAccountFromList`](/docs/action-nv-remove-account-from-list).

An active Sales Navigator subscription is required. To find a list's ID, call [`nv.retrieveLists`](/docs/action-nv-retrieve-lists) with `type` set to `account`. For the people in a lead list, use [`nv.retrieveListLeads`](/docs/action-nv-retrieve-list-leads).

:::surface node,python
In the SDK this is the `nvRetrieveListAccounts` method. It takes the parameters below except `label`, which exists only in workflow JSON. The result below is returned in `data`.
:::

:::surface cli
The command is `linkedin navigator lists accounts`. Its argument and flag are listed below.
:::

## Constraints

> ⏺️ **Root Start:** allowed.

> ⬆️ **Parent Actions:** N/A.

> ⬇️ **Child Actions:** N/A.

## Parameters

```json tab=HTTP
{
  "actionType": "nv.retrieveListAccounts",
  "label": "targetAccounts",
  "listId": "7420000000000000003",
  "limit": 100
}
```

```typescript tab=Node
const workflow = await linkedapi.nvRetrieveListAccounts.execute({
  listId: "7420000000000000003",
  limit: 100
});

const { data, errors } = await linkedapi.nvRetrieveListAccounts.result(workflow.workflowId);
```

```python tab=Python
from linkedapi import NvRetrieveListAccountsParams

workflow = linkedapi.nv_retrieve_list_accounts.execute(
    NvRetrieveListAccountsParams(
        list_id="7420000000000000003",
        limit=100,
    )
)

result = linkedapi.nv_retrieve_list_accounts.result(workflow.workflow_id)
```

```bash tab=CLI
linkedin navigator lists accounts 7420000000000000003 --limit 100 --json
```

In AI assistants, the MCP tool is `nv_retrieve_list_accounts`. The n8n action is **Retrieve list accounts in Sales Navigator**; the Make module is **Retrieve List Accounts in Sales Navigator**.

| Parameter | Description |
| --- | --- |
| `label` | Optional label included in workflow completion. |
| `listId` | Required. ID of one of your account lists, as returned in `id` by [`nv.retrieveLists`](/docs/action-nv-retrieve-lists) or [`nv.createList`](/docs/action-nv-create-list). Pass it as a string; a number is rejected. |
| `limit` | Optional. Maximum number of accounts to return, from 1 to 1000. Defaults to 25. |

Invalid parameters are rejected with `invalidWorkflow` before the workflow starts.

:::surface cli
| Arg | Required | Description |
| --- | --- | --- |
| `list-id` | yes | ID of one of your account lists |

| Flag | Description |
| --- | --- |
| `--limit` | Maximum number of accounts to return, 1–1000; default 25. |
:::

## Reading behaviour

- **Only your own account lists.** `listId` must be one of the account lists [`nv.retrieveLists`](/docs/action-nv-retrieve-lists) returns for you. A lead list's ID, a list someone else shared with you, or an ID that is not one of your lists fails with `listNotFound`.
- **In Sales Navigator's order, up to `limit`.** Accounts are returned in the order the list shows them. Linked API reads the list 25 accounts at a time until it has `limit` accounts or reaches the end of the list. An empty list returns an empty array.
- **Ready for other actions.** `urn` and `hashedUrl` have the same form as in [`nv.searchCompanies`](/docs/action-nv-search-companies). Pass `hashedUrl` to [`nv.openCompanyPage`](/docs/action-nv-open-company-page), [`nv.saveAccount`](/docs/action-nv-save-account) or [`nv.removeAccountFromList`](/docs/action-nv-remove-account-from-list), or to `filter.subjects` in [`nv.retrieveAlerts`](/docs/action-nv-retrieve-alerts#alerts-for-a-list-or-for-chosen-subjects).
- **Recent changes can take tens of seconds to appear.** Right after an account is added to or removed from the list, this action can still return the list as it was. Read it again a little later.
- **A list that changes while it is read.** If the list changes between two of its pages, the call fails with `unexpectedError` rather than returning a partial or repeated list. Call it again.

## Result options

```json
{
  "actionType": "nv.retrieveListAccounts",
  "label": "targetAccounts",
  "success": true,
  "data": [
    {
      "name": "TechCorp",
      "urn": "urn:li:organization:12345678",
      "hashedUrl": "https://www.linkedin.com/company/12345678",
      "industry": "IT Services and IT Consulting",
      "employeesCount": 500
    },
    {
      "name": "Example Labs",
      "urn": "urn:li:organization:87654321",
      "hashedUrl": "https://www.linkedin.com/company/87654321",
      "industry": null,
      "employeesCount": null
    }
  ]
}
```

| Field | Meaning |
| --- | --- |
| `name` | Company name. |
| `urn` | [URN](/docs/data-conventions#linkedin-urns) of the company, `urn:li:organization:<id>`. |
| `hashedUrl` | [Hashed](/faq/what-are-hashed-url-and-public-url) LinkedIn URL of the company, with its numeric ID. |
| `industry` | The company's industry as Sales Navigator shows it, or `null`. |
| `employeesCount` | Number of employees Sales Navigator reports for the company, or `null`. |

`label` is included only if specified in the action parameters.

## Error result

An unsuccessful action returns `success: false` with an `error` object:

```json
{
  "actionType": "nv.retrieveListAccounts",
  "label": "targetAccounts",
  "success": false,
  "error": {
    "type": "listNotFound",
    "message": "The list is not available for this subject in Sales Navigator."
  }
}
```

Possible `error.type` values:

- `noSalesNavigator` — the account does not have an active Sales Navigator subscription.
- `listNotFound` — `listId` is not one of your account lists. This includes a lead list's ID and a list someone else shared with you.
- `unexpectedError` — the list could not be read, for example because it changed while it was being read. Call it again.
