> ## Documentation Index
> Fetch the complete documentation index at: https://docs.up2data.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Search companies

> Live company search with structured filters or a classic LinkedIn search URL.

**Cost: 2 credits per page scraped (up to 25 results per page) · empty pages free**

<Note>
  **Two ways to search — pick exactly one**

  1. **`filters`** — pass structured fields; Up2Data builds the LinkedIn search URL.
  2. **`search_url`** — paste a classic LinkedIn company-search URL from your browser.

  Do not send both. Do not send neither.
</Note>

Industry and location take LinkedIn IDs. For Sales Navigator account search, use [companies Sales Nav](/api-reference/search/companies-sales-nav).

<ParamField body="filters" type="object">
  Mode 1. Mutually exclusive with `search_url`.

  <Expandable title="Filter fields">
    <ParamField body="keywords" type="string" />

    <ParamField body="industry_ids" type="string[] | object[]">LinkedIn industry ids.</ParamField>
    <ParamField body="location_ids" type="string[] | object[]">HQ geography ids.</ParamField>
    <ParamField body="company_sizes" type="string[]">`self-employed` | `1-10` | `11-50` | `51-200` | `201-500` | `501-1000` | `1001-5000` | `5001-10000` | `10001+`.</ParamField>
    <ParamField body="company_types" type="string[]">`public` | `educational` | `government` | `nonprofit` | `private` | `self_employed` | `self_owned`.</ParamField>
  </Expandable>
</ParamField>

<ParamField body="search_url" type="string">
  Mode 2. Classic LinkedIn company search URL from your browser (e.g. `https://www.linkedin.com/search/results/companies/?…`). Mutually exclusive with `filters`.
</ParamField>

<ParamField body="max_results" type="integer" default="25">
  1–1,000. Target number of company stubs to return.
</ParamField>

### Response

<ResponseField name="data.results" type="object[]">Company stubs: `url`, `name`, `industry`, `headcount`, `hq`.</ResponseField>
<ResponseField name="data.pagination" type="object">`returned`, `max_results`, `pages_scraped`, `has_more`.</ResponseField>
<ResponseField name="meta.resolved_search_url" type="string">Constructed or echoed search URL.</ResponseField>

<RequestExample>
  ```bash Filters theme={null}
  curl -X POST https://api.up2data.ai/v1/search/companies \
    -H "X-API-Key: $UP2DATA_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
      "filters": {
        "keywords": "AI safety",
        "location_ids": ["103644278"],
        "company_sizes": ["51-200", "201-500"]
      },
      "max_results": 100
    }'
  ```

  ```bash Paste URL theme={null}
  curl -X POST https://api.up2data.ai/v1/search/companies \
    -H "X-API-Key: $UP2DATA_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
      "search_url": "https://www.linkedin.com/search/results/companies/?keywords=AI%20safety",
      "max_results": 100
    }'
  ```

  ```python Filters theme={null}
  resp = requests.post(
      "https://api.up2data.ai/v1/search/companies",
      headers={"X-API-Key": UP2DATA_API_KEY},
      json={
          "filters": {"keywords": "AI safety", "location_ids": ["103644278"]},
          "max_results": 100,
      },
  )
  ```

  ```python Paste URL theme={null}
  resp = requests.post(
      "https://api.up2data.ai/v1/search/companies",
      headers={"X-API-Key": UP2DATA_API_KEY},
      json={
          "search_url": "https://www.linkedin.com/search/results/companies/?keywords=AI%20safety",
          "max_results": 100,
      },
  )
  ```
</RequestExample>

**Rate limit:** counts as 1 request against your [tier limit](/rate-limits).
