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

# Search traces

`POST /v1/private/traces/search`

Search traces

## Request body

- TraceSearchStreamRequestPublic
  - `project_name` string
  - `project_id` string, uuid
  - `filters` TraceFilterPublic[]
    - `field` string
    - `operator` 'contains' | 'not_contains' | 'starts_with' | 'ends_with' | '=' | '!=' | '>' | '>=' | '<' | '<=' | 'is_empty' | 'is_not_empty' | 'in' | 'not_in'
    - `key` string
    - `value` string
  - `last_retrieved_id` string, uuid
  - `limit` integer — Max number of traces 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
  - `exclude` string[] — Fields to exclude from the response
  - `from_time` string, date-time — Filter traces created from this time (ISO-8601 format).
  - `to_time` string, date-time — Filter traces 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
- `401` — Unauthorized

## Changes

- **2026-07-27** `0906fc19cdba` — 3 warning
  - added the new `CUSTOM_CLASSIFIER` enum value to the `items/anyOf[#/components/schemas/Trace_Public]/guardrails_validations/items/checks/items/name` response property for the response status `200`
  - added the new `LLM_JUDGE` enum value to the `items/anyOf[#/components/schemas/Trace_Public]/guardrails_validations/items/checks/items/name` response property for the response status `200`
  - added the new `PROMPT_INJECTION` enum value to the `items/anyOf[#/components/schemas/Trace_Public]/guardrails_validations/items/checks/items/name` response property for the response status `200`
- **2026-07-02** `3144ea40dac0` — 1 warning
  - added the new `evaluator` enum value to the `items/anyOf[#/components/schemas/Trace_Public]/source` response property for the response status `200`
- …earlier changes not shown

[Full history](https://skmtc.dev/comet-ml/apis/opik-rest-api/changes/v1/private/traces/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)
