# nv.createSavedSearch

Save a Sales Navigator lead or account search, given its search URL.

> 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.

Save a Sales Navigator lead search or account search, given the search's URL. For example, build a search in Sales Navigator, copy its URL from the address bar, and save it so Sales Navigator keeps track of it. To read the saved search's results later, pass its `url` as `customSearchUrl` to [`nv.searchPeople`](/docs/action-nv-search-people) or [`nv.searchCompanies`](/docs/action-nv-search-companies).

An active Sales Navigator subscription is required. To see the searches you already saved, call [`nv.retrieveSavedSearches`](/docs/action-nv-retrieve-saved-searches).

:::surface node,python
In the SDK this is the `nvCreateSavedSearch` 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 saved-searches create`. 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.createSavedSearch",
  "label": "headsOfSales",
  "type": "lead",
  "customSearchUrl": "https://www.linkedin.com/sales/search/people?query=(spellCorrectionEnabled%3Atrue%2Ckeywords%3AHead%2520of%2520Sales)"
}
```

```typescript tab=Node
const workflow = await linkedapi.nvCreateSavedSearch.execute({
  type: "lead",
  customSearchUrl: "https://www.linkedin.com/sales/search/people?query=(spellCorrectionEnabled%3Atrue%2Ckeywords%3AHead%2520of%2520Sales)"
});

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

```python tab=Python
from linkedapi import NvCreateSavedSearchParams

workflow = linkedapi.nv_create_saved_search.execute(
    NvCreateSavedSearchParams(
        type="lead",
        custom_search_url="https://www.linkedin.com/sales/search/people?query=(spellCorrectionEnabled%3Atrue%2Ckeywords%3AHead%2520of%2520Sales)",
    )
)

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

```bash tab=CLI
linkedin navigator saved-searches create \
  "https://www.linkedin.com/sales/search/people?query=(spellCorrectionEnabled%3Atrue%2Ckeywords%3AHead%2520of%2520Sales)" \
  --type lead \
  --json
```

In AI assistants, the MCP tool is `nv_create_saved_search`. The n8n action is **Create saved search in Sales Navigator**; the Make module is **Create Saved Search in Sales Navigator**.

| Parameter | Description |
| --- | --- |
| `label` | Optional label included in workflow completion. |
| `type` | Required. `lead` to save a lead search or `account` to save an account search. |
| `customSearchUrl` | Required. URL of a Sales Navigator search of that type: a lead search (`https://www.linkedin.com/sales/search/people?…`) for `lead`, or an account search (`https://www.linkedin.com/sales/search/company?…`) for `account`. |

A `customSearchUrl` that is not a Sales Navigator search of the requested `type` is rejected with `invalidWorkflow` before the workflow starts.

:::surface cli
| Arg | Required | Description |
| --- | --- | --- |
| `search-url` | yes | URL of a Sales Navigator lead or account search, matching `--type` |

| Flag | Description |
| --- | --- |
| `--type` | Required. `lead` or `account`. |
:::

## Saving behaviour

- **Saved with Sales Navigator's own control.** The action opens the search and saves it with Sales Navigator's Save search control, as you would in the browser. The result describes the saved search, including its `id`.
- **A search that is already saved.** If `customSearchUrl` opens one of your saved searches, as a URL copied while viewing a saved search or a saved search's `url` from [`nv.retrieveSavedSearches`](/docs/action-nv-retrieve-saved-searches) does (its URL carries `?savedSearchId=`), nothing new is saved: the result describes that existing saved search. A successful call therefore does not prove that a new saved search was created. To tell the two apart, compare the result's `id` with the IDs `nv.retrieveSavedSearches` returned before the call.
- **Sales Navigator names it.** The saved search gets Sales Navigator's default name, such as `Lead Search 1`. Choosing a name, notification settings, or new-results-only reading is not available yet.
- **Use a URL copied from Sales Navigator.** The search must open in Sales Navigator exactly as given. A URL copied from Sales Navigator's address bar works. If Sales Navigator changes the search when it opens the URL, the call fails with `unexpectedError` and nothing is saved.
- **No duplicate check for equivalent searches.** Apart from that case, Linked API does not check whether another of your saved searches has the same criteria. To avoid saving one twice, look it up with [`nv.retrieveSavedSearches`](/docs/action-nv-retrieve-saved-searches) first.
- **One call saves at most one search.** If the call is retried internally, it never saves the search twice.
- **English interface only, for now.** This is a current limitation: saved searches work only with an English Sales Navigator interface. On a German, Spanish, French or Portuguese interface, the call fails with `interfaceLanguageNotSupported`.

To delete a saved search, use [`nv.deleteSavedSearch`](/docs/action-nv-delete-saved-search).

## Result options

```json
{
  "actionType": "nv.createSavedSearch",
  "label": "headsOfSales",
  "success": true,
  "data": {
    "id": "1900000001",
    "name": "Lead Search 1",
    "type": "lead",
    "url": "https://www.linkedin.com/sales/search/people?savedSearchId=1900000001"
  }
}
```

| Field | Meaning |
| --- | --- |
| `id` | ID of the saved search, as a string: the one this call created, or the existing one `customSearchUrl` opened (see [Saving behaviour](#saving-behaviour)). Pass it as `savedSearchId` to delete it. |
| `name` | Name Sales Navigator gave the saved search. |
| `type` | `lead` or `account`, matching the requested `type`. |
| `url` | Opens the saved search, in the same form as `url` in [`nv.retrieveSavedSearches`](/docs/action-nv-retrieve-saved-searches). Pass it as `customSearchUrl` to [`nv.searchPeople`](/docs/action-nv-search-people) or [`nv.searchCompanies`](/docs/action-nv-search-companies) to read its results. |

`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.createSavedSearch",
  "label": "headsOfSales",
  "success": false,
  "error": {
    "type": "interfaceLanguageNotSupported",
    "message": "This action currently supports only the English Sales Navigator interface."
  }
}
```

Possible `error.type` values:

- `noSalesNavigator` — the account does not have an active Sales Navigator subscription.
- `interfaceLanguageNotSupported` — the account's Sales Navigator interface is German, Spanish, French or Portuguese rather than English. Nothing is saved; this is a current limitation (see above).
- `unexpectedError` — the search could not be saved, or Linked API could not confirm that it was. In the second case it may have been saved anyway: check [`nv.retrieveSavedSearches`](/docs/action-nv-retrieve-saved-searches) before calling again, so you do not save it twice.
