Skip to main content
POST
Run a LangWatchQL query

Authorizations

X-Auth-Token
string
header
required

Project API key for sending traces and accessing project-scoped resources. Format: sk-lw-... (no underscore). Obtain one by creating a project via the Admin API or the LangWatch UI.

Body

application/json
sql
string
required
Required string length: 1 - 50000
parameters
object
timeWindow
object
granularitySeconds
projectId
string

Narrows the run to this one project, which the key must hold analytics:view on. Without it the run spans every project the key can read.

Minimum string length: 1

Response

The query ran. Columns, rows, execution statistics and diagnostics, scoped to the projects the key can read, or to the one project projectId names.

columns
object[]
required
read-only
rows
object[]
required
read-only
statistics
object
required
diagnostics
object[]
required
read-only
followsTimeWindow
boolean
required
followsGranularity
boolean
required
granularitySeconds
number
coarsenedFromSeconds
number
completeness
object
Last modified on August 31, 2026