Tweets
Twitter spaces API: get an X space's details
Get one Twitter or X Space by ID or URL: title, state, start and end times, listener counts, replay state, hosts, speakers, and listeners. 1 credit per call.
- 200
- 400
- 401
- 402
- 404
- 424
- 429
- 502
- 503
GET
Twitter spaces API: get an X space's details
Get Space returns one public X Space as X shows it: live, scheduled, or ended.
The endpoint is
The Node.js and Python snippets build 1 row per Space. Each call costs 1 credit.
A refused request costs nothing.
The path is not a Space ID or a Space URL. The request costs nothing.
Missing or invalid API key. Check the
X has no such Space, or X limits it to subscribers or a community. The request costs nothing.
The read service returned an error. Retry after a short delay.
X failed to return the Space, or Xquik is busy. Retry after a short delay. The request costs nothing.
You exceeded your tier rate limit. Wait for the
The normalized v1 response contract can return 424 when the read service is unavailable.
GET /api/v1/x/spaces/{id}.
Read a Space’s state, audience, and stage
UseGET /x/spaces/{id} when you hold a Space ID or a Space URL. Find Space IDs
with Search Spaces.
statetells a scheduled Space from a live or ended one.isAvailableForReplaysays whether X offers a recording. Get it with Get Space replay once the Space is over.totalLiveListenerscounts the accounts that listened live.totalReplayWatchedcounts the accounts that played the recording.participantCountis the audience now, while the Space is live.admins,speakers, andlistenersname the accounts X lists on the stage and in the audience.sharingslists the posts the hosts and speakers shared in the Space, with who shared each and when.tweetis the post that announces the Space, with its text, counts, and author.
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[]
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
401 Unauthenticated
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 MPPWWW-Authenticate: Payment challenge plus a guest wallet creation action.
No checkout starts automatically. Confirm any payment action.
404 Space not found
502 X API unavailable
503 Service busy
429 Rate limit exceeded
Retry-After header before retrying.
424 Dependency failed
Twitter Spaces API questions
How do I get a Twitter Space by its link?
URL-encode the Space link and pass it asid, or pass the Space ID from the
link. x.com/i/spaces/1OGwblLjnQMKB holds the ID 1OGwblLjnQMKB.
How many people listened to a Space?
ReadtotalLiveListeners 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?
Readsharings. 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.