---
title: "Download SQL query results"
method: POST
path: "/storage/query/download"
tags: ["Storage - Query"]
---

# Download SQL query results

`POST /storage/query/download`

Execute a read-only SELECT query against the workspace's storage warehouse and download the results as a file.

## Request body

- object — Request body schema.
  - `query` string, required — A read-only SELECT statement. Tables must be referenced as [datasetSlug].[modelSlug] and are rewritten to the underlying warehouse table under the hood. Example: "SELECT * FROM my_dataset.my_model"
  - `format` 'csv' | 'parquet' — Download format. Defaults to csv.

## Response `200`

Successful response

- object
  - `urls` string[], required — Signed download URLs.

## Other responses

- `400` — Bad request
- `401` — Unauthorized
- `404` — Not found
- `500` — Internal server error

---

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