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

# Find custom headcount

> Count employees at a company matching title, seniority, location, or keyword filters.

**Cost: 1 credit per successful query · pay only on success**

Count employees at a company matching title, seniority, location, or keyword filters.

<ParamField body="company_url" type="string" required>
  Company page URL.
</ParamField>

<ParamField body="filters" type="object" required>
  <Expandable title="Filter fields">
    <ParamField body="titles" type="string[]" />

    <ParamField body="seniorities" type="string[]">`owner` | `partner` | `cxo` | `vp` | `director` | `manager` | `senior` | `entry`.</ParamField>

    <ParamField body="locations" type="string[]" />

    <ParamField body="keywords" type="string" />
  </Expandable>
</ParamField>

### Response

<ResponseField name="data" type="object">`company_url`, `count`, `filters_applied`, `scraped_at`.</ResponseField>

<RequestExample>
  ```bash cURL theme={null}
  curl -X POST https://api.up2data.ai/v1/companies/headcount \
    -H "X-API-Key: $UP2DATA_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{"company_url": "https://linkedin.com/company/anthropic", "filters": {"titles": ["Software Engineer"], "locations": ["United States"]}}'
  ```

  ```python Python theme={null}
  import requests

  resp = requests.post(
      "https://api.up2data.ai/v1/companies/headcount",
      headers={"X-API-Key": UP2DATA_API_KEY},
      json={"company_url": "https://linkedin.com/company/anthropic", "filters": {"titles": ["Software Engineer"], "locations": ["United States"]}},
  )
  data = resp.json()["data"]
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
    "data": {
      "company_url": "https://linkedin.com/company/anthropic",
      "count": 142,
      "filters_applied": {"titles": ["Software Engineer"], "locations": ["United States"]},
      "scraped_at": "2026-07-08T12:00:00Z"
    },
    "meta": {
      "creditsUsed": 1,
      "creditsRemaining": 98419,
      "billed": true,
      "reason": "success",
      "requestId": "req_example",
      "latencyMs": 2100
    }
  }
  ```

  ```json 422 — not billed theme={null}
  {
    "error": {
      "type": "unprocessable_target",
      "message": "Target is private, deleted, or unreachable.",
      "requestId": "req_example"
    }
  }
  ```
</ResponseExample>

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