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.Documentation Index
Fetch the complete documentation index at: https://docs.x.com/llms.txt
Use this file to discover all available pages before exploring further.
Overview
By ID
Get details for a specific Space
Multiple Spaces
Look up multiple Spaces at once
By creator
Find Spaces by their hosts
Buyers
Get users who purchased tickets
Endpoints
| Method | Endpoint | Description |
|---|---|---|
| GET | /2/spaces/:id | Get Space by ID |
| GET | /2/spaces | Get Spaces by IDs |
| GET | /2/spaces/by/creator_ids | Get Spaces by creator user IDs |
| GET | /2/spaces/:id/buyers | Get ticket buyers for a Space |
| GET | /2/spaces/:id/tweets | Get Posts shared in a Space |
Response fields
By default, the response includesid 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
Getting started
Prerequisites
- An approved developer account
- A Project and App in the Developer Console
- Your App’s keys and tokens
Quickstart
Make your first Spaces lookup request
Search Spaces
Find Spaces by keyword
API Reference
Full endpoint documentation
Sample code
Working code examples