Skip to main content
GET
/
api
/
v1
/
label
/
{name}
/
values
List label values
curl --request GET \
  --url http://localhost:9090/api/v1/label/{name}/values
{
  "status": "success",
  "data": [
    "node",
    "prometheus"
  ]
}

Path Parameters

name
string
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.

start
string

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

end
string

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

limit
integer

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

Required range: x >= 0

Response

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

Response for the label values endpoint (/api/v1/label/{name}/values). On success, data contains a sorted array of distinct values for the requested label.

status
enum<string>
required
Available options:
success,
error
data
string[]

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

error
string

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

errorType
string

Error category (present when status is error).