Execute raw SQL query

Changed on

Execute raw SQL query without requiring a stored query ID

post/v1/sql/execute

Request

  • Base URL
    https://api.dune.com/api
  • URL
    https://api.dune.com/api/v1/sql/execute
  • Auth
    none declared. Required headers: X-Dune-Api-Key

Query parameters

api_keystring

Alternative to using the X-Dune-Api-Key header

Headers

X-Dune-Api-Keystring required

API Key for the service

Request body */*

performance'small' | 'medium' | 'large'

The performance engine tier the execution will be run on

sqlstring required

The SQL query to execute

Response

OK

execution_idstring required
statestring required

Example response

{
  "execution_id": "01HKZJ2683PHF9Q9PHHQ8FW4Q1",
  "state": "QUERY_STATE_PENDING"
}

Changes

    • info

      the response property became required for the status

    • info

      the response property became required for the status