> For the complete documentation index, see [llms.txt](/llms.txt).
> A full single-fetch corpus is available at [llms-full.txt](/llms-full.txt).
---
title: "Get a trace"
description: "Fetch every span recorded for a single trace."
method: "GET"
endpoint: "/api/v1/traces/:traceId"
order: 5
last_verified: 2026-07-27
---



`GET /api/v1/traces/:traceId`

Fetch every span recorded for a single trace.


  ### Path parameters

  - `traceId` _string_ **required** — The trace ID, as recorded on the run summary or a log line's trace_id field.



  ### Response

  ```json {{ title: 'Response' }}
  {
    "trace_id": "4f6a2e1b8c9d7f3a5e2b1c4d6a8f9e0b",
    "spans": [
      {
        "trace_id": "4f6a2e1b8c9d7f3a5e2b1c4d6a8f9e0b",
        "span_id": "a1b2c3d4e5f60718",
        "parent_span_id": "",
        "service": "invoice-processor-worker",
        "name": "process_invoice.extract_fields",
        "kind": 0,
        "start_ns": 1753612801123000000,
        "end_ns": 1753612801823000000,
        "status_code": 0,
        "status_msg": ""
      }
    ]
  }
  ```

  A trace ID with no matching spans still returns `200` with an empty `spans` array — it is not treated as a `404`.



