API Reference›Results
API Reference

Results

Read saved query results. Each query saves its result in the background. A result is pending or processing, then ready or failed.

List results

GET/v1/results

List saved query results in the database named by the X-Database-Id header, newest first.

Query parameters

NameTypeDescription
limitintegerResults to return. Default 100, maximum 1000.
offsetintegerNumber of results to skip. Default 0.

Headers

NameTypeDescription
X-Database-Id (required)stringDatabase ID. Required.

Response 200 — List of results

NameTypeDescription
count (required)integerNumber of results returned in this response
has_more (required)booleanWhether there are more results available after this page
limit (required)integerLimit used for this request
offset (required)integerPagination offset used for this request
results (required)ResultInfo[]
Fields of results
NameTypeDescription
results[].created_at (required)string
results[].error_messagestring
results[].id (required)string
results[].status (required)string
Example response
{
  "count": 0,
  "has_more": true,
  "limit": 0,
  "offset": 0,
  "results": [
    {
      "created_at": "2026-01-01T00:00:00Z",
      "error_message": "string",
      "id": "string",
      "status": "string"
    }
  ]
}

Errors

StatusDescription
400Missing or malformed X-Database-Id header
404Database not found

Get result

GET/v1/results/{id}

Get a saved query result by ID. Send the X-Database-Id header of the database it belongs to. Choose the format with ?format= (json, arrow, csv, md or parquet) or the Accept header. ?format= wins; an unknown value is ignored.

Result statusResponse
ready200 with the rows in the chosen format
pending or processing202 with a Retry-After header. Poll again.
failed409 with error_message

Use offset and limit to read part of the result. When more rows follow, a Link header with rel="next" points to the next page. Rows have no guaranteed order, so paging is not a reliable way to read a whole result. Parquet ignores offset and limit and returns the whole file.

JSON responses have a size limit: a result too large to return as JSON gets 413 RESULT_TOO_LARGE. Arrow, CSV, Markdown and Parquet stream with no size limit, so use them for large results. All formats except Parquet carry X-Total-Row-Count, the row count of the whole result.

JSON, CSV and Markdown write NaN and ±Inf as null or an empty cell. Arrow and Parquet keep the original values.

Path parameters

NameTypeDescription
id (required)stringResult ID

Query parameters

NameTypeDescription
offsetintegerRows to skip. Default 0.
limitintegerMaximum rows to return. Default: all rows.
formatResultsFormatQueryjson, arrow, csv, md (or markdown) or parquet. Overrides the Accept header.

Headers

NameTypeDescription
X-Database-Id (required)stringID of the database the result belongs to. Required.

Response 200 — The result rows. JSON returns GetResultResponse. Arrow returns an IPC stream. CSV uses LF line endings and double-quote escaping. Markdown returns one pipe table. Parquet returns the stored file. q= values in Accept are ignored; use ?format= to choose.

NameTypeDescription
columnsstring[]Column names, in order. Present when status is ready.
error_messagestringWhy the result failed. Present only when status is failed.
nullableboolean[]Whether each column, in the same order as columns, can hold nulls.
result_id (required)string
row_countintegerNumber of rows in this response.
rowsany[][]Result rows. Each row is an array of values in column order.
status (required)stringpending, processing, ready or failed.
total_row_countintegerNumber of rows in the full result, ignoring offset and limit. If row_count is smaller, more rows are available on later pages.
Example response
{
  "columns": [
    "string"
  ],
  "error_message": "string",
  "nullable": [
    true
  ],
  "result_id": "string",
  "row_count": 0,
  "rows": [
    [
      null
    ]
  ],
  "status": "string",
  "total_row_count": 0
}

Response 202 — The result is not ready yet. Poll the same URL.

NameTypeDescription
columnsstring[]Column names, in order. Present when status is ready.
error_messagestringWhy the result failed. Present only when status is failed.
nullableboolean[]Whether each column, in the same order as columns, can hold nulls.
result_id (required)string
row_countintegerNumber of rows in this response.
rowsany[][]Result rows. Each row is an array of values in column order.
status (required)stringpending, processing, ready or failed.
total_row_countintegerNumber of rows in the full result, ignoring offset and limit. If row_count is smaller, more rows are available on later pages.
Example response
{
  "columns": [
    "string"
  ],
  "error_message": "string",
  "nullable": [
    true
  ],
  "result_id": "string",
  "row_count": 0,
  "rows": [
    [
      null
    ]
  ],
  "status": "string",
  "total_row_count": 0
}

Errors

StatusDescription
400Invalid offset or limit
404Result not found
409The query failed. error_message says why.
413JSON only: the rows are too large to return as JSON (RESULT_TOO_LARGE). Retrying will not help. Request arrow, csv, md or parquet instead.
429JSON only: too many large JSON reads are running. Retry shortly, or use a streaming format.
503JSON only: the result's size could not be checked. Retry shortly, or use a streaming format.