Run Nl Query

Convert a natural language request to SQL and execute it against datasets.

  • query (str): Required. Plain English description of the data you want.
  • dataset_ids (list[str]): Required. Dataset IDs to scope the query.
  • generate_only (bool): Optional. When True, return generated SQL + sqlglot validation without executing.
Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…

Converts a plain English description of the data you want into SQL and runs it against the datasets you name. Only those datasets are included in the context sent to the model.

When to use it

Use it to explore data without writing SQL. Set generate_only to true to get the generated SQL back without running it.

Required parameters

  • query (body): natural language description of the data you want.
  • dataset_ids (body): dataset IDs to scope the query. Only these datasets are included in the context sent to the model.

Optional body fields: generate_only, thumbnail_size.

Response

A successful call returns 200 OK with valid, whether the query is valid; error; data, the result rows; and sql, the generated query.

Related: Run a SQL query on datasets, List datasets, Get an image from a dataset

Body Params
string
required
length ≥ 1

Natural language description of the data you want

dataset_ids
array of strings
required
length ≥ 1

Dataset IDs to scope the query. Only these datasets are included in the context sent to the model.

Dataset Ids*
boolean
Defaults to false

When True, return the generated SQL query without executing it.

enum

Fetch and base64-embed image columns at this thumbnail size

Responses

400

Bad Request

422

Unprocessable Entity

Language
Credentials
OAuth2
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json