---
title: "Download query results as CSV"
method: POST
path: "/v1/helicone-sql/download"
tags: ["HeliconeSql"]
---

# Download query results as CSV

`POST /v1/helicone-sql/download`

Execute a SQL query and download results as CSV

## Request body

- ExecuteSqlRequest
  - `sql` string, required

## Response `200`

URL to download the CSV file

- union
  - ResultSuccessString
    - `data` string, required
    - `error` null, nullable, required
  - ResultErrorString
    - `data` null, nullable, required
    - `error` string, required

---

[API](https://skmtc.net/helicone/apis/helicone-api.md) · [All operations](https://skmtc.net/helicone/apis/helicone-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/helicone/helicone-api/versions/b369e9e3e80c/schema)
