---
title: "Retrieve a Trace Item"
url: https://docs.sentry.io/api/explore/retrieve-a-trace-item/
---

# Retrieve a Trace Item | Sentry Docs

ExperimentalThis API is under active development and may change.

GET /api/0/projects/{organization\_id\_or\_slug}/{project\_id\_or\_slug}/trace-items/{item\_id}/

Retrieve a span, log or other trace item of a project, with all of its attributes.

Pass the `meta.routingHint` of the events response that listed the item as `routing_hint`, unchanged. An invalid hint returns 400.

### Path Parameters

* `organization_id_or_slug` *(string)*

  REQUIRED

  The ID or slug of the organization the resource belongs to.

* `project_id_or_slug` *(string)*

  REQUIRED

  The ID or slug of the project the resource belongs to. Project slugs are unique within each organization.

* `item_id` *(string)*

  REQUIRED

  The hexadecimal ID of the item: the 16-character span ID for a span, or the 32-character item ID for other item types

### Query Parameters:

* `trace_id` *(string)*

  REQUIRED

  The 32-character ID of the trace the item belongs to

* `item_type` *(string)*

  REQUIRED

  **choices**:

  * `attachments
    logs
    occurrences
    preprod
    processing_errors
    profile_functions
    spans
    tracemetrics
    uptime_results`

  The type of the item

* `routing_hint` *(string)*

  The opaque `meta.routingHint` of the events response that contained the item. Pass it unchanged to look the item up in the same storage. When it's omitted or empty, the default storage is used

* `timestamp` *(string)*

  When the item happened, as an ISO 8601 timestamp or Unix seconds. The lookup is narrowed to a few minutes around it, which makes it faster

* `statsPeriod` *(string)*

  The period of time for the query, will override the start & end parameters, a number followed by one of:

  * `d` for days
  * `h` for hours
  * `m` for minutes
  * `s` for seconds
  * `w` for weeks

  For example, `24h`, to mean query data starting from 24 hours ago to now.

* `start` *(string)*

  The start of the period of time for the query, expected in ISO-8601 format. For example, `2001-12-14T12:34:56.7890`.

* `end` *(string)*

  The end of the period of time for the query, expected in ISO-8601 format. For example, `2001-12-14T12:34:56.7890`.

### Scopes

You need to [authenticate via bearer auth token.](https://docs.sentry.io/api/auth.md)

`<auth_token>` requires one of the following scopes:

* `project:admin`
* `project:read`
* `project:write`

```
curl https://sentry.io/api/0/projects/{organization_id_or_slug}/{project_id_or_slug}/trace-items/{item_id}/ \
 -H 'Authorization: Bearer <auth_token>'
```

RESPONSESCHEMA

```
Copied
{
  "itemId": "8873a98879faf06d",
  "timestamp": "2025-01-01T12:00:00Z",
  "attributes": [
    {
      "name": "is_transaction",
      "type": "bool",
      "value": true
    },
    {
      "name": "span.duration",
      "type": "float",
      "value": 132.5
    },
    {
      "name": "project_id",
      "type": "int",
      "value": "4505281256090153"
    },
    {
      "name": "span.op",
      "type": "str",
      "value": "http.server"
    },
    {
      "name": "transaction",
      "type": "str",
      "value": "GET /api/checkout/"
    }
  ],
  "meta": {},
  "links": [
    {
      "itemId": "e3c58cb0bd2d4c89",
      "traceId": "d099bf9ad5a143cf8f83a98081d0ed3b",
      "sampled": true,
      "attributes": [
        {
          "name": "sentry.link.type",
          "value": "previous_trace",
          "type": "str"
        }
      ]
    }
  ]
}
```

---

Find other pages: [Sitemap](https://docs.sentry.io/sitemap.md) lists every page with a one-line summary, and [llms.txt](https://docs.sentry.io/llms.txt) gives an overview with guidance for agents.
