Fetch JSON results for a Dune Analytics query execution, paid per MB via Tempo session.
What it does
This endpoint retrieves the JSON results of a previously triggered query execution on Dune Analytics, identified by its execution_id. It is part of Dune's broader API platform, which provides programmatic access to over 1 PB of indexed multi-chain blockchain data including raw transactions, decoded smart contract events, DeFi positions, NFT activity, stablecoin flows, and more.
The endpoint accepts a GET request with the execution_id as a path parameter and supports pagination (limit/offset), column selection, row filtering (SQL WHERE-style expressions), sorting (SQL ORDER BY-style), and random sampling. The response includes execution metadata (state, timestamps, column names/types, row counts, execution time) alongside the result rows as key-value JSON objects. A next_uri field is provided for convenient pagination through large result sets.
Payment is handled via the MPP Tempo session protocol on chain 4217. The initial session deposit is $1,024.00 (1024000000 base units, 6 decimals) with a suggested deposit of $10.00. The provider describes pricing as $1.00 per MB of result data. Authentication also requires an X-Dune-Api-Key header. The endpoint is live and returning a 402 MPP challenge as expected.
Capabilities
Use cases
- —Retrieve results of a previously executed blockchain SQL query for downstream processing
- —Paginate through large on-chain analytics result sets in an automated pipeline
- —Filter and sort Dune query execution results before ingesting into a data warehouse
- —Power real-time dashboards with fresh blockchain analytics data
- —Feed AI agents with structured on-chain data for crypto research
Fit
Best for
- —Agents and pipelines that need structured blockchain analytics data on demand
- —Developers integrating Dune query results into applications or BI tools
- —Automated monitoring systems that poll execution results for alerting
Not for
- —Triggering new query executions (use the /execute endpoint instead)
- —Querying non-blockchain or off-chain-only datasets
- —Use cases requiring sub-second latency on fresh data (queries must complete first)
Quick start
curl -X GET "https://api.dune.com/api/v1/execution/01HKZJ2683PHF9Q9PHHQ8FW4Q1/results?limit=10" \
-H "X-Dune-Api-Key: YOUR_API_KEY"Example
Response
{
"state": "QUERY_STATE_COMPLETED",
"result": {
"rows": [
{
"Rank": 1,
"Volume": 5000000000,
"Project": "Uniswap"
}
],
"metadata": {
"row_count": 10,
"column_names": [
"Rank",
"Project",
"Volume"
],
"column_types": [
"double",
"varchar",
"bigint"
],
"total_row_count": 1000,
"result_set_bytes": 4096,
"execution_time_millis": 1500
}
},
"next_uri": "https://api.dune.com/api/v1/execution/01HKZJ2683PHF9Q9PHHQ8FW4Q1/results?offset=10&limit=10",
"query_id": 1234,
"next_offset": 10,
"execution_id": "01HKZJ2683PHF9Q9PHHQ8FW4Q1",
"submitted_at": "2024-12-20T11:04:18.724658237Z",
"execution_ended_at": "2024-12-20T11:04:20.500000000Z",
"execution_started_at": "2024-12-20T11:04:19.000000000Z",
"is_execution_finished": true
}Endpoint
Quality
Full OpenAPI schema with detailed response model and query parameters is available. Live 402 MPP challenge confirms the endpoint is operational. Pricing description ($1/MB) is present in x-payment-info. Deducted slightly because the session deposit amount ($1,024) is high and the exact metering mechanics aren't fully documented in the crawl.
Warnings
- —Session deposit is $1,024.00 (1024000000 with 6 decimals); actual charges are $1.00/MB of result data per the provider's description.
- —The currency address 0x20c0...8b50 on chain 4217 is not a widely-known token; verify it is pathUSD or equivalent before depositing.
- —Dune also requires an X-Dune-Api-Key header for authentication in addition to the MPP payment credential.
Citations
- —Endpoint returns execution results given an execution_id, with support for pagination, filtering, sorting, and sampling.https://api.dune.com
- —Pricing is $1.00 per MB of result data, using Tempo session payment method.https://api.dune.com
- —Dune provides access to 1+ PB of indexed multi-chain data.https://api.dune.com
- —Response schema includes execution metadata (column_names, column_types, row_count, execution_time_millis) and result rows.https://api.dune.com
- —API documentation reference is at https://docs.dune.com/api-reference/overview/introduction.https://api.dune.com