# nv.openCompanyPage

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

This action allows you to open a company page in Sales Navigator to retrieve its basic information and perform additional company-related actions if needed.

:::surface node
In the Node SDK this is `linkedapi.nvFetchCompany` – the call is below, under [Parameters](#parameters).
:::

:::surface python
In the Python SDK this is `linkedapi.nv_fetch_company` – the call is below, under [Parameters](#parameters).
:::

:::surface cli
In the CLI this is `linkedin navigator company fetch` – the command is below, under [Parameters](#parameters).
:::

## Constraints

> ⏺️ **Root Start:** allowed, when `companyHashedUrl` parameter is provided.

> ⬆️ **Parent Actions:** [st.openCompanyPage](/docs/action-st-open-company-page), [nv.doForCompanies](/docs/action-nv-do-for-companies).

> ⬇️ **Child Actions:** [nv.saveAccount](/docs/action-nv-save-account), [nv.unsaveAccount](/docs/action-nv-unsave-account), [nv.removeAccountFromList](/docs/action-nv-remove-account-from-list), [nv.retrieveCompanyEmployees](/docs/action-nv-retrieve-company-employees), [nv.retrieveCompanyDMs](/docs/action-nv-retrieve-company-dms), [st.openCompanyPage](/docs/action-st-open-company-page).

## Parameters

```json tab=HTTP
{
  "actionType": "nv.openCompanyPage",
  "label": "company1",
  "companyHashedUrl": "https://www.linkedin.com/company/12345678",
  "basicInfo": true,
  "then": { ... }
}
```

```typescript tab=Node
const workflow = await linkedapi.nvFetchCompany.execute({
  companyHashedUrl: "https://www.linkedin.com/company/12345678"
});

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

```python tab=Python
from linkedapi import NvFetchCompanyParams

workflow = linkedapi.nv_fetch_company.execute(
    NvFetchCompanyParams(
        company_hashed_url="https://www.linkedin.com/company/12345678",
    )
)

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

```bash tab=CLI
linkedin navigator company fetch https://www.linkedin.com/company/12345678
```

In AI assistants, the MCP server runs this action as the `nv_fetch_company` tool.

:::surface node,python
In the SDK this is the `nvFetchCompany` method. It always returns basic information: `basicInfo`, like `label` and `then`, exists only in workflow JSON. It takes the other parameters below and returns the result below in `data`.

Each `retrieve…` flag of `nvFetchCompany` adds one child action, and its data comes back under its own property of `data`:

| Flag | Child action | Configuration | Property of `data` |
| --- | --- | --- | --- |
| `retrieveEmployees` | [`nv.retrieveCompanyEmployees`](/docs/action-nv-retrieve-company-employees) | `employeesRetrievalConfig`: `limit`, `filter` | `employees` |
| `retrieveDMs` | [`nv.retrieveCompanyDMs`](/docs/action-nv-retrieve-company-dms) | `dmsRetrievalConfig`: `limit` | `dms` |

A configuration object takes effect only with its flag set to `true`, and takes the parameters of its child action – their defaults, limits and the employee `filter` fields are on the child's page. For example, up to 100 employees:
:::

:::surface node
```typescript
const workflow = await linkedapi.nvFetchCompany.execute({
  companyHashedUrl: "https://www.linkedin.com/company/12345678",
  retrieveEmployees: true,
  employeesRetrievalConfig: { limit: 100 }
});
```
:::

:::surface python
```python
from linkedapi import NvFetchCompanyParams

workflow = linkedapi.nv_fetch_company.execute(
    NvFetchCompanyParams(
        company_hashed_url="https://www.linkedin.com/company/12345678",
        retrieve_employees=True,
        employees_retrieval_config={"limit": 100},
    )
)
```
:::

:::surface node,python
When a child action fails, its error comes back in `errors` and the rest of `data` is still returned.
:::

:::surface cli
In the CLI this is `linkedin navigator company fetch`:

```bash
linkedin navigator company fetch <hashed-url> [flags]
```

| Flag | Type | Description |
| --- | --- | --- |
| `--employees` | boolean | Include employee data |
| `--dms` | boolean | Include decision makers |
| `--employees-limit` | integer | Max employees to retrieve |
| `--employees-first-name` | string | Filter employees by first name |
| `--employees-last-name` | string | Filter employees by last name |
| `--employees-positions` | string | Filter employees by positions, comma-separated |
| `--employees-locations` | string | Filter employees by locations, comma-separated |
| `--employees-industries` | string | Filter employees by industries, comma-separated |
| `--employees-schools` | string | Filter employees by schools, comma-separated |
| `--employees-years-of-experience` | string | Filter employees by experience ranges, comma-separated |
| `--employees-connection-degrees` | string | Filter employees by connection degrees (`1st`, `2nd`, `3rd+`, `groupMembers`), comma-separated |
| `--dms-limit` | integer | Max decision makers to retrieve |
:::

- `label` (optional) – custom label for tracking this action in workflow completion.
- `companyHashedUrl` (required for root start, forbidden for parent start) – LinkedIn URL of the company: a [hashed](/faq/what-are-hashed-url-and-public-url) URL with the numeric company ID, a Sales Navigator company URL or a public company URL (see [Accepted URLs](#accepted-urls)).
- `basicInfo` (optional, default: `false`) – when set to `true`, the action includes basic company information in the results.
- `then` (optional) – object or array of child actions to be executed within this action.

### Accepted URLs

`companyHashedUrl` takes any of these forms:

- a [hashed](/faq/what-are-hashed-url-and-public-url) LinkedIn URL with the numeric company ID (`linkedin.com/company/12345678`), such as `hashedUrl` from [`nv.searchCompanies`](/docs/action-nv-search-companies) or [`nv.retrieveListAccounts`](/docs/action-nv-retrieve-list-accounts);
- a Sales Navigator company URL (`linkedin.com/sales/company/…`), such as an alert's `subject.url` from [`nv.retrieveAlerts`](/docs/action-nv-retrieve-alerts);
- a public company URL (`linkedin.com/company/<vanity>`). It costs one extra standard page load: Linked API opens the company's LinkedIn page first and goes to its Sales Navigator page from there.

Child actions act on the page this action opened and do not open a public URL again. A public URL that leads to no LinkedIn company page returns `companyNotFound`.

The same forms are accepted by [`nv.saveAccount`](/docs/action-nv-save-account), [`nv.unsaveAccount`](/docs/action-nv-unsave-account) and [`nv.removeAccountFromList`](/docs/action-nv-remove-account-from-list) when they run as root actions.

## Result options

1. **Successful page opening with `basicInfo` set to `true`:**

```json
{
  "actionType": "nv.openCompanyPage",
  "label": "company1",
  "success": true,
  "data": {
    "name": "TechCorp",
    "urn": "urn:li:organization:12345678",
    "publicUrl": "https://www.linkedin.com/company/company1",
    "description": "TechCorp is a leading provider of innovative technology solutions for businesses worldwide.",
    "location": "Cupertino, California",
    "headquarters": "US",
    "industry": "IT Services and IT Consulting",
    "website": "https://techcorp.com",
    "employeesCount": 500,
    "yearFounded": 2019,
    "logoUrl": "https://media.licdn.com/dms/image/v2/C4D0BAQE/company-logo_200_200/0/1700000000000",
    "then": { ... }
  }
}
```

- `label` – included only if specified in the action parameters.
- `data` – basic information about the company and results of child actions execution.
  - `name` – name of the company.
  - `urn` – [URN](/docs/data-conventions#linkedin-urns) of the company, or `null` if LinkedIn does not expose it.
  - `publicUrl` – [public](/faq/what-are-hashed-url-and-public-url) LinkedIn URL of the company.
  - `description` – description of the company.
  - `location` – free-form string representing the company headquarters location.
  - `headquarters` – two-character country code (e.g., "US", "UK") representing headquarters location.
  - `industry` – enum representing the company industry. Takes specific values available in the LinkedIn interface.
  - `logoUrl` – URL of the company's logo, or `null` if the company has no logo.

2. **Successful page opening with `basicInfo` set to `false`:**

```json
{
  "actionType": "nv.openCompanyPage",
  "label": "company1",
  "success": true,
  "data": {
    "then": { ... }
  }
}
```

- `label` – included only if specified in the action parameters.
- `data.then` – results of child actions execution.

3. **Failed page opening:**

```json
{
  "actionType": "nv.openCompanyPage",
  "label": "company1",
  "success": false,
  "error": {
    "type": "companyNotFound",
    "message": "The provided URL is not an existing LinkedIn company."
  }
}
```

- `label` – included only if specified in the action parameters.
- `error.type` – enum with the following possible values:
  - `noSalesNavigator` – your account does not have Sales Navigator subscription.
  - `companyNotFound` – provided URL is not an existing LinkedIn company, including a public company URL that leads to no LinkedIn company page.
