---
title: "Count Company Search Variants"
method: POST
path: "/search/companies/count-variants"
tags: ["Search"]
---

# Count Company Search Variants

`POST /search/companies/count-variants`

## Request

- Base URL: `https://be.graph8.com/api/v1`
- URL: `https://be.graph8.com/api/v1/search/companies/count-variants`
- Auth: HTTP bearer

How many companies each filter set matches: the zero-results "without this filter" counts. No rows, no credits.

## Headers

- `Authorization` string, nullable
- `X-Target-Org-Id` string, nullable

## Request body

- SearchCountVariantsRequest: Count how many records several filter sets match. Nothing is returned but counts.
  - `variants` SearchCountVariant[], required: Any number is accepted: the first 16 are counted and the keys of the rest come back in `skipped`.
    - `key` string, required: Your name for this variant, e.g. the chip left out.
    - `filters` SearchFilter[]: The filter conditions (AND logic).
      - `field` string, required: Field name to filter on (e.g., 'job_title', 'country', 'industry')
      - `operator` 'any_of' | 'contains' | 'all_of' | 'none_of' | 'is_empty' | 'is_not_empty' | 'between' | 'exists', required: Supported filter operators for search queries.
      - `value` unknown[]: Filter values
        - unknown

## Response `200`

Successful Response

- ApiResponseSearchCountVariantsPayload
  - `data` SearchCountVariantsPayload, required: Match counts per variant key.
    - `counts` object, required: Variant key to match count; null when it failed or timed out.
    - `at_least` string[]: Keys whose count is a lower bound (show `10,000+`).
    - `skipped` string[]: Keys not counted: over the variant, condition or value limit.
  - `pagination` PaginationMeta
    - `page` integer, required: Current page number (1-indexed)
    - `limit` integer, required: Items per page
    - `total` integer, required: Total number of items
    - `has_next` boolean, required: Whether there are more pages
    - `next_cursor` string, nullable: Opaque cursor for the next page; null when there are no more items. Pass it back as the `cursor` query param to fetch the following page without computing page numbers.
    - `total_available` integer, nullable: Search endpoints only: how many records really match, when known. Can be larger than `total`, which is capped at the 10,000 results that can be paged. For company search this is a distinct-company estimate. Null when unknown; absent outside search.
    - `total_is_lower_bound` boolean, nullable: Search endpoints only: true when more records match than `total` shows (the result set is larger than the 10,000 results that can be paged). Absent outside search.
    - `notes` string[], nullable: Search endpoints only: plain-language notes about the result, e.g. that more records match than can be paged, or that a reversed `between` range was put in order.

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/graph8/apis/graph8-developer-api.md) · [All operations](https://skmtc.dev/graph8/apis/graph8-developer-api/llms.txt) · [OpenAPI document](https://skmtc.dev/graph8/apis/graph8-developer-api/revisions/2e7cfa0ca921?raw)
