---
title: "Filter experiment traces"
method: POST
path: "/api/v2/experiments/{experiment_id}/logs/list/"
tags: ["experiments"]
---

# Filter experiment traces

`POST /api/v2/experiments/{experiment_id}/logs/list/`

List experiment traces using POST-for-filtering. Supports status, cost, comparison key, timestamp, metadata, and score filters.

## Path parameters

- `experiment_id` string, required

## Query parameters

- `page` integer
- `page_size` integer
- `sort_by` string
- `start_time` string, date-time
- `end_time` string, date-time
- `detail` '1' | 'true'
- `preview_length` integer

## Headers

- `Authorization` string, required

## Request body

- object
  - `filters` ApiV2ExperimentsExperimentIdLogsListPostRequestBodyContentApplicationJsonSchemaFilters — Filter criteria using the standard Respan filter format.
  - `is_exporting` boolean — Reserved for dashboard exports.

## Response `200`

Paginated filtered list of experiment traces.

- ExperimentsListExperimentSpansResponse200
  - `count` integer, required — Total number of matching results.
  - `next` string, nullable — URL for the next page, if any.
  - `previous` string, nullable — URL for the previous page, if any.
  - `current_filters` ApiV2ExperimentsExperimentIdLogsListPostResponsesContentApplicationJsonSchemaCurrentFilters — Normalized filters applied to this request.
  - `results` ApiV2ExperimentsExperimentIdLogsListPostResponsesContentApplicationJsonSchemaResultsItems[], required
    - `id` string, required — Trace ID. Use this value as `log_id` for trace detail and wait-workflow resume routes.
    - `trace_unique_id` string — Trace unique ID.
    - `root_span_unique_id` string, nullable
    - `environment` string, nullable
    - `customer_identifier` string, nullable
    - `name` string, nullable
    - `input` unknown
    - `output` unknown
    - `expected_output` unknown
    - `status` string, nullable
    - `comparison_key` string, nullable — Stable key for comparing the same input across experiments.
    - `start_time` string, date-time, nullable
    - `end_time` string, date-time, nullable
    - `duration` number, double, nullable — Trace duration in seconds.
    - `span_count` integer, nullable
    - `llm_call_count` integer, nullable
    - `total_cost` number, double, nullable
    - `total_tokens` integer, nullable
    - `total_prompt_tokens` integer, nullable
    - `total_completion_tokens` integer, nullable
    - `error_count` integer, nullable
    - `scores` object — Scores keyed by evaluator ID or slug. Each value includes evaluator metadata and the score value field matching `score_value_type`.

## Other responses

- `400` — Bad Request
- `401` — Unauthorized - Missing or invalid authentication
- `404` — Not Found
- `413` — The query exceeded a memory or execution-time resource limit.

---

[API](https://skmtc.dev/respan/apis/api-reference.md) · [All operations](https://skmtc.dev/respan/apis/api-reference/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/respan/api-reference/revisions/764fca4d43e4/schema)
