Skip to main content
POST
Count facets

Authorizations

Authorization
string
header
required

API key, not necessarily a JWT. Server derives Organization, permitted actions and Corpus scope; every resource access is authorized.

Body

application/json
corpus_ids
string[]
required
Required array length: 1 - 16 elements
Minimum string length: 1
fields
object[]
required

Distinct logical metadata field names, in response order.

Required array length: 1 - 16 elements
filter
object

Candidate filter applied before ranking. Every present condition must hold. A requested Corpus served by a Projection Generation built before source filtering existed returns 422 source_filter_unavailable; rebuild that Corpus once (rebuildCorpusProjection) to enable it. Unfiltered search is unaffected.

accepted_after
string<date-time>

Inclusive current-Version acceptance-time lower bound, as in listing.

accepted_before
string<date-time>

Exclusive current-Version acceptance-time upper bound, as in listing.

accuracy
enum<string>

Absent or exact counts every current document now. fast is best effort: Quivr may answer sooner, usually within a few seconds, from stored snapshots (as_of), a uniform sample (approximate), or an exact count that ended within about a second (neither marker). The 25-second request deadline still applies.

Available options:
exact,
fast

Response

Bounded document counts and excluded Corpus explanations.

items
object[]
required
Maximum array length: 16
excluded_corpora
object[]
Maximum array length: 16
as_of
string<date-time>

Fast requests only. Counts come from stored per-Corpus snapshots, each exact when it was taken; this is the oldest snapshot's time. Changes since a Corpus's snapshot are missing from its counts, and newer snapshots of other Corpora include their later changes.

approximate
boolean

Fast requests only; present and true when counts are estimates scaled from a uniform sample of Records.

sample_fraction
number<double>

Share of the Corpora's Records counted when approximate.