Skip to main content
The sortFacetValuesBy parameter controls the order in which facet values are returned for each facet in the response.
This affects data returned by the facets parameter, but not how values are displayed in the UI.
To customize display order, see Facet value display.

Options

Sort facet values by descending count (most frequent values first). The count is the number of records matching the query with that facet value. This is the default.
Sort facet values alphabetically, from A to Z.

Usage

To control how many facet values are returned, see maxValuesPerFacet.

Examples

Set default sort order for facet values

Current API clients

Change sort order for facet values at query time

Current API clients

Last modified on May 19, 2026