Get aggregation values

Returns the distinct values available in the index for a given aggregation definition, grouped by language. Useful for previewing and configuring value-sorting in filters.

Requires the aggregation:values:read or search.read permission.

Request

POST /aggregation/values

Headers

HeaderValue
AuthorizationBearer <token>
Content-Typeapplication/json

Request Body

Provide an aggregation definition object. The key fields used to fetch values are:

FieldTypeRequiredDescription
fieldstringYesThe index field name to aggregate on (e.g. "manufacturer").
typestringYesThe aggregation type (e.g. "list", "range").
activebooleanNoWhether to treat this as an active aggregation. Defaults to false.
sortingstringNoValue sorting strategy (e.g. "count", "alphabetical"). Defaults to "count".

Example Request

{
  "field": "manufacturer",
  "type": "list",
  "sorting": "count"
}

Response

Returns an object keyed by language code, each containing an array of value/position pairs.

Response Body

{
  "de": [
    { "value": "Nike", "position": 1 },
    { "value": "Adidas", "position": 2 }
  ],
  "en": [
    { "value": "Nike", "position": 1 },
    { "value": "Adidas", "position": 2 }
  ]
}