# Space details

`GET https://api.twittrapi.com/spaces/{spaceId}`

One X Space by ID: title, state, host and participants, and whether a replay is available.

HTML page: https://www.twittrapi.com/docs/reference/spaces-spaceid

> Draft: the parameters of this endpoint were not yet checked against the backend.

## Parameters

| Name | In | Type | Required | Default | Description |
| --- | --- | --- | --- | --- | --- |
| `spaceId` | path | string | yes |  | Space 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.

## Response

Raw JSON of X's AudioSpaceById query.

## Errors

| Status | When |
| --- | --- |
| 422 | spaceId is not letters and digits, or longer than 32 characters. |

Shared errors (401 missing key, 402 no balance, 429 rate limit, 5xx) are listed on https://www.twittrapi.com/docs/helpful-infos/error-handling. Calls that fail with 400, 407, 408, 409 or a 5xx error are refunded.

## Example request

curl:

```bash
curl 'https://api.twittrapi.com/spaces/1YqKDqWqdPLsV' \
  --header 'X-API-KEY: YOUR_API_KEY'
```

Python:

```python
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()
```

Node.js:

```js
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",
});
```

RapidAPI:

```bash
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'
```
