Skip to main content
Count documents by several searches at once

Authorizations

token
string
query
required

Standard authorization for most API calls. This token identifies the logged-in user and their permissions. It is obtained either as a temporary token after a successful login or as a long-term API key.

Body

application/json

The searches to count, each under a name of the caller's choosing that its result is reported back under.

{key}
object

One search to count, in the same shape POST /search takes. Only what narrows the result set has any effect here - ordering, paging and highlighting are ignored, since no document is returned.

Response

Returns the count, and any aggregations asked for, of every search that was sent.

The results of the searches, keyed by the names they were sent under.

{key}
object

Result of one of the searches that were sent, the property name being the name it was sent under.