Ready to go to space?
Today, we’re introducing new Spaces endpoints and a new top level Spaces resource to the Twitter API v2.
These endpoints will enable you to build solutions to help people discover interesting Spaces more easily, and to help Hosts measure the performance of their Spaces. You will be able to look up Spaces using criteria like Space ID or user ID, or using keywords, hashtags, or @ mention.
We’re introducing a new top-level Spaces resource to the Twitter API v2 alongside Tweets and users. Spaces are a new way to communicate, and the data associated with a Space is significantly different from a Tweet; with a new resource object, you can use and select fields who only apply to Spaces, while retaining the flexibility on using expansions to return other resources (such as user objects) in the same request.
What’s launching?
With today’s launch of Spaces lookup and Spaces search, we hope to enable you to build tools and solutions that help people on (and off) Twitter find interesting and relevant Spaces more easily. This will also benefit Spaces hosts by making their conversations more discoverable and bringing more engaged listeners into their Spaces.
As part of today’s launch, you will be able to build tools using new endpoints to help your users discover live and scheduled Spaces. You can also check participation details, such as attendance count, in real time.
The Space data dictionary contains an initial set of metadata to help you understand public metadata and metrics associated with an active Space, for example: participant count, list of Speakers and Hosts (including Co-hosts), detected language, start time, scheduled start time, creation time, status (live or scheduled), and ticketed status.
The Spaces lookup endpoints enable you to return Spaces using numerous criteria:
- One endpoint allows you to look up a single Space by ID; just like the Tweets and users lookup endpoints, you can also retrieve up to 100 Spaces in the same request. You can use these endpoints to get up-to-date details about one or more Spaces, share links to these Spaces outside of Twitter, or add a link to an upcoming Spaces to a calendar.
- You can also look up live and upcoming Spaces created by one or more people, using one or more user IDs. This endpoint is useful to check if a particular host has upcoming Spaces, even if you don’t necessarily follow them.
The search Spaces endpoint allows you to search live and upcoming Spaces by keyword. You can additionally filter Spaces by their state in order to return only scheduled Spaces, or only live Spaces (or both, which is the default option). The search Spaces endpoint is particularly useful to let your users explore what’s available on Spaces.
What can you build
Over the last several weeks, we had the opportunity to chat with many of you in the weekly Spaces we hosted on these endpoints. Your continuous feedback loop throughout the development of these endpoints helped us better understand what’s important for creators, listeners, and developers. We learned it’s important for you to have tools and functionality to help people discover interesting Spaces. With this initial set of endpoints, you can build discovery experiences based on criteria you define; this will help users (including users outside of Twitter) to discover live and upcoming Spaces of interest.
We also heard feedback that you’d like data to help Spaces Hosts understand the performance of their Spaces. Today, the Spaces object will return a total participant count you can use to create visualizations and reports for Hosts. You can use this field in addition to the user’s public metrics to surface how a creator’s follower count changes as a result of hosting Spaces.
We want to enable you to build and shape the future of Spaces with these endpoints. As a starting point, each endpoint will have a rate limit of 300 requests per 15-minute window at the app level. If you are interested in enabling user authentication and limits, please let us know.
What’s next?
Today is just the first of two planned releases focused on opening up Spaces to all developers.
For the next release, we’re exploring ways to enable you to build specifically for Spaces Hosts. We’ve heard directly from you, and from many Spaces Hosts who want tools and functionality to help maximize their audience and to measure their performance. We’re also exploring a set of endpoints that will enable developers to create and manage reminders for upcoming Spaces. You can stay up to date with what we have planned in our roadmap.
Getting started
The Spaces endpoints are now available to all developers building with the Twitter API v2. Get started today and let us know what you’re building using #TwitterAPI.