> ## Documentation Index
> Fetch the complete documentation index at: https://x-preview-mintlify-24fef6d1.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Spaces Lookup

> The Spaces lookup endpoints let you retrieve information about live or scheduled Spaces. Reference for the X API v2 standard tier covering lookup.

export const Button = ({href, children}) => {
  return <div className="not-prose">
    <a href={href}>
      <button className="x-btn">
        <span>{children}</span>
        <svg width="3" height="24" viewBox="0 -9 3 24" class="h-6 rotate-0 overflow-visible"><path d="M0 0L3 3L0 6" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"></path></svg>
      </button>
    </a>
  </div>;
};

The Spaces lookup endpoints let you retrieve information about live or scheduled Spaces. Look up Spaces by their ID or find Spaces created by specific users.

## Overview

<CardGroup cols={2}>
  <Card title="By ID" icon="https://mintcdn.com/x-preview-mintlify-24fef6d1/40mVJzgnWfhmY7ZZ/icons/xds/icon-microphone.svg?fit=max&auto=format&n=40mVJzgnWfhmY7ZZ&q=85&s=3ac1c9bd2c7f08e499f73c4bcab3f388" width="24" height="24" data-path="icons/xds/icon-microphone.svg">
    Get details for a specific Space
  </Card>

  <Card title="Multiple Spaces" icon="microphone-lines">
    Look up multiple Spaces at once
  </Card>

  <Card title="By creator" icon="https://mintcdn.com/x-preview-mintlify-24fef6d1/40mVJzgnWfhmY7ZZ/icons/xds/icon-person.svg?fit=max&auto=format&n=40mVJzgnWfhmY7ZZ&q=85&s=780081f0acc89c08408eff02894d7067" width="24" height="24" data-path="icons/xds/icon-person.svg">
    Find Spaces by their hosts
  </Card>

  <Card title="Buyers" icon="ticket">
    Get users who purchased tickets
  </Card>
</CardGroup>

***

## Endpoints

| Method | Endpoint | Description |
| :- | :- | :- |
| GET | [`/2/spaces/:id`](/x-api/spaces/get-space-by-id) | Get Space by ID |
| GET | [`/2/spaces`](/x-api/spaces/get-spaces-by-ids) | Get Spaces by IDs |
| GET | [`/2/spaces/by/creator_ids`](/x-api/spaces/get-spaces-by-creator-ids) | Get Spaces by creator user IDs |
| GET | [`/2/spaces/:id/buyers`](/x-api/spaces/get-space-ticket-buyers) | Get ticket buyers for a Space |
| GET | [`/2/spaces/:id/tweets`](/x-api/spaces/get-space-posts) | Get Posts shared in a Space |

***

## Response fields

By default, the response includes `id` and `state`. Request additional fields:

| Field | Description |
| :- | :- |
| `title` | Space title |
| `host_ids` | Host user IDs |
| `speaker_ids` | Speaker user IDs |
| `participant_count` | Number of participants |
| `scheduled_start` | Scheduled start time |
| `started_at` | Actual start time |
| `ended_at` | End time |
| `is_ticketed` | Whether Space has tickets |

### Space states

| State | Description |
| :- | :- |
| `live` | Currently active |
| `scheduled` | Scheduled for future |
| `ended` | Has ended |

***

## Example request

```bash theme={null}
curl "https://api.x.com/2/spaces/1DXxyRYNejbKM?\
space.fields=title,host_ids,participant_count,scheduled_start,state" \
  -H "Authorization: Bearer $BEARER_TOKEN"
```

***

## Getting started

<Note>
  **Prerequisites**

  * An approved [developer account](https://developer.x.com/en/portal/petition/essential/basic-info)
  * A [Project and App](/resources/fundamentals/developer-apps) in the Developer Console
  * Your App's [keys and tokens](/resources/fundamentals/authentication)
</Note>

<CardGroup cols={2}>
  <Card title="Quickstart" icon="https://mintcdn.com/x-preview-mintlify-24fef6d1/HazjhzcnQyryvfGR/icons/xds/icon-rocket.svg?fit=max&auto=format&n=HazjhzcnQyryvfGR&q=85&s=d0f5cef99b2c696bbfb49fa10afdd62f" href="/x-api/spaces/lookup/quickstart" width="24" height="24" data-path="icons/xds/icon-rocket.svg">
    Make your first Spaces lookup request
  </Card>

  <Card title="Search Spaces" icon="https://mintcdn.com/x-preview-mintlify-24fef6d1/Y9anV6Yuzgh5cdxI/icons/xds/icon-search.svg?fit=max&auto=format&n=Y9anV6Yuzgh5cdxI&q=85&s=390162fcdf84bf652d239618065e59df" href="/x-api/spaces/search/introduction" width="24" height="24" data-path="icons/xds/icon-search.svg">
    Find Spaces by keyword
  </Card>

  <Card title="API Reference" icon="https://mintcdn.com/x-preview-mintlify-24fef6d1/Rr7J7_M_U1YKwpT1/icons/xds/icon-code.svg?fit=max&auto=format&n=Rr7J7_M_U1YKwpT1&q=85&s=91f901377ed7f56087005ca8f2202ae3" href="/x-api/spaces/space-lookup-by-space-id" width="24" height="24" data-path="icons/xds/icon-code.svg">
    Full endpoint documentation
  </Card>

  <Card title="Sample code" icon="github" href="https://github.com/xdevplatform/Twitter-API-v2-sample-code">
    Working code examples
  </Card>
</CardGroup>
