Docs
Space details
Space details
One X Space by ID: title, state, host and participants, and whether a replay is available.
GET
/spaces/{spaceId}Draft. The parameters on this page have not been checked against the API code yet. Make a test call before you build on it.
Parameters
spaceIdpath · string · requiredSpace ID, the letters and digits at the end of the Space URL (x.com/i/spaces/<spaceId>). Up to 32 characters.
Notes
- No simple format: with format=simple the response is the same as without it.
Example request
curl 'https://api.twittrapi.com/spaces/1YqKDqWqdPLsV' \
--header 'X-API-KEY: YOUR_API_KEY'import httpx
# No SDK method for this endpoint yet, so this is a plain HTTP call.
resp = httpx.get(
"https://api.twittrapi.com/spaces/1YqKDqWqdPLsV",
headers={"X-API-KEY": "YOUR_API_KEY"},
timeout=60,
)
data = resp.json()import { TwittrAPI } from "twittrapi";
const client = new TwittrAPI({ apiKey: process.env.TWITTRAPI_API_KEY });
// No wrapper method for this endpoint yet; client.get() sends the same authenticated GET.
const data = await client.get({
path: "/spaces/1YqKDqWqdPLsV",
});curl 'https://twitter-aio.p.rapidapi.com/spaces/1YqKDqWqdPLsV' \
--header 'x-rapidapi-key: YOUR_RAPIDAPI_KEY' \
--header 'x-rapidapi-host: twitter-aio.p.rapidapi.com'Base URL https://api.twittrapi.com, key in the X-API-KEY header. Python and Node.js use the official SDKs.
Response
Raw JSON of X's AudioSpaceById query.
Example response coming soon.
In the raw format, field names and nesting come from X and can change without notice. See Response format.
Errors
- 422spaceId is not letters and digits, or longer than 32 characters.
Errors every endpoint can return (401, 402, 403, 404, 408, 409, 429, 5xx), and which of them are charged, are on the Errors page. Calls that fail with 400, 407, 408, 409 or a 5xx error are refunded.