Overview - Dune Docs

Documentation Index

Fetch the complete documentation index at: /llms.txt

Use this file to discover all available pages before exploring further.

Build blockchain analytics workflows with Dune’s comprehensive API suite. Access the same data that powers thousands of Dune dashboards, available programmatically for your data pattern needs. Dune API provides a variety of endpoints for analysts, data engineers, and data scientists, ranging from low-level, customizable options to connectors ready for immediate use. Queries saved in the Dune App UI can be executed via API and results retrieved in your environment, enabling bulk data extraction and automated workflows.

New to Dune? Create a free account or get your API key to get started.

What do you want to build?

Analyze onchain data programmatically
Execute SQL queries, retrieve results, and build custom analytics pipelines with Dune’s query execution engine. Perfect for data teams and analysts.→ Start with query execution

Run queries in your environment
Connect directly to Dune’s data warehouse using Trino Connector for maximum flexibility. Perfect for enterprise teams with existing BI tools.→ Set up Trino connector

Build custom dashboards & reports
Fetch query results, manage executions, and create dynamic visualizations in your own applications. Perfect for teams embedding analytics.→ Create your first dashboard

Transform data with dbt
Build production-grade data transformation pipelines with write access to DuneSQL. Perfect for data engineering teams using dbt.→ Set up dbt connector

BI Visualization Tools
Connect Dune to your favorite BI tools like Hex, Metabase, and DBeaver using the Trino/Presto connector.→ Connect BI tools

Get started with the basics
New to APIs? Start here to make your first request and see results in minutes. Learn how to execute a simple SQL query, authenticate your requests, and retrieve blockchain data programmatically.→ Make your first request

Quick Start with SDKs

Our SDKs handle authentication, polling, pagination, and error handling automatically. The new execute() function manages the entire workflow for you.

Python

pip install dune-client

from dune_client import DuneClient

dune = DuneClient(api_key="your-key")
results = dune.execute(query_id=3493826)

TypeScript

npm install @duneanalytics/client

import { DuneClient } from '@duneanalytics/client';

const dune = new DuneClient('your-key');
const results = await dune.execute({ queryId: 3493826 });

Go

go get github.com/duneanalytics/duneapi-client-go

client := duneapi.New("your-key")
results := client.Execute(3493826)

New: All SDKs now include an execute() function that handles polling and pagination automatically. No more managing multiple API calls!

Additional Resources

[API Reference
Complete documentation for all endpoints, parameters, response formats, and status codes.

[Troubleshooting Errors
Common API errors and how to resolve them.

[API Pricing
Understand credit consumption and costs for different endpoints.

[Authentication
Get started with API keys and authentication.

Getting Help

Quickstarts
Step-by-step guides for common use cases

Community
Get help from the Dune community

Support
Contact our support team