Download Markdown

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 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

  1. Open data 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

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"
}
ParameterMeaning
source_platformsPlatforms to export. Required when access is limited to certain platforms
published_from, published_toFilter by publish time, RFC 3339
formatjsonl (default) or parquet
compressionOptional. jsonl only allows gzip; parquet only zstd
fieldsJSONL only; see exported fields
partition_byday (default) or hour, in UTC
max_rowsRows per partition, 1 to 100000, default 100000
max_bytesBytes per partition, up to 1 GiB, default 1 GiB

Choose partitioning

  • 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

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

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

FieldMeaning
document_id, version_idDocument ID and current version ID
external_content_id, canonical_urlOriginal platform ID and link
source_platform, content_typePlatform and content type
title, body, body_formatTitle, full body, body format
language, region, country_codeLanguage and region
published_atPublish time
content_hash, size_bytes, char_countBody hash, bytes and characters
author, subreddit, score, external_parent_id, external_thread_idAuthor, community, score and reply links. Choose them in fields for JSONL; included by default in Parquet
platform_payloadRaw platform data. JSONL only, chosen in fields, and needs matching access

Requesting fields outside your access returns 403 export_forbidden.

List exports

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

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

  • 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

See Error codes.