Skip to main content
GET
Twitter spaces API: get an X space's details
1 credit per call · All plans from $0.00012/credit · Direct MPP: USD 0.00015 per call
Get Space returns one public X Space as X shows it: live, scheduled, or ended. The endpoint is GET /api/v1/x/spaces/{id}.
The Node.js and Python snippets build 1 row per Space. Each call costs 1 credit. A refused request costs nothing.

Read a Space’s state, audience, and stage

Use GET /x/spaces/{id} when you hold a Space ID or a Space URL. Find Space IDs with Search Spaces.
  • state tells a scheduled Space from a live or ended one.
  • isAvailableForReplay says whether X offers a recording. Get it with Get Space replay once the Space is over.
  • totalLiveListeners counts the accounts that listened live. totalReplayWatched counts the accounts that played the recording.
  • participantCount is the audience now, while the Space is live.
  • admins, speakers, and listeners name the accounts X lists on the stage and in the audience.
  • sharings lists the posts the hosts and speakers shared in the Space, with who shared each and when.
  • tweet is the post that announces the Space, with its text, counts, and author.
X names a Space’s hosts, speakers, and listeners without follower counts, so their rows carry none. Pass a username to Get User for the full profile. A field X leaves empty is left out. A Space X limits to subscribers or a community answers 404. A Space is a live audio room. For a live video at x.com/i/broadcasts, use Get broadcast.

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
The Space. Space object fields.
string
Space ID.
string
Space title.
string
NotStarted (scheduled), Running (live), Ended, Canceled (scheduled, never started) or TimedOut (closed by X, not by its host).
string
When the Space was made.
string
When the Space was set to start.
string
When the Space went live.
string
When the Space ended.
string
When X last changed the Space.
number
Accounts that listened live.
number
Accounts that played the recording.
number
Accounts in the Space now, while it is live.
boolean
Whether X offers a recording.
boolean
Whether listeners may clip the Space.
boolean
Whether the host locked the Space.
boolean
Whether only X employees may join.
boolean
Whether X lets no more accounts join.
boolean
Whether anonymous listening is off.
string
Audio or video kind, as X names it.
number
X’s code for who may speak.
number
Most hosts and co-hosts the Space allows.
string
X’s media key for the Space’s audio.
string[]
IDs of the accounts the host tagged.
string
ID of the post that announces the Space.
object
The post that announces the Space, with the fields of Get Tweet. Present only when X names the post.
object
Profile of the account that made the Space. It uses the fields of Get User.
object[]
Hosts and co-hosts. Each has id, username and name, plus profilePicture, badge fields and joinedAt when X sends them.
object[]
Accounts X lists as speakers, with the same fields as admins.
object[]
Accounts X lists as listeners, with the same fields as admins.
object[]
Posts the hosts and speakers shared in the Space, in X’s order. Present only when X lists them. Each has id, X’s ID of the sharing, plus sharedAt and updatedAt. sharedBy is the profile that shared it, with the fields of Get User. tweet is the post, with the fields of Get Tweet. X leaves out tweet when it no longer shows the post.

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 Space not found

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

502 X API unavailable

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

503 Service busy

X failed to return the Space, or Xquik is busy. Retry after a short delay. 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 API questions

URL-encode the Space link and pass it as id, or pass the Space ID from the link. x.com/i/spaces/1OGwblLjnQMKB holds the ID 1OGwblLjnQMKB.

How many people listened to a Space?

Read totalLiveListeners for the live audience and totalReplayWatched for the recording. While a Space is live, participantCount is the audience now.

Who hosted or spoke in a Space?

admins holds the hosts and co-hosts. speakers holds the accounts X lists as speakers.

Which posts were shared in a Space?

Read sharings. Each sharing has the post as tweet, the account that shared it as sharedBy, and the time as sharedAt.

Why does a Space return 404?

X no longer has the Space, or X limits it to subscribers or a community.

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 replay for an ended Space’s recording, Search Spaces to find more Spaces, Get User for a host’s full profile, or Get broadcast for a live video.