Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.dune.com/llms.txt

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

The Dune API relies on API keys for authentication. Your API key grants access and determines billing details for private queries, so safeguard it diligently!

Generate an API key

In order to generate a new API key, go to settings -> API -> create new API key.
  • Dune has two types of account: user account and team account. A team can have many users. A user can join many teams.
  • Each user or team account has its own context. Queries created under a team account can only be managed within the team account context.
  • An API key belongs to a specific context, and is either associated with a user account or a team account.

Never share your secret API keys in public repositories or other accessible areas.

API key scopes

Each Dune API key is issued with a scope that controls what it can do. Endpoints in this reference list the minimum required API key scope — keys with broader scopes can also call them.
ScopeAccess
ReadRead-only endpoints (query results, datasets, usage, status checks).
Read/WriteEverything Read allows, plus mutating endpoints (create/update/archive queries, manage uploads, materialized views, pipelines).

Authentication & making API calls

You can authenticate either with the API header or with query parameter to start making API calls. We illustrate below with execute query endpoint as an example.
To authenticate via the API header, include an x-dune-api-key property in your request header.
curl -X POST -H x-dune-api-key:{{api_key}} "https://api.dune.com/api/v1/query/{{query_id}}/execute"