---
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

## Changes

- **2026-06-30** `20a1a33446d1` — 2 info
  - added the optional property `items/anyOf[#/components/schemas/TraceThread]/feedback_scores/items/value_by_author/additionalProperties/author` to the response with the `200` status
  - added the optional property `items/anyOf[#/components/schemas/TraceThread]/feedback_scores/items/value_by_author/additionalProperties/source_queue_id` to the response with the `200` status
- **2026-06-19** `580e3bc69e8a` — 2 info
  - added the optional property `items/anyOf[#/components/schemas/TraceThread]/comments/items/source_queue_id` to the response with the `200` status
  - added the optional property `items/anyOf[#/components/schemas/TraceThread]/feedback_scores/items/source_queue_id` to the response with the `200` status
- **2026-05-08** `b9100cf75dd3` — 3 info
  - added the new `in` enum value to the request property `filters/items/operator`
  - added the new `not_in` enum value to the request property `filters/items/operator`
  - added the optional property `items/anyOf[#/components/schemas/TraceThread]/environment` to the response with the `200` status
- …earlier changes not shown

[Full history](https://skmtc.dev/comet-ml/apis/opik-rest-api/changes/v1/private/traces/threads/search/post.md)

---

[API](https://skmtc.dev/comet-ml/apis/opik-rest-api.md) · [All operations](https://skmtc.dev/comet-ml/apis/opik-rest-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/comet-ml/opik-rest-api/revisions/1a1bcfd67f99/schema)
