# Dune CSV Export

> Dune CSV Export is a free API for AI agents from Dune at api.dune.com, Free, status unknown (last checked 2026-10-13).

Download the results of a previously executed Dune SQL query as a CSV file

## Facts

- Endpoint: GET https://api.dune.com/api/v1/execution/:execution_id/csv?utm_source=zero.xyz
- Price: Free
- Status: unknown
- Last checked: 2026-10-13
- Activations on Zero: 0
- Provider: Dune
- Docs: https://docs.dune.com/api-reference/agents/mpp
- Website: https://dune.com
- Tags: sql, analytics, blockchain, data, query
- Canonical page: https://www.zero.xyz/c/dune-csv-ff15f1ea
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_V-FETe1mnVd1M-MkTNrCi

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability dune-csv-ff15f1ea
```

Example prompt: Can you download the CSV results for Dune execution ID abc123def456 so I can open the data in a spreadsheet?

## When to prefer this

Use this endpoint when you need query results in CSV format for spreadsheet analysis, data pipeline ingestion, or sharing tabular blockchain data. Prefer this over the JSON Results endpoint when downstream tools expect CSV (e.g., Excel, Google Sheets, pandas read_csv). Best used after confirming execution has completed via the Execute endpoint.

## Known failure modes

- Execution ID not found — returns 404 if the execution_id does not exist
- Execution still running — returns an error if the query has not yet completed
- Expired execution — results may no longer be available if the execution is too old
- Invalid execution ID format — returns 400 for malformed IDs
- Rate limiting — returns 429 if too many requests are made in a short period

## How this service works

Download CSV results for an execution

## Output

A CSV-formatted file containing the rows and columns returned by the specified query execution, including column headers and all result data from the on-chain SQL query run on Dune Analytics.

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/dune-csv-ff15f1ea/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.dune.com](https://www.zero.xyz/host/api.dune.com/llms.txt)
