Skip to main content
POST
DuckDB

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
query
string
required

The SQL query to execute. Supports all DuckDB SQL syntax.

Example:

"WITH\n src AS (\n SELECT\n *\n FROM\n read_json (\n 'https://api.tvmaze.com/search/shows?q=breaking+bad',\n auto_detect = TRUE\n )\n )\nSELECT\n src -> 'show' ->> 'name' AS show_name,\n src -> 'show' ->> 'premiered' AS premiered,\n src -> 'show' -> 'rating' ->> 'average' AS rating,\n src -> 'show' -> 'network' ->> 'name' AS network_name\nFROM\n src;"

autoSaveByHash
boolean
default:false

Automatically save query results to a table based on the query hash. If a table with the same hash exists, returns cached results instead of re-executing.

Response

Query executed successfully

success
boolean
required

Whether the query executed successfully

results
object
required

Query results with columns, column types, and rows

row_count
integer
required

Number of rows returned

execution_time
string
required

Query execution time (e.g., '991ms')

query
string
required

The original SQL query that was executed

job
object
required

Lineage job information

explainResult
object

Query execution plan explanation