# Download raw data export

> Streams raw bytes.

`GET https://api.cymatics.tech/v1/raw-data/exports/{export}/content`

Scope: `raw:read` · Binary

## Request

Send your key as `Authorization: Bearer cym_test_…`. Requires the `raw:read` scope. Test keys read the simulator; live keys read your paired Cymos.

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `export` (SDK and CLI: `export_id`) | path | `string` | Yes | Export id |

## Response

Raw bytes as `application/octet-stream`, not JSON. Read them as a stream and bound the size: the SDK takes `maxBytes` and the CLI writes to `--output-file` with `--max-bytes`. Errors still arrive as a JSON `{ error, meta }` envelope.

## Errors

| Status | Description |
| --- | --- |
| `429` | `rate_limit_exceeded`: Too many requests this minute for the key (or twice that across the project), or too many open streams for the project. Retry after the seconds in Retry-After.<br>`quota_exceeded`: A live key's project has used its monthly live-hour cap. There is no Retry-After. Don't retry; raise the live-hour cap in the dashboard. Headers: Retry-After, RateLimit-Limit, RateLimit-Remaining, RateLimit-Reset. |
| `503` | `live_unavailable`: This operation has no live data for this project yet (for example, no paired Cymo covers it). Don't retry the same request; pair a Cymo that covers it, or build against a test key.<br>`service_unavailable`: A dependency, such as API key verification, is unreachable, or the project is busy with another write. Retry after the seconds in Retry-After, with backoff. |
| `4XX` | Invalid request, credential, permission or revision. |
| `default` | Error with a stable code and request ID. |

Every error is a `{ error, meta }` envelope with a stable `code`. See [Errors](https://docs.cymatics.tech/errors) for each code and whether to retry.

## Call it

**TypeScript · @cymos/sdk**

```ts
import { Cymo } from "@cymos/sdk";

const cymo = new Cymo({ apiKey: process.env.CYMO_API_KEY! });

for await (const chunk of cymo.rawData.exports.download({
  export_id: "exp_01"
}, { maxBytes: 1_048_576 })) {
  process.stdout.write(chunk);
}
```

**terminal · cymatics CLI**

```sh
$ cymatics raw-data exports download --export-id exp_01 --output-file capture.bin --max-bytes 1048576
```

**curl**

```sh
curl "https://api.cymatics.tech/v1/raw-data/exports/exp_01/content" \
  -H "Authorization: Bearer $CYMO_API_KEY" \
  -o capture.bin
```
