Skip to main content
Version: 2.0

Get filter attribute statistics for corpus metadata

GET 

/v2/corpora/:corpus_key/filter_attribute_stats

Returns statistics and value distributions for the filter attributes in a corpus. Use these statistics to understand the available filter values and to 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, the platform computes statistics across all filter attributes at both the 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: The platform can cache results to improve performance. The cache duration varies 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 keep data fresher.

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

Request

Responses

Successfully retrieved filter attribute statistics for the corpus.