Skip to main content
POST
Search spans
Searches spans across all conversations of the account or one agent. Use it to find the slowest or failing operations of a given kind, then open the conversation they belong to. For counts and percentiles use aggregate spans instead.

Request

Headers

string
required
Account API key with read access to conversations.

Body

string
Restrict to one agent. Omit to search the whole account.
string
Exact span name, for example polyai.llm_gateway.provider_call.
string
Restrict to one conversation.
string
Ok, Error or Unset.
integer
Only spans at least this long, 0–86,400,000.
datetime
Inclusive lower bound on span start.
datetime
Exclusive upper bound on span start.
integer
default:"20"
Spans per page, 1–100.
integer
default:"0"
Spans to skip, 0–1000.

Response

object[]
Same fields as in get conversation spans, newest first.
integer
integer
boolean

Example

Failed LLM calls slower than one second

Errors

Last modified on November 10, 2026