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
- 200
- 400
- 403
- 404
Successfully retrieved filter attribute statistics for the corpus.
Invalid parameters, or the corpus does not support filter attribute statistics.
Permissions do not allow retrieving filter attribute statistics for this corpus.
Corpus not found.