---
title: "Fetch Trace"
method: GET
path: "/traces/{trace_id}"
tags: ["Traces"]
---

# Fetch Trace

`GET /traces/{trace_id}`

Fetch a single trace by `trace_id` in the canonical `Trace` shape.

Returns `{count: 1, trace}` when found and `{count: 0}` otherwise.
`trace_id` must be a 32-char hex UUID; any other format returns
`400`. The reserved path segments `query` and `ingest` return
`405` to disambiguate from the sibling query/ingest endpoints.

## Path parameters

- `trace_id` string, required

## Response `200`

Successful Response

- TraceResponse
  - `count` integer — `1` if a trace was returned, `0` otherwise.
  - `trace` TraceOutput
    - `spans` object, nullable
    - `trace_id` string, nullable

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/agenta-ai/apis/agenta-api.md) · [All operations](https://skmtc.net/agenta-ai/apis/agenta-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/agenta-ai/agenta-api/versions/2e1079696f45/schema)
