Skip to main content
POST
/
v2
/
threads
/
query
Error
A valid request URL is required to generate request examples
{
  "items": [
    {
      "count": 3,
      "feedback_stats": {},
      "first_inputs": "<string>",
      "first_trace_id": "018e4c7e-a9fb-7ef0-a5b6-6ea3a82e9327",
      "last_error": "<string>",
      "last_outputs": "<string>",
      "last_trace_id": "0190a1b2-c3d4-7ef0-a5b6-6ea3a82e9328",
      "latency_p50": 0.15,
      "latency_p99": 0.42,
      "max_start_time": "2025-01-15T12:05:00.000Z",
      "min_start_time": "2025-01-15T12:00:00.000Z",
      "num_errored_turns": 1,
      "start_time": "2025-01-15T12:00:00.000Z",
      "thread_id": "018e4c7e-a9fb-7ef0-a5b6-6ea3a82e9327",
      "total_cost": 0.045,
      "total_cost_details": {},
      "total_token_details": {},
      "total_tokens": 450,
      "trace_id": "018e4c7e-a9fb-7ef0-a5b6-6ea3a82e9328"
    }
  ],
  "next_cursor": "eyJydW5zX2N1cnNvciI6Imx0KGN1cnNvciwiLi4uIikifQ=="
}

Documentation Index

Fetch the complete documentation index at: https://docs.langchain.com/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

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

Body

application/json
cursor
string

cursor is the opaque string from a previous response's next_cursor. Omit on the first request; pass the returned cursor to fetch the next page.

filter
string

filter narrows which threads are returned, using a LangSmith filter expression evaluated against each thread's root run. For example: has(tags, "production") or eq(status, "error"). See https://docs.langchain.com/langsmith/trace-query-syntax#filter-query-language for syntax.

max_start_time
string<date-time>

max_start_time is the inclusive upper bound on thread activity (RFC3339 date-time).

min_start_time
string<date-time>

min_start_time is the inclusive lower bound on thread activity (RFC3339 date-time).

page_size
integer
default:20

page_size is the maximum number of threads to return in this response. Defaults to 20 when omitted; must be between 1 and 100 inclusive when set. The response may contain fewer threads than page_size even when next_cursor is present.

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

20

project_id
string<uuid>

project_id is the tracing project UUID.

Example:

"0190a1b2-c3d4-7ef0-a5b6-6ea3a82e9328"

Response

items and pagination

items
object[]

items is the page of thread summaries, sorted by the thread's most recent activity.

next_cursor
string

next_cursor is the opaque cursor to pass as cursor on the next request. Omitted on the final page.

Example:

"eyJydW5zX2N1cnNvciI6Imx0KGN1cnNvciwiLi4uIikifQ=="