Skip to content

Opensearch Count

POST
/opensearch/count

Exact match count for one of the whitelisted mashup indices.

Same index + filters shape as /opensearch/search but returns only the count via the native OpenSearch _count API, so it is NOT capped at the 10000 track_total_hits ceiling that /search’s total saturates at. This is the right call for TAM cell-sizing.

Note: mashup_companies and mashup_contacts are the same physical, contact-grained index — a count over mashup_companies counts contact rows, not unique companies. For a unique-company total use /opensearch/aggregate with uniqExact on COMPANY_ID. Mashup counts automatically apply the organization’s deliverability policy.

Authorizations

Parameters

Header Parameters

X-Target-Org-Id
Any of:
string

Request Body required

Exact-count request. Same index + filters shape as search; the page-oriented fields (fields/sort/limit/cursor) are intentionally absent because a count returns no rows.

object
filters

Field equality filters, identical semantics to /opensearch/search. Scalar -> term, list -> terms (OR). RAW UPPERCASE field names (e.g. COMPANY_INDUSTRY, COMPANY_NAICS, COMPANY_COUNTRY).

object
key
additional properties
any
index
required

Logical index to count. Maps to a whitelisted physical alias.

string
Allowed values: mashup_contacts mashup_companies hem2contact ip2company

Responses

200

Successful Response

object
data
required
object
count
integer
index
required
string
pagination
Any of:
object
has_next
required

Whether there are more pages

boolean
limit
required

Items per page

integer
next_cursor
Any of:
string
page
required

Current page number (1-indexed)

integer
total
required

Total number of items

integer

422

Validation Error

object
detail
Array<object>
object
loc
required
Array
msg
required
string
type
required
string