POST
/
v1
/
query
/
{query_id}
/
execute
curl -X POST "https://api.dune.com/api/v1/query/{{query_id}}/execute"   \
  -H "X-Dune-API-Key: {{api_key}}"                                       \
  -H "Content-Type: application/json"                                   \
  -d '{"query_parameters": {"param1":24}, "performance": "large"}'
{
  "execution_id": "01HKZJ2683PHF9Q9PHHQ8FW4Q1",
  "state": "QUERY_STATE_PENDING"
}

If the query has parameters and you don’t add them in your API call, it will just run with the default params. You may add query parameters as part of the POST params data.

You can choose to include a performance parameter, by default it will use the “medium” performance tier which consumes 10 credits. “large” will use 20 credits and are faster.

Returns an execution_id associated with the triggered query execution and the state of the execution.

curl -X POST "https://api.dune.com/api/v1/query/{{query_id}}/execute"   \
  -H "X-Dune-API-Key: {{api_key}}"                                       \
  -H "Content-Type: application/json"                                   \
  -d '{"query_parameters": {"param1":24}, "performance": "large"}'

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.

performance
enum<string>[]

Defines the engine the execution will be run on. Can be either medium or large tier. Medium consumes 10 credits per run and large consumes 20 credits per run. By default performance is medium.

Available options:
medium,
large

Response

200
application/json
OK

The response is of type object.