Skip to main content
POST
Error

Authorizations

X-API-Key
string
header
required
X-Tenant-Id
string
header
required

Headers

Content-Type
string

application/json (required for JSON body)

Body

application/json
cursor
string

cursor is the opaque string returned in a previous response's next_cursor.

max_start_time
string<date-time>

max_start_time is the exclusive upper bound for the root-run start time scan (RFC3339). Defaults to the request time when omitted.

Example:

"2024-12-31T23:59:59Z"

min_start_time
string<date-time>

min_start_time is the inclusive lower bound for the root-run start time scan (RFC3339). Defaults to 24 hours before the request when omitted.

Example:

"2024-01-01T00:00:00Z"

page_size
integer
default:20

page_size is the maximum number of traces to return per page. Defaults to 20; must be between 1 and 100 when set.

Required range: 1 <= x <= 100
Example:

20

project_id
string<uuid>

project_id is the UUID of the tracing project that owns the traces. Required.

Example:

"018e4c7e-a9fb-7ef0-a5b6-6ea3a82e9327"

selects
enum<string>[]

selects lists which properties to include on each returned trace. Properties listed here are routed to the appropriate sub-object on each item: total_tokens, total_cost, and first_token_time appear under trace_aggregates; everything else appears under root_run. If omitted, only id is returned on root_run.

Available options:
ID,
NAME,
RUN_TYPE,
STATUS,
START_TIME,
END_TIME,
LATENCY_SECONDS,
FIRST_TOKEN_TIME,
ERROR,
ERROR_PREVIEW,
EXTRA,
METADATA,
EVENTS,
INPUTS,
INPUTS_PREVIEW,
OUTPUTS,
OUTPUTS_PREVIEW,
MANIFEST,
PARENT_RUN_IDS,
PROJECT_ID,
TRACE_ID,
THREAD_ID,
DOTTED_ORDER,
IS_ROOT,
REFERENCE_EXAMPLE_ID,
REFERENCE_DATASET_ID,
TOTAL_TOKENS,
PROMPT_TOKENS,
COMPLETION_TOKENS,
TOTAL_COST,
PROMPT_COST,
COMPLETION_COST,
PROMPT_TOKEN_DETAILS,
COMPLETION_TOKEN_DETAILS,
PROMPT_COST_DETAILS,
COMPLETION_COST_DETAILS,
PRICE_MODEL_ID,
TAGS,
APP_PATH,
ATTACHMENTS,
THREAD_EVALUATION_TIME,
IS_IN_DATASET,
SHARE_URL,
FEEDBACK_STATS
Example:
trace_filter
string

trace_filter narrows results to traces whose root run matches this LangSmith filter expression. This filter targets root runs only — is_root = true is implied. See https://docs.langchain.com/langsmith/trace-query-syntax#filter-query-language for syntax.

Example:

"eq(status, \"error\")"

trace_ids
string<uuid>[]

trace_ids is an optional fast-path restriction to a known set of trace UUIDs. Equivalent in result to including each UUID in a trace_filter, but more efficient at scale.

tree_filter
string

tree_filter narrows results to traces containing at least one run anywhere in the run tree (root or descendant) that matches this LangSmith filter expression.

Example:

"has(tags, \"production\")"

Response

OK

items
object[]

items is the page of traces.

next_cursor
string

next_cursor is the opaque cursor for the next page. Null on the final page.