Retrieves a paginated list of traces matching your filters. This endpoint supports bothDocumentation Index
Fetch the complete documentation index at: https://docs.keywordsai.co/llms.txt
Use this file to discover all available pages before exploring further.
POST (recommended for complex filters) and GET for simple queries.
| Parameter | Type | Default | Description |
|---|---|---|---|
start_time | ISO 8601 | 1 hour ago | Start of time range |
end_time | ISO 8601 | Current time | End of time range |
page | integer | 1 | Page number |
page_size | integer | 50 | Results per page (max 1000) |
sort_by | string | -timestamp | Sort field (prefix - for descending) |
environment | string | All | Filter by environment |
timestamp, start_time, end_time, durationtotal_cost, total_tokens, total_prompt_tokens, total_completion_tokensspan_count, llm_call_count, error_counttrace_unique_id, customer_identifier, environmentspan_count, llm_call_count, error_counttotal_cost, total_tokens, total_prompt_tokens, total_completion_tokensduration, workflow_name (span_workflow_name)metadata__your_field| Field | Type | Description |
|---|---|---|
trace_unique_id | string | Unique trace identifier |
start_time | datetime | When the trace started |
end_time | datetime | When the trace ended |
duration | float | Total duration in seconds |
span_count | integer | Total spans in the trace |
llm_call_count | integer | Number of LLM calls |
total_prompt_tokens | integer | Sum of input tokens |
total_completion_tokens | integer | Sum of output tokens |
total_tokens | integer | Total tokens used |
total_cost | float | Total cost in USD |
error_count | integer | Number of errors |
input | object | Root span’s input (full object) |
output | object | Root span’s output (full object) |
metadata | object | Custom metadata |
customer_identifier | string | Customer/user identifier |
environment | string | Environment (e.g., production, test) |
trace_group_identifier | string | Workflow group identifier |
name | string | Root span name |
model | string | Primary model used |