GET
/
v1
/
query
/
{query_id}
/
results
/
csv

You must pass parameter query_id.

Returns the latest execution id and results (in CSV) of that latest run, regardless of the job id/run or if it is run in the app or the api.

The query specified must either be public or a query you have ownership of (you or a team you belong to have ownership).

  • Dune internally has a maximum query result size limit (which currently is 8GB, but subject to increase in the future). If your query yields more than 8GB of data, the result will be truncated in storage. In such cases, pulling the result data (using pagination) but without specifying allow_partial_results set to true will trigger an error message: “error”: “Partial Result, please request with ‘allows_partial_results=true’”. If you wish to retrieve partial results, you can pass the parameter allow_partial_results=true. But please make sure you indeed want to fetch the truncated result.

Headers

X-DUNE-API-KEY
string
required

API Key for accessing this service

Path Parameters

query_id
integer
required

unique identifier of the query

Query Parameters

parameters
object[]

Query parameters in key-value pairs. Each parameter is an object consisting of keys such as 'key', 'type', 'value', and optionally 'enumOptions'. The API allows for partial submission of parameters. For example, if the query expects three parameters and you only pass in two, the third one will automatically use its default value as defined in the API. This feature enables you to customize the query execution according to your specific needs while providing sensible defaults for unspecified parameters.

ignore_max_datapoints_per_request
boolean

There is a default 250,000 datapoints limit to make sure you don't accidentally spend all your credits in one call. To ignore the max limit, you can add ignore_max_datapoints_per_request=true

allow_partial_results
boolean

Sometimes request results can be too large to return. By default allow_partial_results is set to false and a failed state is returned.

Response

200
text/csv
OK

The response is of type string.