Query threads
GET with body payload — no resources created. Returns the threads in a tracing project matching the query passed as the request payload. Results are filtered by the given time range and optional filters, with cursor-based pagination.
ai_search cannot be combined with sem_filter. With full AI search enabled, ai_search translates natural language into query filters and time bounds and cannot be combined with explicit filter expressions. Otherwise, ai_search retains legacy semantic-only behavior. Use sem_filter for semantic-only matching combined with structured filters. AI search requires organization consent.
When semantic matching is needed, Accept: text/event-stream is required; requests without it return 406. AI search is unavailable on deployments that route queries to the v1 backend and returns 501 there.
Self-hosted deployments require LangSmith v0.16 or later.
Body
ai_search translates natural language into structured filters, semantic criteria and time bounds.
Cannot be combined with sem_filter. With full AI search enabled, also cannot be combined with explicit filter expressions; otherwise retains legacy semantic-only behavior.
Must contain nonempty text of at most 2000 UTF-8 bytes.
1 - 2000"A conversation about a refund request"
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.
thread_filter narrows results using a LangSmith filter expression evaluated against each complete thread summary.
Self-hosted deployments require LangSmith v0.17 or later; unsupported deployments return 501.
See https://docs.langchain.com/langsmith/trace-query-syntax#filter-query-language for syntax.
"gte(turn_count, 3)"
trace_filter narrows results to threads containing at least one trace whose root run matches this LangSmith filter expression.
Trace-level aggregate fields are evaluated using the complete trace summary.
Self-hosted deployments require LangSmith v0.17 or later; unsupported deployments return 501.
See https://docs.langchain.com/langsmith/trace-query-syntax#filter-query-language for syntax.
"eq(status, \"error\")"
tree_filter narrows results to threads containing at least one trace with a matching run anywhere in its run tree.
Self-hosted deployments require LangSmith v0.17 or later; unsupported deployments return 501.
See https://docs.langchain.com/langsmith/trace-query-syntax#filter-query-language for syntax.
"has(tags, \"production\")"

