> ## Documentation Index
> Fetch the complete documentation index at: https://docs.xquik.com/llms.txt
> Use this file to discover all available pages before exploring further.

# 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.

<Panel>
  <Tabs defaultTabIndex={0} sync={false}>
    <Tab title="200" id="response-x-get-space-200">
      ```json theme={null}
      {
        "space": {
          "id": "1OGwblLjnQMKB",
          "title": "Extending the Network to the Edge",
          "state": "Ended",
          "startedAt": "2026-03-11T17:00:26.227Z",
          "endedAt": "2026-03-11T17:49:29.190Z"
        }
      }
      ```
    </Tab>

    <Tab title="400" id="response-x-get-space-400">
      ```json theme={null}
      {
        "error": "invalid_input",
        "message": "Invalid input. Check the request body."
      }
      ```
    </Tab>

    <Tab title="401" id="response-x-get-space-401">
      ```json theme={null}
      {
        "error": "unauthenticated",
        "message": "Authentication required. Provide a valid API key or bearer token."
      }
      ```
    </Tab>

    <Tab title="402" id="response-x-get-space-402">
      ```json theme={null}
      {
        "error": "insufficient_credits",
        "message": "Insufficient credits. Top up or subscribe to continue."
      }
      ```
    </Tab>

    <Tab title="404" id="response-x-get-space-404">
      ```json theme={null}
      {
        "error": "not_found",
        "message": "Resource not found."
      }
      ```
    </Tab>

    <Tab title="424" id="response-x-get-space-424">
      ```json theme={null}
      {
        "error": "x_api_unavailable",
        "message": "X data source temporarily unavailable. Try again later."
      }
      ```
    </Tab>

    <Tab title="429" id="response-x-get-space-429">
      ```json theme={null}
      {
        "error": "rate_limit_exceeded",
        "message": "Too many requests. Try again later.",
        "retryAfter": 60
      }
      ```
    </Tab>

    <Tab title="502" id="response-x-get-space-502">
      ```json theme={null}
      {
        "error": "x_api_unavailable",
        "message": "X data source temporarily unavailable. Try again later."
      }
      ```
    </Tab>

    <Tab title="503" id="response-x-get-space-503">
      ```json theme={null}
      {
        "error": "x_api_unavailable",
        "message": "Xquik is busy right now. Retry shortly."
      }
      ```
    </Tab>
  </Tabs>
</Panel>

<blockquote className="agent-llms-directive">
  For the complete documentation index, see <a href="/llms.txt">llms.txt</a>.
</blockquote>

