Twitter introduces new Spaces endpoints for its API
As announced in one of Twitter’s forums, these new endpoints will enable developers to “build solutions to help people discover interesting Spaces more easily, and to help hosts measure the performance of their Spaces.”
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.
With today’s launch, developers will be able to build tools using new endpoints to help users discover live and scheduled Spaces. Users will also be able to discover attendance count in real-time.
There are three different endpoints: Spaces data dictionary, Spaces lookup, and search Spaces endpoints.
With Spaces data dictionary, it contains an initial set of metadata to help the developer understand public metadata and metrics associated with an active Space. Spaces lookup endpoints will enable users to return Spaces using numerous criteria, while search Spaces endpoints allow you to search live and upcoming Spaces by keyword.
In the announcement, the Twitter Spaces team says with the next release, they’ll be exploring ways to enable developers to build specifically for Spaces Hosts, and that they’re also exploring a set of endpoints that will enable developers to create and manage reminders for upcoming Spaces.