# Search companies (Sales Navigator) (BETA)

Search companies with structured filters or a pasted Sales Navigator URL.

**POST** `https://api.up2data.ai/v1/search/companies/sales-nav`

**Credits:** 1 credit per page (up to 25 results) - **Mode:** synchronous

Two ways to search: pass structured `filters`, or paste a full Sales Navigator company-search URL as `sales_nav_url`. Industry and location take LinkedIn IDs. Empty pages are free. A single call returns at most 100 results (`pagination.has_more` is true when more exist); for a bigger pull, send it as a search item in [`POST /v1/batch`](https://up2data.ai/docs/v1/api/batch-create/) instead of looping sync calls.

> **Warning:** `filters.company_types` answers 400: Sales Navigator company search has no company type filter.

> **Warning:** Provide `filters` or `sales_nav_url`, never both, never neither.

> **Info:** Counts as 1 request against the 5,000/min per-key limit and 1 search against the 5,000/hour per-organization search quota. See [Rate limits](https://up2data.ai/docs/v1/guides/rate-limits/).

> **Info:** Send many as batch operation items (operation search.companies.sales_nav); up to 1,000 results per item, reserved at submission and refunded for any shortfall once the search runs. See the [batch endpoint](https://up2data.ai/docs/v1/api/batch-create/).

## Request

| Field | Type | Notes |
|---|---|---|
| `filters` | `object` | Structured filter object; see the fields below. Provide filters or sales_nav_url, never both, never neither. |
| `filters.keywords` | `string` |  |
| `filters.industry_ids` | `FacetId[]` | Bare id string, or { id, text } for a display label. |
| `filters.location_ids` | `FacetId[]` | HQ geography ids. |
| `filters.company_sizes` | `string[]` | Enum per item: self-employed, 1-10, 11-50, 51-200, 201-500, 501-1000, 1001-5000, 5001-10000, 10001+. |
| `sales_nav_url` | `string` | Full Sales Navigator company-search URL. Mutually exclusive with filters. |
| `max_results` | `integer` | Default 100. 1 to 1,000; a sync call returns at most 100 results (`pagination.has_more` is true when more exist). For a bigger pull, send it as a search item in POST /v1/batch, which allows up to 1,000. |

## Call it

**cURL**

```bash
curl -X POST "https://api.up2data.ai/v1/search/companies/sales-nav" \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "filters": {
    "industry_ids": [
      "96"
    ],
    "company_sizes": [
      "201-500"
    ]
  },
  "max_results": 50
}'
```

**Python**

```python
import requests

url = "https://api.up2data.ai/v1/search/companies/sales-nav"
headers = {
    "X-API-Key": "YOUR_API_KEY",
    "Content-Type": "application/json",
}
payload = {
    "filters": {
        "industry_ids": [
            "96"
        ],
        "company_sizes": [
            "201-500"
        ]
    },
    "max_results": 50
}

response = requests.post(url, headers=headers, json=payload)
print(response.json())
```

**Node**

```javascript
const url = "https://api.up2data.ai/v1/search/companies/sales-nav";
const headers = {
  "X-API-Key": "YOUR_API_KEY",
  "Content-Type": "application/json",
};
const body = {
  "filters": {
    "industry_ids": [
      "96"
    ],
    "company_sizes": [
      "201-500"
    ]
  },
  "max_results": 50
};

const response = await fetch(url, {
  method: "POST",
  headers,
  body: JSON.stringify(body),
});
const data = await response.json();
console.log(data);
```

**Go**

```go
package main

import (
	"bytes"
	"fmt"
	"io"
	"net/http"
)

func main() {
	url := "https://api.up2data.ai/v1/search/companies/sales-nav"
	body := bytes.NewBufferString(`{
  "filters": {
    "industry_ids": [
      "96"
    ],
    "company_sizes": [
      "201-500"
    ]
  },
  "max_results": 50
}`)
	req, err := http.NewRequest("POST", url, body)
	if err != nil {
		panic(err)
	}
	req.Header.Set("X-API-Key", "YOUR_API_KEY")
	req.Header.Set("Content-Type", "application/json")

	client := &http.Client{}
	resp, err := client.Do(req)
	if err != nil {
		panic(err)
	}
	defer resp.Body.Close()

	respBody, _ := io.ReadAll(resp.Body)
	fmt.Println(string(respBody))
}
```

## Response

**200**

```json
{
  "data": {
    "results": [{ "url": "https://www.linkedin.com/company/74126343", "name": "Anthropic", "linkedin_id": "74126343", "industry": "Research Services", "description": "AI safety and research company.", "headcount": 2841, "company_size": { "min": 1001, "max": 5000 }, "scraped_at": "2026-07-08T12:00:00Z" }],
    "pagination": { "returned": 50, "max_results": 50, "pages_scraped": 2, "has_more": true }
  },
  "meta": { "creditsUsed": 2, "creditsRemaining": 98415, "billed": true, "reason": "success", "requestId": "req_example", "latencyMs": 4100, "resolved_search_url": "https://www.linkedin.com/sales/search/company?query=(filters:List((type:COMPANY_HEADCOUNT,values:List((id:E,text:201-500,selectionType:INCLUDED))),(type:INDUSTRY,values:List((id:96,selectionType:INCLUDED)))))" }
}
```

## Errors

| Status | Type | When | Billed |
|---|---|---|---|
| 400 | `invalid_request` | Malformed body, unknown filter, bad enum value, or both/neither of filters and sales_nav_url provided. | No |
| 401 | `invalid_api_key` | Missing, malformed, or revoked key. | No |
| 402 | `insufficient_credits` | Balance can't cover the page(s) requested. | No |
| 429 | `rate_limited` | Over the 5,000 requests/min limit, or the 5,000 searches/hour per-organization quota. Honor Retry-After. | No |
| 500 | `internal_error` | Something broke on the server side. | No |
| 504 | `upstream_timeout` | The live scrape didn't complete in time. | No |

See the [Errors guide](https://up2data.ai/docs/v1/guides/errors/) for every error type this version can return.
