Skip to main content
The Spaces Search endpoint lets you search for live or scheduled Spaces by keyword. Find Spaces about topics of interest.

Overview

Keyword search

Search Spaces by title

Discover Spaces

Find live and upcoming Spaces

Endpoint

MethodEndpointDescription
GET/2/spaces/searchSearch for Spaces

Parameters

ParameterDescription
querySearch query (required)
stateFilter by live or scheduled
space.fieldsAdditional Space fields
expansionsRelated objects to include

Example request

curl "https://api.x.com/2/spaces/search?\
query=AI&\
state=live&\
space.fields=title,host_ids,participant_count" \
  -H "Authorization: Bearer $BEARER_TOKEN"

Example response

{
  "data": [
    {
      "id": "1DXxyRYNejbKM",
      "state": "live",
      "title": "Discussing AI and the Future",
      "host_ids": ["1234567890"],
      "participant_count": 245
    }
  ],
  "meta": {
    "result_count": 1
  }
}

Getting started

Prerequisites

Quickstart

Search for your first Space

Spaces lookup

Look up Spaces by ID

API Reference

Full endpoint documentation