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.
/twitter/spaces/downloadDownload 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:
| Component | Cost |
|---|---|
| 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 length | transcribe | Cost |
|---|---|---|
| 30 min | false | $0.05 |
| 30 min | true | $0.05 + 30 × $0.015 = $0.50 |
| 60 min | false | $0.05 |
| 60 min | true | $0.05 + 60 × $0.015 = $0.95 |
| 90 min | true | $0.05 + 90 × $0.015 = $1.40 |
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
space_url | string | Yes | Space URL or ID |
transcribe | boolean | No | Also produce a timestamped transcript (.txt + .json). Default false. |
Notes
- Returns immediately with a
job_idandstatus: "queued". Poll Get Download to retrieve the files. - A Space is only downloadable if it's currently
Running, orEndedwith replay enabled by the host. Otherwise the job fails (or returns422at 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
/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
| Field | Type | Required | Description |
|---|---|---|---|
job_id | string | Yes | The ID returned by Download Space |
Notes
statusprogresses:queued→downloading→uploading→transcribing(if requested) →done. It can also befailedorexpired.- 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)
| Field | Type | Description |
|---|---|---|
status | string | done when ready |
duration_sec | number | Audio length in seconds |
mp3_url | string | Signed URL to the MP3 |
transcript_url | string | Signed URL to the .txt transcript (timestamped) — only if transcribe: true |
transcript_json_url | string | Signed URL to the raw JSON transcript (segments) — only if transcribe: true |
expires_at | string | When 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...