Skip to main content
POST
Search function logs
Returns the log lines written by the GenAI functions of an account, one entry per line, with the event label and the span the function ran in. Filter by conversation, function, level, environment, error type, whole-word text, or the exact span. The raw log line and its payload are never returned. See the overview for how lines link to spans.

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
Matches the conversation ID or the call SID.
string[]
Function (tool) names, up to 20.
string[]
debug, info, warning, error, critical.
string[]
Environments: test, sandbox, pre-release, live, scenarios. pre-release is the Staging environment.
string[]
Exception classes on failure lines, for example KeyError, up to 20.
object
Whole-word, case-insensitive terms matched on the event label: { "all": [...], "any": [...], "none": [...] }, up to 10 terms each. api request finds API request error; api req does not.
string
Trace ID of the function-execution span.
string
Span ID of the function-execution span. Returns exactly the lines that one execution wrote.
integer
0-based turn the function call belongs to. Must be an integer.
datetime
Inclusive window start. Defaults to 24 hours before to. The window may span at most 30 days.
datetime
Exclusive window end. Defaults to now. The response echoes the value used; pass it back when paging so new lines do not shift the pages.
string
default:"desc"
desc (newest first) or asc.
integer
default:"50"
Lines per page, 1–100.
integer
default:"0"
Lines to skip, 0–1000.

Response

object[]
One entry per log line.
datetime
Window start actually used.
datetime
Window end actually used.
integer
integer
boolean

Examples

Errors from one function in the last 24 hours

Everything one execution wrote

Take span_id from a search result, or from a span search, and pass it back:
Request

Uncaught exceptions in a conversation

Request

Errors

Last modified on November 10, 2026