GetXAPI
Spaces

Download Space

Download an X/Twitter Space as MP3 with an optional transcript via API. $0.05 base + $0.015 per transcript minute. GetXAPI Spaces download endpoint.

POST/twitter/spaces/download

Download a Space as an MP3, with an optional timestamped transcript. Downloads run as an async job: you queue it, get a job_id, then poll for the result. Files are hosted for 7 days, then auto-deleted.

Spaces is a pay-per-use add-on. Spaces calls are billed from your credit balance even on a subscription plan — they are not part of your plan's included calls.

Pricing

Unlike standard endpoints, a Space download is priced by usage:

ComponentCost
Base (queue + MP3 download)$0.05 flat per job
Transcript+$0.015 per minute of audio (only when transcribe: true)

Polling the job status (below) is free.

Worked examples:

Space lengthtranscribeCost
30 minfalse$0.05
30 mintrue$0.05 + 30 × $0.015 = $0.50
60 minfalse$0.05
60 mintrue$0.05 + 60 × $0.015 = $0.95
90 mintrue$0.05 + 90 × $0.015 = $1.40

Request Body

FieldTypeRequiredDescription
space_urlstringYesSpace URL or ID
transcribebooleanNoAlso produce a timestamped transcript (.txt + .json). Default false.

Notes

  • Returns immediately with a job_id and status: "queued". Poll Get Download to retrieve the files.
  • A Space is only downloadable if it's currently Running, or Ended with replay enabled by the host. Otherwise the job fails (or returns 422 at queue time).

Response (200)

{
  "status": "success",
  "msg": "Download queued",
  "data": {
    "job_id": "spc_1f1e0d24cdd9480880b9ad3f7b44640d",
    "status": "queued",
    "space_url": "https://x.com/i/spaces/1mrGmBvwaBqJy",
    "title": "CommonPrefix <> XRP Ledger",
    "host_username": "Vet_X0",
    "state": "Ended",
    "transcribe": false,
    "created_at": "2026-06-30T06:39:34.309Z",
    "expires_at": "2026-07-07T06:39:34.119Z"
  }
}

Error Responses

422 - Not downloadable

The Space has ended and replay was not enabled by the host.

Example

curl -X POST "https://api.getxapi.com/twitter/spaces/download" \
  -H "Authorization: Bearer API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "space_url": "https://x.com/i/spaces/1mrGmBvwaBqJy",
    "transcribe": true
  }'

Get Download Status

GET/twitter/spaces/download/{job_id}

Poll a download job. While running, returns status + progress. When done, returns signed download URLs. Free — this poll is part of the download flow, not a separate billable call.

Path Parameters

FieldTypeRequiredDescription
job_idstringYesThe ID returned by Download Space

Notes

  • status progresses: queueddownloadinguploadingtranscribing (if requested) → done. It can also be failed or expired.
  • Poll every few seconds. A ~1-hour Space typically finishes in 2–3 minutes.
  • This poll is free, but rate limited to 30 requests per minute (one poll every ~2s). Polling every 2–5s is well within the limit; polling more aggressively (e.g. every second) may return 429. A rate-limited poll is not billed.
  • Signed download URLs are valid for ~6 hours per request — re-poll to refresh them. All files are removed 7 days after creation.

Response (200) — in progress

{
  "status": "success",
  "msg": "success",
  "data": {
    "job_id": "spc_1f1e0d24cdd9480880b9ad3f7b44640d",
    "status": "downloading",
    "progress": "62%",
    "title": "CommonPrefix <> XRP Ledger",
    "transcribe": true
  }
}

Response (200) — done

{
  "status": "success",
  "msg": "success",
  "data": {
    "job_id": "spc_1f1e0d24cdd9480880b9ad3f7b44640d",
    "status": "done",
    "title": "CommonPrefix <> XRP Ledger",
    "duration_sec": 4732,
    "transcribe": true,
    "mp3_url": "https://.../signed/....mp3?token=...",
    "transcript_url": "https://.../signed/....txt?token=...",
    "transcript_json_url": "https://.../signed/....json?token=...",
    "finished_at": "2026-06-30T06:42:01.000Z",
    "expires_at": "2026-07-07T06:39:34.119Z"
  }
}

Response Fields (done)

FieldTypeDescription
statusstringdone when ready
duration_secnumberAudio length in seconds
mp3_urlstringSigned URL to the MP3
transcript_urlstringSigned URL to the .txt transcript (timestamped) — only if transcribe: true
transcript_json_urlstringSigned URL to the raw JSON transcript (segments) — only if transcribe: true
expires_atstringWhen the files are deleted (7 days after creation)

Response (200) — failed

{
  "status": "success",
  "msg": "success",
  "data": {
    "job_id": "spc_...",
    "status": "failed",
    "error": "This Space has ended and replay was not enabled by the host."
  }
}

Response (429) — polling too fast

Polling faster than the 30/min limit. Back off and retry; this response is not billed.

{
  "error": "Too many requests. Limit: 30 per minute."
}

Example

curl -X GET "https://api.getxapi.com/twitter/spaces/download/spc_1f1e0d24cdd9480880b9ad3f7b44640d" \
  -H "Authorization: Bearer API_KEY"

The transcript .txt is formatted with per-segment timestamps:

[00:00:34 → 00:00:46]  GM, GM, everyone.
[00:00:46 → 00:00:58]  Today we're diving into the XRP Ledger...

On this page