x/
space

Use the X Spaces API to look up Spaces from their links and get the title, status, start time, hosts, speakers, live listener total and replay plays for scheduled, live or ended Spaces.

X Spaces API

Space link input
Hosts and speakers
Listener and replay counts
0.7 credits / result
Ready
Ready

Enter parameters and send a request. The task status and normalized results will appear here.

README

By SocQ · Updated

X Spaces

X Spaces, formerly Twitter Spaces, are live audio rooms on X, each with a title, a status that moves from scheduled to live to ended, a main host with any co-hosts, the speakers brought on stage, and counts of the people who listened live and the times the recording was replayed. Those details let you report on the reach of a single Space, follow a recurring show episode by episode and see which voices keep turning up on stage in a field.

X Spaces API Features

  • Any Space link, at any stageSubmit https://x.com/i/spaces/<id> links to the X Spaces API for Spaces that are scheduled, live or already over, and each one returns a single row.
  • Status and timingstatus reads scheduled, live, ended or canceled, with scheduled_start_at for the planned start and published_at for when the Space was created.
  • Everyone on stageauthor is the main host, hosts lists the host and co-hosts, and speakers lists the accounts invited to speak, each with id, username, name, avatar and verified flag.
  • Live and replay audiencemetrics.live_listeners_count is the total number of people who listened while the Space was live, and metrics.replay_views_count counts plays of the recording afterwards.
  • Replay availabilityis_replay_available shows whether the Space can still be played back on X once it has ended.

X Spaces API Parameters

ParametersRequiredDescription
urlsRequiredX Space links in the form https://x.com/i/spaces/<space_id>, one per line; scheduled, live and ended Spaces are all accepted.

How to Use the X Spaces API

Submit Space links to the X Spaces API and read one row per Space.

  1. POST {"urls": ["https://x.com/i/spaces/1OdWgBerXWvaQz"]} to /v1/x/space.
  2. Poll GET /v1/tasks/{task_id} until status is succeeded.
  3. Read each Space from results.items; for long batches, keep passing results.next_cursor while has_more is true.
curl -X POST "https://api.socq.ai/v1/x/space" \
  -H "Authorization: Bearer $SOCQ_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"urls":["https://x.com/i/spaces/1OdWgBerXWvaQz"]}'

# hosts repeats the main host from author and adds any co-hosts.

X Spaces API Use Cases

  • Reporting on a Space you hosted or sponsored: Put live_listeners_count, replay_views_count and the speaker lineup of each Space into a post-event report for a client or sponsor.
  • Tracking a competitor's audio show: Collect the links of a rival's recurring Spaces and compare listeners, replays and guests from one episode to the next.
  • Building a list of active speakers in a niche: Gather the speakers and co-hosts of the Spaces in your field and count how often each account appears on stage.
  • Checking a scheduled Space's lineup: Read scheduled_start_at and hosts before an event, then look the Space up again to see whether its status became ended or canceled.

X Spaces API Pro Tips

  • Collect a Space again with the X Spaces API once status is ended to record its final live listener total, and store replay_views_count with collected_at, since replays keep adding plays while is_replay_available is true.
  • Count co-hosts as hosts minus the author entry; the main host appears in both fields.
  • Key speakers on id when you combine several Spaces, so the same person is counted once even after a username change.

Beyond the X Spaces API, use these APIs when you need a different type of public X data.

  • Twitter Tweet Scraper API — Retrieve public post text, authors, engagement, media, hashtags, mentions, and conversation relationships from x.com or twitter.com status URLs.
  • Twitter Profile Scraper API — Retrieve public account identity, biographies, avatars, cover images, account status, and visible audience statistics by username.
  • Twitter User Tweets Scraper API — Collect recent public posts, authors, media, hashtags, mentions, and engagement by username with replies excluded.
  • X Post Quotes API — Collect public quote posts for known status URLs with commentary, authors, engagement, media, timestamps, and source-post context.
  • Twitter Mentions API — Collect public posts mentioning a specified account.
  • X Account Location API — Look up the country an account is based in, how it connects to X, its join date and username changes.

Explore other platforms

Combine X data with public data from other supported social platforms.

X Spaces API — FAQ

X Spaces API is a programmatic interface for looking up X Spaces, the live audio rooms on X, from their /i/spaces/ links. It returns each Space's title, status, scheduled start, main host, co-hosts, speakers, live listener total, replay plays and replay availability.

Yes. metrics.live_listeners_count is the total number of people who listened while the Space was live, and metrics.replay_views_count is how many times the recording was played afterwards.

No. Listeners are reported as counts. The named accounts in a result are the main host, the co-hosts and the speakers.

No. The result describes the Space and its audience; is_replay_available tells you whether the recording can be played on X.

When none of the submitted Spaces can be found, the task fails and is refunded in full. When only some are missing, the rest are returned as usual.