Skip to main content
GET
Twitter spaces replay API: get a recording URL
1 credit per call · All plans from $0.00012/credit · Direct MPP: USD 0.00015 per call
Get Space replay returns the recording X plays back once a Space is over. The endpoint is GET /api/v1/x/spaces/{id}/replay.
Each call costs 1 credit. A refused request costs nothing.

Get the recording of an ended Space

Use GET /x/spaces/{id}/replay once a Space is over, in state Ended or TimedOut. Check state and isAvailableForReplay with Get Space first.
  • An ended Space with a recording returns its HLS playlist in replay.url.
  • A live or scheduled Space answers 409 space_not_ended. Its replay is ready after it ends.
  • A Space whose host kept no recording answers 404 replay_unavailable.
  • A Space cancelled before it started answers 404 space_canceled.
replay.url is an HLS playlist. Play it in a player that reads HLS, or pass it to a tool that saves HLS streams.

Path parameters

string
required
X Space ID, or the URL-encoded Space URL, such as x.com/i/spaces/1OGwblLjnQMKB.

Headers

string
Full account key. Sessions and OAuth also work.
string
Bearer xq_your_guest_key_here authenticates paid_reads guest keys. Direct MPP uses the Payment ... credential. Get it from the WWW-Authenticate: Payment challenge.

Response

200 OK

object
Recording of an ended Space. Replay object fields.
string
HLS playlist of the recording.
string
Stream format, as X names it.
string
Stream status, as X names it.

400 Invalid Space ID

The path is not a Space ID or a Space URL. The request costs nothing.

401 Unauthenticated

Missing or invalid API key. Check the x-api-key header value.

402 Payment required

Account keys get account options. Guest keys get guest top-up only. Anonymous calls receive a direct MPP WWW-Authenticate: Payment challenge plus a guest wallet creation action. No checkout starts automatically. Confirm any payment action.

404 No replay

The host kept no recording. The request costs nothing.

404 Space cancelled

The host cancelled the Space before it started, so there is nothing to replay. The request costs nothing.

404 Space not found

X has no such Space, or X limits it to subscribers or a community. The request costs nothing.

409 Space not ended

The Space is live or scheduled. Call again after it ends. The request costs nothing.

502 X API unavailable

The read service returned an error. Retry after a short delay.

503 Service busy

X returned no playback URL, or Xquik is busy. Wait for Retry-After, then retry. The request costs nothing.

429 Rate limit exceeded

You exceeded your tier rate limit. Wait for the Retry-After header before retrying.

424 Dependency failed

The normalized v1 response contract can return 424 when the read service is unavailable.

Twitter Spaces replay questions

How do I get the recording of a Twitter Space?

Call GET /x/spaces/{id}/replay with the Space ID or its URL. An ended Space with a recording returns its HLS playlist in replay.url.

Can I get the stream of a live Space?

No. A live or scheduled Space answers 409 space_not_ended. Call again after it ends.

Why does an ended Space have no replay?

Its host kept no recording. Check isAvailableForReplay with Get Space before you call.

How much does a replay lookup cost?

Each replay returned costs 1 credit. A refused request costs nothing.

Does this replace X’s official API?

No. This page documents Xquik, an independent third-party service. It does not document X’s official API.
Next steps. Get Space for the Space’s state & listener counts, Search Spaces to find more Spaces, or Get broadcast for a live video.