Get facet definitions and counts for building filter UIs or refining search. Facet counts are optionally computed in the context of a search query and applied filters. Facet type can be: multi-select, select, tags, and so on, as configured in search filters.
If set, returns only the facet for this field (with values and counts). If omitted, returns all configured facets.
- Mock serverhttps://redocly.com/_mock/docs/realm/customization/search-api/openapi/_search-facets
- Project serverhttps://redocly.com/_search-facets
- All facets
- One facet with query and filter
curl -i -X POST \
https://redocly.com/_mock/docs/realm/customization/search-api/openapi/_search-facets \
-H 'Content-Type: application/json' \
-d '{
"locale": "en"
}'Facet definitions with values and counts. If field is set in the request, returns an array with a single facet object; otherwise returns all configured facets.
Array [
]
Response
[ { "name": "string", "field": "string", "type": "string", "values": [ … ] } ]