---
title: "Get Label Distribution"
method: GET
path: "/v1/analytics/taxonomies/{taxonomy_id}/labels"
tags: ["Analytics", "Analytics - Taxonomies"]
---

# Get Label Distribution

`GET /v1/analytics/taxonomies/{taxonomy_id}/labels`

## Request

- Base URL: `https://api.mixpeek.com`
- URL: `https://api.mixpeek.com/v1/analytics/taxonomies/{taxonomy_id}/labels`
- Auth: HTTP bearer and API key in header `X-Namespace`

Get label distribution.

Analyzes label usage including:
- Top labels by assignment count
- Label popularity percentages
- Confidence by label

**Use Cases:**
- Understand label usage
- Identify most common categories
- Balance taxonomy coverage

## Path parameters

- `taxonomy_id` string, required

## Query parameters

- `hours` integer
- `limit` integer

## Response `200`

Successful Response

- LabelDistributionResponse: Taxonomy label distribution response.
  - `taxonomy_id` string, required
  - `labels` LabelMetric[], required
    - `label` string, required
    - `count` integer, required
    - `percentage` number, required
    - `avg_confidence` number, required
  - `total_labels` integer, required: Distinct labels that received at least one assignment in the window. This is the TRUE count and is not capped by `limit`; it used to be len(labels), i.e. the page size. Note it counts labels SEEN, so it is not the taxonomy's label vocabulary and cannot tell you which nodes are empty.
  - `labels_returned` integer: How many labels this page actually carries. Lower than `total_labels` means the response is truncated by `limit`.
  - `total_assignments` integer: Assignments across ALL labels in the window, uncapped. Each `LabelMetric.percentage` is computed against this, so the percentages are shares of the whole rather than of the page.
  - `truncated` boolean: True when labels were dropped by `limit`.

## Other responses

- `400`: Bad Request
- `401`: Unauthorized
- `403`: Forbidden
- `404`: Not Found
- `422`: Unprocessable Entity
- `429`: Too Many Requests
- `500`: Internal Server Error
- `503`: Service Unavailable

## Changes

- **2026-10-09** `61a175e8eb9a`: 1 warning, 5 info
  - removed the optional property `detail` from the response with the `422` status
  - added the non-success response with the status `429`
  - added the non-success response with the status `503`
  - added the optional property `success` to the response with the `422` status
  - …2 more
- **2026-08-27** `7dc0581791b2`: 3 info
  - added the optional property `labels_returned` to the response with the `200` status
  - added the optional property `total_assignments` to the response with the `200` status
  - added the optional property `truncated` to the response with the `200` status
- **2026-08-09** `5d4c905106b4`: 1 info
  - the endpoint scheme security `BearerAuth AND NamespaceHeader` was added to the API

[Operation history](https://skmtc.dev/mixpeek/apis/mixpeek-api/changes/v1/analytics/taxonomies/:taxonomy_id/labels/get.md)

---

[API](https://skmtc.dev/mixpeek/apis/mixpeek-api.md) - [All operations](https://skmtc.dev/mixpeek/apis/mixpeek-api/llms.txt) - [OpenAPI document](https://skmtc.dev/mixpeek/apis/mixpeek-api/revisions/790bc16455f6?raw)
