## Documentation Index

Fetch the complete documentation index at: [/llms.txt](https://docs.dune.com/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](https://dune.com/auth/register)** or **[get your API key](https://dune.com/apis?tab=keys)** 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](https://docs.dune.com/api-reference/apis/quickstart-analyze)

[**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](https://docs.dune.com/api-reference/connectors/overview)

[**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](https://docs.dune.com/api-reference/apis/quickstart-dashboards)

[**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](https://docs.dune.com/api-reference/connectors/dbt/overview)

[**BI Visualization Tools**  
Connect Dune to your favorite BI tools like Hex, Metabase, and DBeaver using the Trino/Presto connector.→ Connect BI tools](https://docs.dune.com/api-reference/connectors/trino/overview)

[**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](https://docs.dune.com/api-reference/overview/getting-started)

## 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**](https://docs.dune.com/api-reference/overview/sdks#python)

```python
pip install dune-client

from dune_client import DuneClient

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

[**TypeScript**](https://docs.dune.com/api-reference/overview/sdks#typescript)

```typescript
npm install @duneanalytics/client

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

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

[**Go**](https://docs.dune.com/api-reference/overview/sdks#go)

```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.  
- Execute & Results endpoints  
- Query management  
- Dataset metadata  
- Usage & billing  
- Webhooks](https://docs.dune.com/api-reference/api-overview)

[**Troubleshooting Errors**  
Common API errors and how to resolve them.  
- Authentication issues  
- Rate limit errors  
- Query execution failures  
- Response format errors](https://docs.dune.com/api-reference/overview/troubleshooting)

[**API Pricing**  
Understand credit consumption and costs for different endpoints.  
- Execution endpoints: Credit-based  
- Metadata endpoints: Free  
- Usage tracking available via API](https://docs.dune.com/api-reference/overview/billing)

[**Authentication**  
Get started with API keys and authentication.  
- Auto-generated keys for new teams  
- Manage keys in settings  
- Best practices for key security](https://docs.dune.com/api-reference/overview/authentication)

## Getting Help

[**Quickstarts**  
Step-by-step guides for common use cases](https://docs.dune.com/api-reference/overview/getting-started)

[**Community**  
Get help from the Dune community](https://discord.gg/duneanalytics)

[**Support**  
Contact our support team](mailto:support@dune.com)
