---
title: Bulk Exports
description: Export documents from a time range as JSONL or Parquet files, generated in the background and downloaded in parts.
type: guide
status: stable
updated: 2026-12-03
url: /en/docs/exports
markdown: /en/docs/exports.md
---

Read as needed; not a required onboarding step. Path：[Data Access Path](/en/docs)

# Bulk Exports

To take a large batch for offline analysis, export instead of reading document by document. By the end of this page you can create an export, wait for it and download every file.

Exports contain each document's **current version** only. For history or metrics, see [content & versions](/en/docs/documents) and [metrics & snapshots](/en/docs/metrics); to keep syncing, use the [change feed](/en/docs/change-feed).

## Before you start [#before]

- Your application's access must enable exports (`export_allowed`). Otherwise creation returns `403 export_forbidden`; ask your organization admin to contact us.
- If access is limited to certain platforms, you must pass `source_platforms` within that limit.
- No keyword filter, and no language or region filter.

## Export from the console [#console]

1. Open [data exports](/en/portal/exports) and choose an application.
2. Choose one platform, start and end dates (UTC, inclusive, up to 31 days), format and partitioning.
3. Review and create.

- Only organization owners and admins can create and cancel; other members with access to the application can view and download.
- JSONL lets you pick fields; Parquet includes a fixed full set and needs full field access.
- Every creation is billed. If a request times out, refresh the list to check before creating again.
- "Copy conditions to a new export" only fills in the form; it's billed as a new export once confirmed.

## Create with the API [#create]

Export Reddit documents published in the first week of October, partitioned by hour:


```bash
EXPORT_ID=$(curl -sS "$WHALE_BASE_URL/v1/exports" \
  -H "Authorization: Bearer $WHALE_API_KEY" \
  -H "Content-Type: application/json" \
  --data '{
    "source_platforms": ["reddit"],
    "published_from": "2026-10-01T00:00:00Z",
    "published_to": "2026-10-08T00:00:00Z",
    "format": "jsonl",
    "partition_by": "hour"
  }' | jq -er '.export_id')
```


You get `202`:


```json
{
  "export_id": "exp_01K...",
  "status": "queued",
  "format": "jsonl",
  "compression": "gzip",
  "partitions": 7,
  "created_at": "2026-10-14T08:00:00Z",
  "expires_at": "2026-10-21T08:00:00Z"
}
```


| Parameter | Meaning |
| --- | --- |
| `source_platforms` | Platforms to export. Required when access is limited to certain platforms |
| `published_from`, `published_to` | Filter by publish time, RFC 3339 |
| `format` | `jsonl` (default) or `parquet` |
| `compression` | Optional. `jsonl` only allows `gzip`; `parquet` only `zstd` |
| `fields` | JSONL only; see [exported fields](#fields) |
| `partition_by` | `day` (default) or `hour`, in UTC |
| `max_rows` | Rows per partition, 1 to 100000, default 100000 |
| `max_bytes` | Bytes per partition, up to 1 GiB, default 1 GiB |

### Choose partitioning [#partition]

- If a partition exceeds `max_rows` or `max_bytes`, the export fails rather than silently truncating.
- For platforms with millions of documents a day, such as Reddit, use `hour`. If one hour still exceeds the limits, shorten the range or split platforms.

## Wait for it to finish [#status]


```bash
curl -sS "$WHALE_BASE_URL/v1/exports/$EXPORT_ID" \
  -H "Authorization: Bearer $WHALE_API_KEY" \
  | jq '{status, rows, bytes, file_count, partitions, error}'
```


`status` moves through `queued` and `running`, ending as `succeeded`, `failed`, `cancelled` or `expired`.

- Poll from 5 seconds and back off.
- `rows` and `bytes` are what's been processed so far, not totals or a progress percentage.
- Failed partitions retry automatically from where they stopped. A final `failed` explains why in `error`.

## Download the files [#download]

Once it `succeeded`, list and download every file:


```bash
curl -sS "$WHALE_BASE_URL/v1/exports/$EXPORT_ID/files" \
  -H "Authorization: Bearer $WHALE_API_KEY" \
  | jq -r '.files[] | "\(.sequence) \(.format)"' \
  | while read -r sequence format; do
      case "$format" in
        jsonl) extension="jsonl.gz" ;;
        parquet) extension="parquet" ;;
        *) extension="json" ;;
      esac
      curl -sS -o "export-$EXPORT_ID-$sequence.$extension" \
        "$WHALE_BASE_URL/v1/exports/$EXPORT_ID/files/$sequence" \
        -H "Authorization: Bearer $WHALE_API_KEY"
    done
```


The file list looks like this:


```json
{
  "files": [
    {"sequence": 0, "format": "manifest", "rows": 18234, "bytes": 2048, "download_url": "/v1/exports/exp_01K.../files/0", "expires_at": "2026-10-21T08:00:00Z"},
    {"sequence": 1000001, "format": "jsonl", "rows": 5000, "bytes": 3145728, "download_url": "/v1/exports/exp_01K.../files/1000001", "expires_at": "2026-10-21T08:00:00Z"}
  ]
}
```


- `sequence` 0 is the manifest: total rows and each partition's time range, rows and files.
- The rest are data files. `jsonl` is GZIP-compressed JSON Lines, one document per line; `parquet` is ZSTD-compressed.
- Prefix download URLs with `WHALE_BASE_URL` and send the same API key.
- Download by the `sequence` values in the list; don't compute them yourself.

> Note: Exports and their files expire 7 days after creation. After that they can't be downloaded; export again.

## Exported fields [#fields]

| Field | Meaning |
| --- | --- |
| `document_id`, `version_id` | Document ID and current version ID |
| `external_content_id`, `canonical_url` | Original platform ID and link |
| `source_platform`, `content_type` | Platform and content type |
| `title`, `body`, `body_format` | Title, full body, body format |
| `language`, `region`, `country_code` | Language and region |
| `published_at` | Publish time |
| `content_hash`, `size_bytes`, `char_count` | Body hash, bytes and characters |
| `author`, `subreddit`, `score`, `external_parent_id`, `external_thread_id` | Author, community, score and reply links. Choose them in `fields` for JSONL; included by default in Parquet |
| `platform_payload` | Raw platform data. JSONL only, chosen in `fields`, and needs matching access |

Requesting fields outside your access returns `403 export_forbidden`.

## List exports [#list]


```bash
curl -sS "$WHALE_BASE_URL/v1/exports?limit=20" \
  -H "Authorization: Bearer $WHALE_API_KEY"
```


Returns the application's `jobs`, newest first. When there's a `next_cursor`, pass it as `cursor` for the next page. `limit` is 1 to 100, default 20.

## Cancel an export [#cancel]


```bash
curl -sS -X POST "$WHALE_BASE_URL/v1/exports/$EXPORT_ID/cancel" \
  -H "Authorization: Bearer $WHALE_API_KEY"
```


- Returns `202` with the actual status. Once `cancelled`, it won't retry or produce new files.
- A small batch already in progress may finish first.
- Exports that already succeeded or expired keep their status.
- Files already produced stay downloadable until they expire. Files from failed or canceled exports may be incomplete.
- Access is checked again at download: the application must be enabled, exports still allowed, and the export's platforms, fields and time still within access.

## Credits and limits [#billing]

- Each creation is billed as one request; failed creations are refunded.
- Exports per day are capped; see the application's "Access limits" page in the console. Reaching the cap returns `429 rate_limit_exceeded` for the rest of the day.

## When something fails [#errors]

See [Error codes](/en/docs/errors).

## Continue Your Task

[Return to the integration path](/en/docs); return to your task after consulting this reference.
