---
title: "List label names"
method: GET
path: "/api/v1/labels"
---

# List label names

`GET /api/v1/labels`

Return the sorted list of all label names present in the database.
Optionally filtered by series selectors and/or a time range.

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

Also accepts POST with a `application/x-www-form-urlencoded` body
containing the same parameters.

## Query parameters

- `match[]` string[]
- `start` string
- `end` string
- `limit` integer

## Response `200`

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

- LabelsResponse — Response for the label names endpoint (`/api/v1/labels`). On success, `data` contains a sorted array of label name strings.
  - `status` 'success' | 'error', required
  - `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`).

## Other responses

- `400` — Bad request. A `match[]` selector is malformed or a parameter is invalid. The `errorType` will be `bad_data`.
- `500` — Internal server error. The `errorType` will be `internal`.
- `503` — Service unavailable. The `errorType` will be `unavailable`.

---

[API](https://skmtc.dev/opendata-oss/apis/opendata-timeseries-api.md) · [All operations](https://skmtc.dev/opendata-oss/apis/opendata-timeseries-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/opendata-oss/opendata-timeseries-api/revisions/6e511aad037c/schema)
