# List trace spans

```http
GET /projects/{project_reference}/traces/{trace_id}/spans
```

List trace spans. Requires project.logs.read.

## Parameters

| Name                | In    | Required | Description                                                    |
| ------------------- | ----- | -------- | -------------------------------------------------------------- |
| `project_reference` | path  | Yes      |                                                                |
| `trace_id`          | path  | Yes      |                                                                |
| `cursor`            | query |          | Opaque continuation from page\_info.next or page\_info.prev.   |
| `limit`             | query |          | Max spans to return (default: 200, max: 1000).                 |
| `status`            | query |          | Optional span status filter. Use ok, error, unset, or unknown. |
| `sort_order`        | query |          | Order by span start time. Defaults to "asc".                   |

## Responses

| Status | Description                                                                                                                    |
| ------ | ------------------------------------------------------------------------------------------------------------------------------ |
| 200    | Project-visible spans of the trace ordered by start time; page with the cursor. Set status=error to retrieve every error span. |
| 400    | Bad request                                                                                                                    |
| 401    | Unauthorized                                                                                                                   |
| 403    | Forbidden                                                                                                                      |
| 404    | Not found                                                                                                                      |
| 429    | Rate limit exceeded                                                                                                            |
| 502    | Bad gateway                                                                                                                    |
| 503    | Service unavailable                                                                                                            |
