Skip to main content
POST
Query Spans

Authorizations

Galileo-API-Key
string
header
required

Path Parameters

project_id
string<uuid4>
required

Body

application/json
starting_token
integer
default:0
limit
integer
default:100
previous_last_row_id
string<uuid4> | null
log_stream_id
string<uuid4> | null

Log stream id associated with the traces.

experiment_id
string<uuid4> | null

Experiment id associated with the traces.

metrics_testing_id
string<uuid4> | null

Metrics testing id associated with the traces.

filters
(LogRecordsIDFilter · object | LogRecordsDateFilter · object | LogRecordsNumberFilter · object | LogRecordsBooleanFilter · object | LogRecordsCollectionFilter · object | LogRecordsTextFilter · object | LogRecordsFullyAnnotatedFilter · object)[]
filter_tree
FilterLeaf[Annotated[Union[LogRecordsIDFilter, LogRecordsDateFilter, LogRecordsNumberFilter, LogRecordsBooleanFilter, LogRecordsCollectionFilter, LogRecordsTextFilter, LogRecordsFullyAnnotatedFilter], FieldInfo(annotation=NoneType, required=True, discriminator='type')]] · object
sort
LogRecordsSortClause · object | null

Sort for the query. Defaults to native sort (created_at, id descending).

truncate_fields
boolean
default:false
include_counts
boolean
default:false

If True, include computed child counts (e.g., num_traces for sessions, num_spans for traces).

include_code_metric_metadata
boolean
default:false

If True, include per-row scorer metadata (the dict returned alongside the score by code-based scorers via the (score, metadata) tuple-return contract) on each MetricSuccess in the response. Off by default to keep payloads small for callers that don't need it.

Response

Successful Response

num_records
integer
required
read-only

number of records

starting_token
integer
default:0
limit
integer
default:100
paginated
boolean
default:false
next_starting_token
integer | null
last_row_id
string<uuid4> | null
records
(ExtendedTraceRecord · object | ExtendedAgentSpanRecord · object | ExtendedWorkflowSpanRecord · object | ExtendedLlmSpanRecord · object | ExtendedToolSpanRecord · object | ExtendedRetrieverSpanRecord · object | ExtendedControlSpanRecord · object | ExtendedSessionRecord · object)[]

records matching the query