X API Spaces: the field every example gets wrong
The X API Spaces endpoints in 2026: all six are read-only, the host_ids in X's own quickstart is not a valid space.field at 2.174, and ended Spaces vanish.
On this page · 9 sections
- Quick answer
- Six endpoints, and what each one hands back
- host_ids is not a space.field
- On 22 November, the identities start billing
- Spaces search is a substring match, not a query language
- Ended Spaces are unretrievable, and that breaks two endpoints
- The webhook is the only trigger that works
- What the namespace still cannot do
- If what you actually wanted was reach
The short version
- ▸Six Spaces endpoints exist and every one is a GET. There is no way to create, schedule, end, join or moderate a Space from the API, and there never has been.
- ▸host_ids appears in X's own Spaces quickstart and in the lookup guide, but it is not in the space.fields enum at API 2.174, and the official Python SDK encodes the same restriction. Host and speaker identities are expansion-only.
- ▸That matters on 22 November 2026, when expansion objects start billing. The only route to a Space's hosts and speakers becomes a User read at $0.010 each, on top of $0.005 for the Space itself.
- ▸Spaces search is a case-insensitive substring match on the title. X staff confirmed that operators like OR are not supported, so every extra keyword is another request, and there is no pagination token at all.
- ▸A Space becomes unretrievable the moment it ends, which makes the ticket-buyers and shared-Posts endpoints useless after the fact. The spaces.start and spaces.end webhook events added in January 2026 are the only workable trigger.
Quick answer
The X API Spaces namespace has six endpoints, all of them GETs, and the single most copied line in its documentation does not work. space.fields=host_ids appears in X's own quickstart, in the lookup guide, and in both SDK samples, but host_ids is not in the space.fields enum at API version 2.174. Hosts and speakers are expansions. That distinction is free today and starts costing $0.010 per user on 22 November 2026.
Last updated: November 2026
Three facts shape everything you can build here. The namespace is read-only. Ended Spaces disappear. And the identities you actually want are not fields.
Six endpoints, and what each one hands back
Spaces on X (formerly Twitter) are live audio rooms. If you want the product rather than the API, we have a separate walkthrough of how to use X Spaces. The API surface is smaller than the product by a long way.
| Endpoint | Returns | Billed as | Pagination |
|---|---|---|---|
GET /2/spaces/:id | One Space object | Space: Read $0.005 | n/a |
GET /2/spaces | Up to 100 Spaces by ids | $0.005 each | n/a |
GET /2/spaces/by/creator_ids | Spaces for up to 100 user_ids | $0.005 each | none at all |
GET /2/spaces/search | Up to 100 Spaces, default 100 | $0.005 each | none at all |
GET /2/spaces/:id/buyers | User objects | User: Read $0.010 each | pagination_token |
GET /2/spaces/:id/tweets | Post objects | Posts: Read $0.005 each | pagination_token |
Two things in that table are worth pausing on.
max_results defaults to 100 on search, on buyers and on shared Posts. Most v2 endpoints default to 10. So GET /2/spaces/:id/buyers with no parameters is a request to bill up to one dollar, and GET /2/spaces/search?query=ai with no parameters is up to fifty cents. The defaults are the maximums.
And there is no Spaces row on the Owned Reads table in X API pricing. Bookmarks, lists, likes, followers and your own Posts all drop to $0.001 when you read your own data through your own app. Spaces do not. Reading the Space you hosted yourself costs the same $0.005 as reading a stranger's.
host_ids is not a space.field
Here is X's Spaces search quickstart, verbatim:
curl "https://api.x.com/2/spaces/search?query=AI&\
space.fields=title,host_ids,participant_count,state&state=live" \
-H "Authorization: Bearer $BEARER_TOKEN"
And here is the complete space.fields enum from the live OpenAPI description at api.x.com/2/openapi.json, version 2.174:
created_at, ended_at, id, is_ticketed, lang, participant_count,
scheduled_start, started_at, state, subscriber_count, title, updated_at
Twelve values. No host_ids. No creator_id, speaker_ids, invited_user_ids or topic_ids either. Those five are the expansions enum, which is a different parameter.
This is not a stale sample that the SDKs have quietly corrected. Download xdk 0.10.6, X's own Python SDK, and xdk/spaces/client.py types space_fields as a Literal of exactly those twelve strings, with host_ids appearing only in the expansions literal. The official SDK's type checker rejects the call the official quickstart tells you to make. The lookup guide's "Response fields" table repeats the same mistake, listing host_ids and speaker_ids as fields to request.
Ask for expansions instead:
curl "https://api.x.com/2/spaces/1DXxyRYNejbKM?\
space.fields=title,participant_count,state,started_at&\
expansions=creator_id,host_ids,speaker_ids&\
user.fields=username,name" \
-H "Authorization: Bearer $BEARER_TOKEN"
Two smaller gaps sit next to this one. The Fields page, whose entire job is to list every *.fields parameter, has rows for Posts, Users, Media, Polls and Places and no row for space.fields. The Expansions page lists four Space expansions and omits topic_ids. And the Spaces introduction links four times to a "Spaces data dictionary" at data-dictionary/reference#space - an anchor that does not exist on that page, which contains example Post payloads and nothing about Spaces. The OpenAPI description is the only authoritative field list, which is exactly the pattern we hit in the X API bookmarks namespace.
On 22 November, the identities start billing
Expansion objects are free right now. They stop being free on 22 November 2026, at Post $0.005, User $0.010, and Media, Poll and Place $0.005 each. The detail is in our write-up of X API expansions.
Put that next to the section above and the arithmetic changes shape. Because host and speaker identities are reachable only through expansions, there is no unpaid path to them after 22 November. A single Space lookup that resolves a creator, two co-hosts and eight speakers goes from $0.005 to $0.005 plus eleven User reads, or $0.115. Deduplication is per 24-hour UTC window, so polling the same Space every 60 seconds for a two-hour show pays for those users once, not 120 times, but a discovery crawl across 100 distinct Spaces pays for every distinct participant.
topic_ids is the odd one out. Topics are not on the read rate card at all, and they were not in the expansion pricing list either, so an expansions=topic_ids request currently has no published price.
Spaces search is a substring match, not a query language
query on /2/spaces/search accepts up to 2,048 characters. It does almost nothing with them.
X staff answered this plainly on 20 November 2024, to a developer who could not understand why query=MAGA OR politics returned zero results while each word alone returned seven and eight: the endpoint "performs exact case-insensitive match of the specified search term," search operators "aren't supported like they are with the Search Tweets endpoints," and "if you want to make multiple queries, you will need to make separate requests for each."
So the practical shape of Spaces search is:
- One literal, case-insensitive substring, matched against the Space title only. Not the host's bio, not the description, not what is being said.
stateacceptslive,scheduledorall. There is noended.max_resultscaps at 100 and there is nopagination_token. Result 101 is unreachable. Permanently.- Every synonym you want is another request at up to $0.50.
A keyword-monitoring product therefore costs a multiple of what the docs imply. Ten tracked terms polled every five minutes is 2,880 requests a day, which fits inside 300 per 15 minutes but not inside most budgets.
Ended Spaces are unretrievable, and that breaks two endpoints
X documents this in one sentence on the introduction page: once a Space ends it "will no longer be available for retrieval using the Spaces endpoints." The forum shows what it feels like. A developer in August 2025 queried /2/spaces/by/creator_ids for an account that had definitely hosted Spaces and got meta.result_count: 0; looking the Space up by its own ID returned Not Found. A separate October 2025 report drew the same answer from X staff three days later: no Spaces for that user ID.
Follow that through to the two paginated endpoints. /2/spaces/:id/buyers and /2/spaces/:id/tweets are post-mortem tools by nature - you want them when the show is over. They are only callable while the Space is live. Retrospective Spaces analytics is not a thing you can build on this namespace.
The state field is also looser than it looks. The lookup guide documents three states including ended, and a developer reported back in October 2021 that ended exists but is only visible through lookup by ID. The 2.174 schema resolved this by giving state no enum at all: it is a bare string. Do not switch on it exhaustively.
The webhook is the only trigger that works
Spaces got exactly three changelog entries in five years: the August 2021 launch, the November 2021 addition of ticket buyers and Topics, and then nothing until 28 January 2026, when spaces.start and spaces.end arrived in the X Activity API at $0.005 per delivered event.
That third entry is the one that makes the namespace usable. You subscribe by User ID, get a push the moment a tracked account goes live, and then you have a window in which lookup, buyers and shared Posts all still answer. Poll-and-hope cannot work against a resource that deletes itself.
Note the gap in that list. February 2022 brought /2/spaces/:id/tweets with no changelog entry at all. It appeared in a forum announcement, along with subscriber_count, which counts people who set a reminder for a scheduled Space and - per that same announcement - "is only available to the creator of the Space," requiring OAuth 2.0 with space.read granted by that creator. The field sits in the public enum today with no note attached.
What the namespace still cannot do
- Create or control a Space. All six endpoints are GETs. No scheduling, no starting, no ending, no promoting a listener to speaker, no muting.
- Identify listeners.
participant_countis an aggregate that includes the hosts. X staff, February 2022: individual attendance is "not included," and an OAuth app cannot see whether a user joined. Still true at 2.174. - Find Spaces a user is speaking in. Only
by/creator_idsexists, so you can find Spaces someone hosted, never ones they joined as a speaker. A 2022 request for this went to the open-evolution repo and never shipped. - Read ticket data in practice.
/2/spaces/:id/buyersis the only Spaces endpoint with no app-only Bearer option, OAuth 2.0 user context only, and itsexternalDocsstill points at the deaddeveloper.twitter.com. X paused Ticketed Spaces in October 2022 and the developer changelog has never mentioned the product again.
One more oddity worth knowing before you plan a build: the rate-limits page lists GET /2/users/:id/following/spaces at 300/15min in its Users block. That path has no reference page, no mention in the Spaces namespace, and does not exist in the 2.174 description. Treat it as a ghost row, not a roadmap.
It is telling that the most serious Spaces tool in the forum right now does not use these endpoints at all. On 4 November 2026 a developer requested Public Utility access for a live Spaces reply viewer built on GET /2/tweets/search/stream and /2/tweets/search/recent, estimating $510 to $560 a month in reads. Spaces tooling in 2026 is still built out of Post search.
If what you actually wanted was reach
Most people who find this page are trying to turn Spaces into growth, and run into the fact that the API cannot see listeners, cannot see replays, and cannot see anything once the room closes. The part of the loop that does respond to automation is the Post and reply layer around a Space - the announcement, the live quote-posts, the recap thread.
That is what X-Autopilot does, and it does it from your own Mac in your own logged-in browser session rather than from a shared cloud IP pool, which is a smaller detection surface than a hosted scheduler, not a guarantee of anything. Browser automation of engagement on X is a gray area and we will not tell you otherwise: the API route is the sanctioned one, and X's Automation Rules are the document that governs the rest. Read them before you point any tool at an account you care about.
Frequently asked
Answers indexed by Google + AI assistants.
What are the X API Spaces endpoints?+
Six, all GET: /2/spaces/:id for one Space, /2/spaces for up to 100 IDs at once, /2/spaces/by/creator_ids for up to 100 creators, /2/spaces/search for keyword search, /2/spaces/:id/buyers for ticket buyers, and /2/spaces/:id/tweets for Posts shared in a Space. Five of the six accept an app-only Bearer token. The buyers endpoint is OAuth 2.0 user context only. All six are rate limited at 300 requests per 15 minutes per app and per user, and creator_ids adds a 1 request per second ceiling.
Why does space.fields=host_ids return an error?+
Because host_ids is not in the space.fields enum. At API version 2.174 that enum holds created_at, ended_at, id, is_ticketed, lang, participant_count, scheduled_start, started_at, state, subscriber_count, title and updated_at. The five ID lists - creator_id, host_ids, invited_user_ids, speaker_ids and topic_ids - are expansions, not fields. X's own Spaces search quickstart and Spaces lookup guide both pass host_ids as a field anyway, and the official Python SDK xdk 0.10.6 encodes the restrictive list as a type literal, so the SDK rejects the call X's docs tell you to make.
Can the X API search for Spaces that already ended?+
No. The state parameter on /2/spaces/search accepts only live, scheduled or all, and a Space stops being retrievable once it ends. Lookup by ID returns Not Found and /2/spaces/by/creator_ids returns result_count 0 for a creator whose Spaces are all over. There is no archive endpoint and no replay lookup, so anything you want from a Space has to be captured while it is still live.
How much does an X API Spaces read cost?+
Space: Read is $0.005 per resource on the pay-per-use rate card, and there is no Spaces row on the Owned Reads table, so reading your own Spaces costs the same as reading anyone else's. The buyers endpoint returns Users, which bill at $0.010 each, and the shared-Posts endpoint returns Posts at $0.005 each. Both default max_results to 100, so an unparameterised call to buyers can bill $1.00.
Can I get the list of people who listened to my Space?+
No. participant_count is an aggregate that includes hosts, and there is no per-listener data anywhere in the Space object. X staff answered this directly on 24 February 2022: individual attendance listings are not included, and an OAuth app cannot tell whether a given user joined a Space or for how long. Nothing in the 2.174 schema has changed that.
Is there a webhook for Spaces?+
Yes, and it is the most useful part of the namespace. X added spaces.start and spaces.end to the X Activity API on 28 January 2026. You subscribe by User ID and get told in real time when that account starts or ends a Space, at $0.005 per delivered event. Because ended Spaces disappear from lookup, this is the only reliable way to know a Space happened in time to collect anything from it.
- X developer docs - 'Spaces endpoints on the X API v2': the 'What's currently available' table listing four lookup endpoints plus search, the 14-day scheduling window, and the statement that Spaces 'will no longer be available for retrieval using the Spaces endpoints' once ended (accessed 6 November 2026)
- X live OpenAPI description at api.x.com/2/openapi.json, version 2.174: six /2/spaces paths, all GET; the space.fields enum of 12 values with no creator_id, host_ids, speaker_ids, invited_user_ids or topic_ids; the five-value expansions enum; query maxLength 2048 and no pagination_token on /2/spaces/search; and OAuth2UserToken as the only security scheme on /2/spaces/{id}/buyers (accessed 6 November 2026)
- X developer docs - 'Quickstart' for Spaces search: the cURL, Python and JavaScript examples all passing space.fields=title,host_ids,participant_count,state (accessed 6 November 2026)
- xdk 0.10.6 (official X Python SDK, PyPI): xdk/spaces/client.py encoding space_fields as a Literal of the same 12 values with host_ids, creator_id, speaker_ids, invited_user_ids and topic_ids present only in the expansions Literal (downloaded 6 November 2026)
- X developer docs - 'Pricing': Space: Read at $0.005 per resource, no Spaces entry on the Owned Reads table, and spaces.start and spaces.end at $0.005 per delivered webhook event (accessed 6 November 2026)
- X developer docs - 'X API Rate Limits': the 'Spaces (6 endpoints)' block at 300/15min with a 1/sec ceiling on creator_ids, plus a GET /2/users/:id/following/spaces row in the Users block for a path that does not exist in the 2.174 description (accessed 6 November 2026)
- X developer changelog: 'Launch of Spaces endpoints' (25 August 2021), 'Additions to Spaces endpoints' adding ticket buyers and Topics (15 November 2021), and 'Spaces events in the X Activity API' adding spaces.start and spaces.end (28 January 2026) - the only three Spaces entries in the changelog (accessed 6 November 2026)
- X Developers forum - 'Can't query multiple keywords with endpoint /2/spaces/search': X staff replying on 20 November 2024 that the endpoint 'performs exact case-insensitive match of the specified search term', that 'search operators (i.e. OR) aren't supported like they are with the Search Tweets endpoints', and that multiple keywords 'will need separate requests for each'
- X Developers forum - 'Bringing Tweets shared in a Space and RSVP count to the Spaces endpoints': the 17 February 2022 launch of /2/spaces/:id/tweets and of subscriber_count, stating the field 'is only available to the creator of the Space' and requires OAuth 2.0 with space.read granted by that creator
- X Developers forum - 'Spaces Tracking': X staff confirming on 24 February 2022 that individual attendance listings are 'not included' in the Spaces API and that an OAuth app cannot see whether a user joined a Space or for how long
- X Developers forum - 'Get data on endend Spaces' (20 August 2025): /2/spaces/by/creator_ids returning meta.result_count 0 for an account that had hosted Spaces, and lookup by the Space ID returning a Not Found error, for Spaces that had ended
- Engadget, 'Twitter drops Ticketed Spaces to focus on other live audio features', 28 October 2022 - press reporting of the pause; the developer changelog has carried no Ticketed Spaces entry since 15 November 2021 and /2/spaces/:id/buyers is still in the 2.174 description
Product designer and indie hacker. Runs the agent on his own X account every day and writes up what the data shows, including when it's inconvenient.
Follow on X →