---
title: "List Logs for Traces or a Replay"
url: https://docs.sentry.io/api/explore/list-logs-for-traces-or-a-replay/
---

# List Logs for Traces or a Replay | Sentry Docs

GET /api/0/organizations/{organization\_id\_or\_slug}/trace-logs/

List the logs belonging to one or more traces, or to a replay, across all projects in the organization the caller can access. A trace can span many projects, so the `project` filter is ignored.

### Path Parameters

* `organization_id_or_slug` *(string)*

  REQUIRED

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

### Query Parameters:

* `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`.

* `traceId` *(array(string))*

  The 32-character ID of a trace to list logs for. Can be repeated. At least one `traceId` or a `replayId` is required.

* `replayId` *(string)*

  The 32-character ID of a replay to list logs for. Logs matching either a `traceId` or the `replayId` are returned.

* `query` *(string)*

  Additional [search query](https://docs.sentry.io/concepts/search.md) to filter the logs.

* `sort` *(array(string))*

  Columns to sort by, prefixed with `-` for descending. Must be one of `id`, `project.id`, `trace`, `severity_number`, `severity`, `timestamp`, `timestamp_precise`, `message`. Defaults to `-timestamp` then `-timestamp_precise`.

* `timestamp` *(string)*

  An ISO 8601 timestamp of an event in the trace. When passed, the query is narrowed to a window around this time, which is faster than searching the full time range.

* `per_page` *(integer)*

  The number of logs to return per page, up to 9999.

* `cursor` *(string)*

  A pointer to the last object fetched and its sort order; used to retrieve the next or previous results.

### Scopes

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

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

* `org:admin`
* `org:read`
* `org:write`

```
curl https://sentry.io/api/0/organizations/{organization_id_or_slug}/trace-logs/ \
 -H 'Authorization: Bearer <auth_token>'
```

RESPONSESCHEMA

```
Copied
{
  "data": [
    {
      "id": "99083e5c2ee246be1242ee264d20fd58",
      "project.id": 4505281256090153,
      "trace": "a9f3c1e2b4d5467890abcdef12345678",
      "severity_number": 9,
      "severity": "INFO",
      "timestamp": "2026-09-01T12:00:00+00:00",
      "timestamp_precise": 1756728000123000000,
      "message": "Payment processed"
    }
  ],
  "meta": {
    "fields": {
      "id": "string",
      "project.id": "string",
      "trace": "string",
      "severity_number": "integer",
      "severity": "string",
      "timestamp": "string",
      "timestamp_precise": "number",
      "message": "string"
    },
    "full_scan": true,
    "bytes_scanned": 255,
    "routingHint": "eyJ2IjogMSwgInRpZXIiOiAxfQ=="
  },
  "confidence": [
    {}
  ]
}
```

---

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.
