Skip to main content
You must pass the execution_id obtained from making an execute query or execute SQL POST request. Returns the status of a query execution along with relevant metadata of the results if the execution is completed. This endpoint now includes detailed error information when a query fails, eliminating the need to call the results endpoint just to get error details.

Pricing

This endpoint has no charge and does not consume credits.

Execution States

Once an execution is triggered, it can be in one of the following states:
  • QUERY_STATE_PENDING: The query execution is waiting for an execution slot.
  • QUERY_STATE_EXECUTING: The query is currently executing.
  • QUERY_STATE_FAILED: The query execution failed. This is a terminal state. The response will include detailed error information.
  • QUERY_STATE_COMPLETED: The query execution completed successfully. You can retrieve the query result for this execution_id.
  • QUERY_STATE_CANCELED: The query execution was canceled by the user.
  • QUERY_STATE_EXPIRED: The query execution expired, and the result is no longer available.
  • QUERY_STATE_COMPLETED_PARTIAL: The query execution was successful, but the result was truncated because it was too large. To receive the truncated result, set the allow_partial_results flag to true in the API request to fetch the result.

Error Response Fields

When a query execution fails (QUERY_STATE_FAILED), the response includes an error object with the following fields:
  • type (string): Error type classification (e.g., FAILED_TYPE_EXECUTION_FAILED)
  • message (string): Detailed error message explaining what went wrong, including line and column information
  • metadata (object): Additional error context
    • line (integer): Line number where the error occurred
    • column (integer): Column position where the error occurred

curl -X GET "https://api.dune.com/api/v1/execution/{{execution_id}}/status" -H x-dune-api-key:{{api_key}}

{
  "execution_id": "01HKZJ2683PHF9Q9PHHQ8FW4Q1",
  "query_id": 3493826,
  "is_execution_finished": true,
  "state": "QUERY_STATE_COMPLETED",
  "submitted_at": "2025-10-22T10:31:04.222464Z",
  "expires_at": "2026-01-20T10:31:04.36241Z",
  "execution_started_at": "2025-10-22T10:31:05.123456Z",
  "execution_ended_at": "2025-10-22T10:31:15.789012Z",
  "execution_cost_credits": 10
}