---
title: "Search trace threads"
method: POST
path: "/v1/private/traces/threads/search"
tags: ["Traces"]
---

# Search trace threads

`POST /v1/private/traces/threads/search`

Search trace threads

## Request body

- TraceThreadSearchStreamRequest
  - `project_name` string
  - `project_id` string, uuid
  - `filters` TraceThreadFilter[]
    - `field` string
    - `operator` 'contains' | 'not_contains' | 'starts_with' | 'ends_with' | '=' | '!=' | '>' | '>=' | '<' | '<=' | 'is_empty' | 'is_not_empty' | 'in' | 'not_in'
    - `key` string
    - `value` string
  - `last_retrieved_thread_model_id` string, uuid
  - `limit` integer — Max number of trace thread to be streamed
  - `truncate` boolean — Truncate input, output and metadata to slim payloads
  - `strip_attachments` boolean — If true, returns attachment references like [file.png]; if false, downloads and reinjects stripped attachments
  - `from_time` string, date-time — Filter trace threads created from this time (ISO-8601 format).
  - `to_time` string, date-time — Filter trace threads created up to this time (ISO-8601 format). If not provided, defaults to current time. Must be after 'from_time'.

## Other responses

- `400` — Bad Request

---

[API](https://skmtc.net/comet-ml/apis/opik-rest-api.md) · [All operations](https://skmtc.net/comet-ml/apis/opik-rest-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/comet-ml/opik-rest-api/versions/4ed2fbc97cc3/schema)
