Dune Analytics Execution API
The Execution API from Dune Analytics — 3 operation(s) for execution.
The Execution API from Dune Analytics — 3 operation(s) for execution.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/dune-analytics-execution-api"
curl "https://apis.io/api/v1/apis?limit=25"
Discovery needs no key. Ratings and market analysis are Pro.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: Dune Analytics Query Execution API
description: 'REST endpoints for executing pre-saved Dune SQL queries, polling
execution status, and paginating results. Authentication via the
X-Dune-API-Key header. This specification is a best-effort,
documentation-derived description and may omit fields.
'
version: 1.0.0
contact:
name: Dune Analytics
url: https://docs.dune.com/
servers:
- url: https://api.dune.com/api/v1
description: Production
security:
- DuneApiKey: []
tags:
- name: Execution
paths:
/execution/{execution_id}/status:
get:
summary: Get execution status
operationId: getExecutionStatus
parameters:
- $ref: '#/components/parameters/ExecutionId'
responses:
'200':
description: Status payload
content:
application/json:
schema:
$ref: '#/components/schemas/ExecutionStatus'
'401':
$ref: '#/components/responses/Unauthorized'
tags:
- Execution
/execution/{execution_id}/results:
get:
summary: Get execution results
operationId: getExecutionResults
parameters:
- $ref: '#/components/parameters/ExecutionId'
- in: query
name: limit
schema:
type: integer
description: Page size for paginated results.
- in: query
name: offset
schema:
type: integer
description: Row offset for paginated results.
responses:
'200':
description: Result rows
content:
application/json:
schema:
$ref: '#/components/schemas/ExecutionResults'
'401':
$ref: '#/components/responses/Unauthorized'
tags:
- Execution
/execution/{execution_id}/cancel:
post:
summary: Cancel an in-flight execution
operationId: cancelExecution
parameters:
- $ref: '#/components/parameters/ExecutionId'
responses:
'200':
description: Cancellation accepted
'401':
$ref: '#/components/responses/Unauthorized'
tags:
- Execution
components:
schemas:
ExecutionStatus:
type: object
properties:
execution_id:
type: string
query_id:
type: integer
state:
type: string
enum:
- QUERY_STATE_PENDING
- QUERY_STATE_EXECUTING
- QUERY_STATE_COMPLETED
- QUERY_STATE_FAILED
- QUERY_STATE_CANCELLED
is_execution_finished:
type: boolean
submitted_at:
type: string
format: date-time
execution_started_at:
type: string
format: date-time
execution_ended_at:
type: string
format: date-time
execution_cost_credits:
type: integer
ExecutionResults:
type: object
properties:
execution_id:
type: string
query_id:
type: integer
state:
type: string
result:
type: object
properties:
rows:
type: array
items:
type: object
additionalProperties: true
metadata:
type: object
additionalProperties: true
Error:
type: object
properties:
error:
type: object
properties:
type:
type: string
message:
type: string
metadata:
type: object
additionalProperties: true
parameters:
ExecutionId:
in: path
name: execution_id
required: true
schema:
type: string
description: Execution identifier returned by /execute.
responses:
Unauthorized:
description: Invalid or missing API key
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
securitySchemes:
DuneApiKey:
type: apiKey
in: header
name: X-Dune-API-Key