<Callout icon="coins" color="#5c3327">
  **1 credit per call** · [All plans](https://xquik.com/#pricing) from \$0.00012/credit · Direct [MPP](/mpp/machine-payments-protocol): USD 0.00015 per call
</Callout>

Get Space returns one public X Space as X shows it: live, scheduled, or ended.
The endpoint is `GET /api/v1/x/spaces/{id}`.

<CodeGroup>
  ```bash cURL theme={null}
  curl https://xquik.com/api/v1/x/spaces/1OGwblLjnQMKB \
    -H "x-api-key: xq_your_api_key_here" | jq
  ```

  ```javascript Node.js theme={null}
  const spaceId = "1OGwblLjnQMKB";
  const response = await fetch(`https://xquik.com/api/v1/x/spaces/${spaceId}`, {
    headers: { "x-api-key": "xq_your_api_key_here" },
  });
  const data = await response.json();
  if (!response.ok) throw new Error(JSON.stringify(data));
  const { space } = data;
  const spaceRow = {
    space_id: space.id,
    space_title: space.title ?? null,
    space_state: space.state ?? null,
    started_at: space.startedAt ?? null,
    ended_at: space.endedAt ?? null,
    live_listeners: space.totalLiveListeners ?? null,
    replay_listeners: space.totalReplayWatched ?? null,
    host_usernames: space.admins.map((host) => host.username),
    speaker_usernames: space.speakers.map((speaker) => speaker.username),
  };
  process.stdout.write(`${JSON.stringify(spaceRow)}\n`);
  ```

  ```python Python theme={null}
  import json
  import requests

  space_id = "1OGwblLjnQMKB"
  response = requests.get(
      f"https://xquik.com/api/v1/x/spaces/{space_id}",
      headers={"x-api-key": "xq_your_api_key_here"},
  )
  data = response.json()
  if not response.ok:
      raise RuntimeError(data)
  space = data["space"]
  space_row = {
      "space_id": space["id"],
      "space_title": space.get("title"),
      "space_state": space.get("state"),
      "started_at": space.get("startedAt"),
      "ended_at": space.get("endedAt"),
      "live_listeners": space.get("totalLiveListeners"),
      "replay_listeners": space.get("totalReplayWatched"),
      "host_usernames": [host["username"] for host in space["admins"]],
      "speaker_usernames": [speaker["username"] for speaker in space["speakers"]],
  }
  print(json.dumps(space_row))
  ```
</CodeGroup>

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](/api-reference/x/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](/api-reference/x/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](/api-reference/x/twitter-profile-lookup) 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](/api-reference/x/get-broadcast).

## Path parameters

<ParamField path="id" type="string" required>
  X Space ID, or the URL-encoded Space URL, such as `x.com/i/spaces/1OGwblLjnQMKB`.
</ParamField>

## Headers

<ParamField header="x-api-key" type="string">
  Full account key. Sessions and OAuth also work.
</ParamField>

<ParamField header="Authorization" type="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.
</ParamField>

## Response

### 200 OK

<ResponseField name="space" type="object">
  The Space.
  **Space object fields.**

  <ResponseField name="id" type="string">
    Space ID.
  </ResponseField>

  <ResponseField name="title" type="string">
    Space title.
  </ResponseField>

  <ResponseField name="state" type="string">
    `NotStarted` (scheduled), `Running` (live), `Ended`, `Canceled` (scheduled, never started) or
    `TimedOut` (closed by X, not by its host).
  </ResponseField>

  <ResponseField name="createdAt" type="string">
    When the Space was made.
  </ResponseField>

  <ResponseField name="scheduledStart" type="string">
    When the Space was set to start.
  </ResponseField>

  <ResponseField name="startedAt" type="string">
    When the Space went live.
  </ResponseField>

  <ResponseField name="endedAt" type="string">
    When the Space ended.
  </ResponseField>

  <ResponseField name="updatedAt" type="string">
    When X last changed the Space.
  </ResponseField>

  <ResponseField name="totalLiveListeners" type="number">
    Accounts that listened live.
  </ResponseField>

  <ResponseField name="totalReplayWatched" type="number">
    Accounts that played the recording.
  </ResponseField>

  <ResponseField name="participantCount" type="number">
    Accounts in the Space now, while it is live.
  </ResponseField>

  <ResponseField name="isAvailableForReplay" type="boolean">
    Whether X offers a recording.
  </ResponseField>

  <ResponseField name="isAvailableForClipping" type="boolean">
    Whether listeners may clip the Space.
  </ResponseField>

  <ResponseField name="isLocked" type="boolean">
    Whether the host locked the Space.
  </ResponseField>

  <ResponseField name="isEmployeeOnly" type="boolean">
    Whether only X employees may join.
  </ResponseField>

  <ResponseField name="disallowJoin" type="boolean">
    Whether X lets no more accounts join.
  </ResponseField>

  <ResponseField name="noIncognito" type="boolean">
    Whether anonymous listening is off.
  </ResponseField>

  <ResponseField name="contentType" type="string">
    Audio or video kind, as X names it.
  </ResponseField>

  <ResponseField name="conversationControls" type="number">
    X's code for who may speak.
  </ResponseField>

  <ResponseField name="maxAdminCapacity" type="number">
    Most hosts and co-hosts the Space allows.
  </ResponseField>

  <ResponseField name="mediaKey" type="string">
    X's media key for the Space's audio.
  </ResponseField>

  <ResponseField name="mentionedUserIds" type="string[]">
    IDs of the accounts the host tagged.
  </ResponseField>

  <ResponseField name="tweetId" type="string">
    ID of the post that announces the Space.
  </ResponseField>

  <ResponseField name="tweet" type="object">
    The post that announces the Space, with the fields of [Get Tweet](/api-reference/x/get-tweet).
    Present only when X names the post.
  </ResponseField>

  <ResponseField name="creator" type="object">
    Profile of the account that made the Space. It uses the fields of [Get
    User](/api-reference/x/twitter-profile-lookup).
  </ResponseField>

  <ResponseField name="admins" type="object[]">
    Hosts and co-hosts. Each has `id`, `username` and `name`, plus `profilePicture`, badge fields and
    `joinedAt` when X sends them.
  </ResponseField>

  <ResponseField name="speakers" type="object[]">
    Accounts X lists as speakers, with the same fields as `admins`.
  </ResponseField>

  <ResponseField name="listeners" type="object[]">
    Accounts X lists as listeners, with the same fields as `admins`.
  </ResponseField>

  <ResponseField name="sharings" type="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](/api-reference/x/twitter-profile-lookup). `tweet` is
    the post, with the fields of [Get Tweet](/api-reference/x/get-tweet). X leaves out `tweet` when it
    no longer shows the post.
  </ResponseField>
</ResponseField>

```json theme={null}
{
  "space": {
    "id": "1OGwblLjnQMKB",
    "title": "Extending the Network to the Edge",
    "state": "Ended",
    "startedAt": "2026-03-11T17:00:26.227Z",
    "endedAt": "2026-03-11T17:49:29.190Z",
    "totalLiveListeners": 841,
    "totalReplayWatched": 609,
    "creator": {
      "id": "951329744804392960",
      "username": "solana",
      "name": "Solana"
    },
    "admins": [
      {
        "id": "951329744804392960",
        "username": "solana",
        "name": "Solana"
      }
    ],
    "speakers": [],
    "listeners": []
  }
}
```

### 400 Invalid Space ID

```json theme={null}
{
  "error": "invalid_space_id",
  "message": "Send a Space ID or URL, such as x.com/i/spaces/1OGwblLjnQMKB."
}
```

The path is not a Space ID or a Space URL. The request costs nothing.

### 401 Unauthenticated

```json theme={null}
{ "error": "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

```json theme={null}
{ "error": "not_found", "message": "Resource not found." }
```

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

### 502 X API unavailable

```json theme={null}
{ "error": "x_api_unavailable" }
```

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

### 503 Service busy

```json theme={null}
{ "error": "x_api_unavailable" }
```

X failed to return the Space, or Xquik is busy. Retry after a short delay. The request costs nothing.

### 429 Rate limit exceeded

```json theme={null}
{ "error": "rate_limit_exceeded", "retryAfter": 60 }
```

You exceeded your tier rate limit. Wait for the `Retry-After` header before retrying.

### 424 Dependency failed

```json theme={null}
{ "error": "x_api_unavailable" }
```

The normalized v1 response contract can return 424 when the read service is unavailable.

## Twitter Spaces API questions

### How do I get a Twitter Space by its link?

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.

<Note>
  **Next steps.** [Get Space replay](/api-reference/x/space-replay) for an ended Space's recording, [Search Spaces](/api-reference/x/search-spaces) to find more Spaces, [Get User](/api-reference/x/twitter-profile-lookup) for a host's full profile, or [Get broadcast](/api-reference/x/get-broadcast) for a live video.
</Note>

<div className="related-api-links">
  <Accordion title="Related tweet, reply & media APIs" icon="link">
    * Tweets: [Get tweet](/api-reference/x/get-tweet) · [Batch tweets](/api-reference/x/batch-tweets) · [Tweet thread](/api-reference/x/tweet-thread) · [Hidden replies](/api-reference/x/tweet-hidden-replies) · [Translate tweet](/api-reference/x/tweet-translation) · [Embed tweet](/api-reference/x/tweet-embed) · [Resolve links](/api-reference/x/resolve-links) · [Tweet subtitles](/api-reference/x/tweet-subtitles) · [X Article](/api-reference/x/get-article)
    * Engagement: [Tweet replies](/api-reference/x/tweet-replies) · [Quote tweets](/api-reference/x/tweet-quotes) · [Likers](/api-reference/x/favoriters) · [Reposters](/api-reference/x/retweeters) · [Check repost](/api-reference/x/tweet-repost-check)
    * Profiles: [User tweets](/api-reference/x/user-tweets) · [Batch user tweets](/api-reference/x/batch-user-tweets) · [User replies](/api-reference/x/user-replies) · [User likes](/api-reference/x/user-likes) · [User media](/api-reference/x/user-media) · [User highlights](/api-reference/x/user-highlights) · [User articles](/api-reference/x/user-articles)
    * Feeds: [List tweets](/api-reference/x/list-tweets) · [Trends](/api-reference/x/trends) · [Trend locations](/api-reference/x/trend-locations) · [Search Spaces](/api-reference/x/search-spaces) · [Get Space](/api-reference/x/get-space) · [Space replay](/api-reference/x/space-replay) · [Get broadcast](/api-reference/x/get-broadcast) · [Hashflags](/api-reference/x/hashflags) · [Search places](/api-reference/x/search-places) · [Download media](/api-reference/x/download-media)
  </Accordion>
</div>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.