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

---

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