Dune Analytics API logo

Dune Analytics API

Dune Analytics API

DegradedFreedeveloper-tools

Dune Analytics API lets developers programmatically execute SQL queries on indexed on-chain data for Ethereum / Polygon / Arbitrum / Solana / etc.

Visit site ↗Documentation ↗Health checked 9h ago
Use it when

Familiar SQL instead of GraphQL for on-chain data

Watch for

Query latency (complex queries: seconds to minutes)

First check

Sign up at dune.com for an API key. Write SQL on the website to get a query ID, POST /v1/query/{queryId}/execute to run, GET /v1/execution/{executionId}/results for results.

Auth
api_key
CORS
?
HTTPS
Yes
Signup
?
Latency
301 ms
Protocol
REST
Pricing
freemium

Uptime · 30-day window

Probes: 1Uptime: 0%Avg latency: 301ms
01

About this API

Dune Analytics is an on-chain analytics platform founded 2018, positioned as "SQL on blockchain". Background: on-chain data is public but hard to query directly with SQL (raw data is binary event logs). Dune team indexes all major chains' data into relational tables (ethereum.transactions, uniswap_v3.swaps, etc.); analysts write standard SQL for complex queries. Dune's website has 1M+ community-shared queries and dashboards — all popular DeFi protocols (Uniswap, Aave, Curve) have official dashboards showing DAU, TVL, revenue, and core metrics. Dune API programmatizes these queries — e.g. daily auto-trigger to fetch latest TVL data to your own dashboard.

02

What you can build

  • 1DeFi protocol dashboards (TVL, revenue, user activity)
  • 2Web3 project KPI automated reports
  • 3On-chain behavior research
  • 4Quant research inputs
03

Strengths & limitations

Strengths

  • Familiar SQL instead of GraphQL for on-chain data
  • Pre-indexed data (no ETL required)
  • Rich existing dashboard templates (Dune community has 1M+ public queries)

Limitations

  • Query latency (complex queries: seconds to minutes)
  • Free tier credits insufficient for commercial
  • Mainly for analysts, not suitable for real-time trading
04

Example request

Generic template — replace <endpoint> with the real path from the docs.
curl https://dune.com/<endpoint> \
  -H "Authorization: Bearer $API_KEY"
# Some providers use X-Api-Key instead — verify in the docs.
05

Getting started

Sign up at dune.com for an API key. Write SQL on the website to get a query ID, POST /v1/query/{queryId}/execute to run, GET /v1/execution/{executionId}/results for results.

06

FAQ

How real-time is it?+

Not real-time — indexed data typically has 5-10 min delay. For real-time, use RPC nodes or Subgraph.

How are credits calculated?+

By compute resources consumed. Simple queries: 1-10 credits. Complex multi-year aggregations: hundreds of credits.

07

Technical details

CORS: ?HTTPS: YesSignup: ?Open source: No
Auth type
api_key
Pricing
freemium
Rate limit
免费 1000 credits/月(每个查询根据复杂度消耗 credits)
Protocols
REST
SDKs
python, typescript, go
Response time
301 ms
Last health check
5/12/2026, 7:37:19 AM
08

Tags