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!
As mentioned above, a team API key only has access to team account resources and not user account resources. This can be especially relevant when you use Query endpoints.
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.
Copy
Ask AI
curl -X POST -H x-dune-api-key:{{api_key}} "https://api.dune.com/api/v1/query/{{query_id}}/execute"