v2

latestOpenAPI 3.1.0raw.githubusercontent.com2026-02-1261033.5 KB

List label values

Return the sorted list of known values for a given label name. Optionally filtered by series selectors and/or a time range.

For example, querying /api/v1/label/job/values returns all distinct values of the job label across all series.

When match[] selectors are provided, only values from series matching those selectors are returned. When start and/or end are provided, only series with samples in that time range are considered.

get/api/v1/label/{name}/values

Path parameters

namestring required

The label name to retrieve values for. Common examples include job, instance, or __name__ (which returns all metric names).

Query parameters

match[]string[]

Optional series selectors to filter which label values are returned. When provided, only values of the named label that appear on series matching at least one of these selectors are included. Multiple selectors are combined with logical OR.

startstring

Start timestamp to limit the time range considered. Only values from series with samples within [start, end] are returned. RFC 3339 or Unix seconds.

endstring

End timestamp to limit the time range considered. RFC 3339 or Unix seconds.

limitinteger

Maximum number of label values to return. A value of 0 disables the limit.

Response

Sorted list of distinct values for the given label name as strings. Returns an empty array if no series have the label.

status'success' | 'error' required
datastring[]

Alphabetically sorted list of distinct values for the given label. Returns an empty array if no series carry the label.

errorstring

Human-readable error message (present when status is error).

errorTypestring

Error category (present when status is error).