Skip to main content
Version: 2.0

Get filter attribute statistics for corpus metadata

GET 

/v2/corpora/:corpus_key/filter_attribute_stats

Retrieve statistics and value distributions for filter attributes in a corpus. This endpoint provides insights into the metadata structure and content distribution, enabling users to understand available filter values and build effective metadata queries.

This endpoint analyzes document and part metadata fields defined as filter attributes and returns:

  • Value distributions: Top occurring values with their counts
  • Statistics: Min, max, average, and sum for numeric fields

By default, statistics are computed across all filter attributes at both document and part levels. You can optionally:

  • Request statistics for specific fields only
  • Apply metadata filters to analyze a subset of the corpus
  • Limit the number of distinct values returned per field

Performance and Caching: Results may be cached for improved performance, with cache duration varying by corpus size. Cached results can take up to 1 hour to refresh for large corpora. Smaller corpora with faster query times have shorter cache durations (2-15 minutes) to ensure fresher data.

The corpus_key uniquely identifies the corpus. For more information, see Create a corpus.

Request

Responses

Successfully retrieved filter attribute statistics for the corpus.