For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Copy to LLMGithubGo to App
DocumentationIntegrationsAgent OptimizationSelf-hosting OpikSDK & API referenceOpik University
DocumentationIntegrationsAgent OptimizationSelf-hosting OpikSDK & API referenceOpik University
    • Overview
  • Python SDK
    • Reference
    • REST API Client
  • Typescript SDK
    • Overview
    • Opik TS
    • Prompts
    • Opik Query Language (OQL)
  • Rest API
    • Overview
        • POSTAdd span comment
        • PUTAdd span feedback score
        • POSTCreate spans
        • PATCHBatch update spans
        • GETGet spans by project_name or project_id and optionally by trace_id and/or type
        • POSTCreate span
        • GETGet span by id
        • DELDelete span by id
        • PATCHUpdate span by id
        • POSTDelete span comments
        • POSTDelete span feedback score
        • GETFind Feedback Score names
        • GETGet span comment
        • GETGet span stats
        • PUTBatch feedback scoring for spans
        • POSTSearch spans
        • PATCHUpdate span comment by id
LogoLogo
Copy to LLMGithubGo to App
Rest APIAPI ReferenceSpans

Search spans

POST
/v1/private/spans/search
POST
/api/v1/private/spans/search
$curl -X POST http://localhost:5173/api/v1/private/spans/search \
> -H "Content-Type: application/json" \
> -d '{}'
200Successful
1{}
Search spans
Was this page helpful?
Previous

Update span comment by id

Next
Built with

Request

This endpoint expects an object.
trace_idstringOptionalformat: "uuid"
project_namestringOptional
project_idstringOptionalformat: "uuid"
typeenumOptional
Allowed values:
filterslist of objectsOptional
limitintegerOptional1-2000Defaults to 500
Max number of spans to be streamed
last_retrieved_idstringOptionalformat: "uuid"
truncatebooleanOptionalDefaults to true
Truncate image included in either input, output or metadata
excludelist of enumsOptional
Fields to exclude from the response
from_timedatetimeOptional

Filter spans created from this time (ISO-8601 format).

to_timedatetimeOptional

Filter spans created up to this time (ISO-8601 format). If not provided, defaults to current time. Must be after ‘from_time’.

Response

Spans stream or error during process