Skip to main content

Field Values

List distinct values for a field across documents with counts. Useful for building filter dropdowns and faceted search interfaces.

Retrieve the distinct values for a specific field across all documents in your workspace. Results are sorted by count descending, making the most common values appear first. Use this to populate filter dropdowns, build faceted search interfaces, or analyze value distributions for data quality.

GET/fields/:fieldId/values

Response

Response fields

valuesarrayArray of distinct value objects sorted by count descending.
values[].valuestringThe distinct field value.
values[].countintegerNumber of documents containing this value.
totalDistinctintegerTotal number of distinct values for this field (before limit is applied).

Response

{
  "values": [
    { "value": "Acme Corp", "count": 47 },
    { "value": "Globex Inc", "count": 23 }
  ],
  "totalDistinct": 156
}

Errors

Error responses

401unauthorizedMissing or invalid API key.
404not_foundNo field with the given fieldId exists for your workspace.
429rate_limitedToo many requests. Retry after the period indicated in the Retry-After header.

Pair this endpoint with the field autocomplete endpoint to build a two-step filter UI: first let the user select a field via GET /fields/autocomplete, then populate a dropdown with that field's distinct values from this endpoint. The totalDistinct count is useful for showing "N of M values" pagination hints.