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 and metrics & snapshots; to keep syncing, use the change feed.
Before you start
- Your application’s access must enable exports (
export_allowed). Otherwise creation returns403 export_forbidden; ask your organization admin to contact us. - If access is limited to certain platforms, you must pass
source_platformswithin that limit. - No keyword filter, and no language or region filter.
Export from the console
- Open data exports and choose an application.
- Choose one platform, start and end dates (UTC, inclusive, up to 31 days), format and partitioning.
- 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
Export Reddit documents published in the first week of October, partitioned by hour:
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:
{
"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 |
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
- If a partition exceeds
max_rowsormax_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
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.
rowsandbytesare what’s been processed so far, not totals or a progress percentage.- Failed partitions retry automatically from where they stopped. A final
failedexplains why inerror.
Download the files
Once it succeeded, list and download every file:
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"
doneThe file list looks like this:
{
"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"}
]
}sequence0 is the manifest: total rows and each partition’s time range, rows and files.- The rest are data files.
jsonlis GZIP-compressed JSON Lines, one document per line;parquetis ZSTD-compressed. - Prefix download URLs with
WHALE_BASE_URLand send the same API key. - Download by the
sequencevalues 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
| 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
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
curl -sS -X POST "$WHALE_BASE_URL/v1/exports/$EXPORT_ID/cancel" \
-H "Authorization: Bearer $WHALE_API_KEY"- Returns
202with the actual status. Oncecancelled, 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
- 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_exceededfor the rest of the day.
When something fails
See Error codes.