---
title: "Get a public trace"
method: GET
path: "/api/{unique_organization_id}/traces/{trace_unique_id}/"
tags: ["Traces"]
---

# Get a public trace

`GET /api/{unique_organization_id}/traces/{trace_unique_id}/`

## Request

- Base URL: `https://api.respan.ai`
- URL: `https://api.respan.ai/api/{unique_organization_id}/traces/{trace_unique_id}/`
- Auth: none required

The trace must first be shared via `PATCH /api/traces/{trace_unique_id}/`. No authentication is required. Metadata keys beginning with `_` are reserved for platform use and omitted from span and trace read responses.

## Path parameters

- `unique_organization_id` string, required
- `trace_unique_id` string, required

## Response `200`

Trace detail with span tree.

- object
  - `id` string: Trace identifier.
  - `trace_unique_id` string: Unique trace identifier.
  - `root_span_unique_id` string: Root span ID for the trace.
  - `unique_organization_id` string: Organization unique ID.
  - `organization_id` string: Alias of `unique_organization_id`.
  - `organization_name` string: Organization name when available.
  - `organization_key_id` string: API key identifier used to create the trace.
  - `environment` string: Environment for the trace.
  - `customer_identifier` string: Customer or user identifier.
  - `start_time` string, date-time: When the trace started.
  - `end_time` string, date-time: When the trace ended.
  - `duration` number: Total duration in seconds.
  - `span_count` integer: Total spans in the trace.
  - `llm_call_count` integer: Number of LLM-call spans.
  - `total_cost` number: Total cost in USD.
  - `total_prompt_tokens` integer: Sum of prompt tokens.
  - `total_completion_tokens` integer: Sum of completion tokens.
  - `total_tokens` integer: Sum of all tokens.
  - `error_count` integer: Number of error spans.
  - `name` string: Root span name.
  - `input` string: Root span input. API key responses may include full storage-enriched content.
  - `output` string: Root span output. API key responses may include full storage-enriched content.
  - `metadata` object: Customer metadata. Keys beginning with `_` are reserved and omitted from customer-facing responses.
  - `trace_group_identifier` string: Workflow or trace-group identifier.
  - `session_identifier` string: Session identifier when present.
  - `model` string: Primary/root model used.
  - `storage_object_key` string: Storage object key for the root span payload when present.
  - `span_tree` object[]: Hierarchical span tree for the trace.
    - `id` string: Span identifier.
    - `unique_id` string: Underlying log unique ID.
    - `span_unique_id` string: Unique span identifier within the trace.
    - `span_name` string: Span name.
    - `span_parent_id` string, nullable: Parent span ID.
    - `trace_unique_id` string: Trace ID.
    - `customer_identifier` string: Customer identifier.
    - `thread_identifier` string: Thread identifier when present.
    - `session_identifier` string: Session identifier when present.
    - `organization_key_id` string: API key identifier.
    - `organization_id` string: Organization unique ID.
    - `environment` string: Environment.
    - `log_type` string: Span/log type.
    - `timestamp` string, date-time: Span end time.
    - `start_time` string, date-time: Span start time.
    - `end_time` string, date-time: Alias of `timestamp`.
    - `prompt_tokens` integer: Prompt tokens for this span.
    - `completion_tokens` integer: Completion tokens for this span.
    - `total_request_tokens` integer: Total tokens for this span.
    - `cost` number: Span cost in USD.
    - `model` string: Model used by the span.
    - `latency` number: Span duration in seconds.
    - `status_code` integer: Status code recorded for the span.
    - `status` string: Span status.
    - `input` string: Span input.
    - `output` string: Span output.
    - `metadata` object: Customer metadata. Keys beginning with `_` are reserved and omitted from customer-facing responses.
    - `span_links` string: Serialized OTEL span links when present.
    - `storage_object_key` string: Backing storage object key when present.
    - `span_workflow_name` string: Workflow name when present.
    - `children` object[]: Nested child spans.

## Other responses

- `404`: Not Found
- `429`: Rate Limited

## Changes

- **2026-10-21** `c30bcb383ee8`: 5 breaking, 3 info
  - the response property `span_tree/items/span_parent_id` became nullable for the status `200`
  - the `duration` response's property format changed from `double` to no format for status `200`
  - the `span_tree/items/cost` response's property format changed from `double` to no format for status `200`
  - the `span_tree/items/latency` response's property format changed from `double` to no format for status `200`
  - …4 more
- **2026-09-12** `22b868ef3f22`: 1 info
  - api operation id `retrieve-public-trace` removed and replaced with `traces_retrievePublicTrace`

[Operation history](https://skmtc.dev/respan/apis/respan-api/changes/api/:unique_organization_id/traces/:trace_unique_id/get.md)

---

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