LangChain Reference home pageLangChain ReferenceLangChain Reference
  • GitHub
  • Main Docs
Deep Agents
LangChain
LangGraph
Integrations
LangSmith
  • Overview
  • Client
  • AsyncClient
  • Run Helpers
  • Run Trees
  • Evaluation
  • Schemas
  • Utilities
  • Wrappers
  • Anonymizer
  • Testing
  • Expect API
  • Middleware
  • Pytest Plugin
  • Deployment SDK
โŒ˜I

Chat LangChain

What can I help with?

Enter to sendยทShift+Enter new line

Menu

OverviewClientAsyncClientRun HelpersRun TreesEvaluationSchemasUtilitiesWrappersAnonymizerTestingExpect APIMiddlewarePytest PluginDeployment SDK
Language
Theme
PythonlangsmithresourcessqlAsyncSqlResourcequery
Methodโ—Since v0.15

query

Copy
query(
  self,
  *,
  project_ids: SequenceNotStr[str],
  query: str,
  extra_headers
View source on GitHub
:
Headers
|
None
=
None
,
extra_query
:
Query
|
None
=
None
,
extra_body
:
Body
|
None
=
None
,
timeout
:
float
|
httpx
.
Timeout
|
None
|
NotGiven
=
not_given
)
->
SqlQueryResponse

Parameters

NameTypeDescription
project_ids*SequenceNotStr[str]

ProjectIDs are the tracing projects the query can read.

query*str

Query is a single read-only SQL statement. Queries over runs need a start_time lower bound.

extra_headersHeaders | None
Default:None

Send extra headers

extra_queryQuery | None
Default:None
extra_bodyBody | None
Default:None
timeoutfloat | httpx.Timeout | None | NotGiven
Default:not_given

Beta: This endpoint is in active development and may change without notice.

GET with body payload โ€” no resources created. Returns the rows matching the read-only SQL query passed as the request payload, limited to the given tracing projects. Results are limited to a configured number of rows, 1000 by default.

Add additional query parameters to the request

Add additional JSON properties to the request

Override the client-level default timeout for this request, in seconds