Skip to main content
GET
/
api
/
v1
/
labels
List label names
curl --request GET \
  --url http://localhost:9090/api/v1/labels
{
  "status": "success",
  "data": [
    "__name__",
    "instance",
    "job"
  ]
}

Query Parameters

match[]
string[]

Optional series selectors to filter which label names are returned. When provided, only label names 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 label names 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 names to return. A value of 0 disables the limit.

Required range: x >= 0

Response

Sorted list of label names as strings. Always includes built-in labels like __name__ if any metric data exists.

Response for the label names endpoint (/api/v1/labels). On success, data contains a sorted array of label name strings.

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

Alphabetically sorted list of label names. Includes built-in labels like __name__ if any metric data exists.

error
string

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

errorType
string

Error category (present when status is error).