---
title: "Get top values for a specific span attribute key."
method: GET
path: "/api/traces/span-attribute-values/"
tags: ["api"]
---

# Get top values for a specific span attribute key.

`GET /api/traces/span-attribute-values/`

## Request

- Base URL: `http://localhost:8000`
- URL: `http://localhost:8000/api/traces/span-attribute-values/`
- Auth: one of:
  - API key in header `X-Api-Key`
  - API key in header `X-Secret-Key`

Returns the most frequent values for the given string attribute key,
with optional prefix search filtering.

GET /api/traces/span-attribute-values/?project_id=<uuid>&key=<attr_key>[&q=<search>][&limit=50]

## Query parameters

- `project_id` string, uuid, required
- `key` string, required
- `q` string
- `limit` integer

## Response `200`

OK

- SpanAttributeValuesResponse
  - `result` SpanAttributeValue[], required
    - `value` object, nullable, required: Any valid JSON value.
    - `count` integer, required
    - `type` 'string' | 'number' | 'boolean' | 'array' | 'map' | 'json'
  - `query_complete` boolean, required
  - `query_status` 'complete' | 'sampled' | 'degraded', required
  - `query_error_code` 'sample_limit' | 'read_budget_exceeded' | 'query_failed'
  - `query_window_start` string, date-time, required
  - `query_window_end` string, date-time, required

## Other responses

- `400`: Bad Request
- `404`: Not Found
- `500`: Internal Server Error
- `503`: Service Unavailable
- `default`: Default error response

---

[API](https://skmtc.dev/futureagi/apis/future-agi-management-api.md) · [All operations](https://skmtc.dev/futureagi/apis/future-agi-management-api/llms.txt) · [OpenAPI document](https://skmtc.dev/futureagi/apis/future-agi-management-api/revisions/c8684118e142?raw)
