Product News

A year with Twitter Developer Labs: What we've learned and changed

  By Kyle   2 July 2020



  By Kyle

  2 July 2021



In 2019, we launched Twitter Developer Labs as a new program to enable our developer community to test new features and endpoints—and, importantly, to share feedback—as we build the next generation of the Twitter API (coming VERY soon).

Labs has been invaluable in helping us understand what works well and what doesn’t, what you liked and what you didn’t. Throughout the year, we’ve listened to your thoughts across our community forumUserVoice, and in hundreds of 1:1 conversations. We’ve also closely monitored feature and endpoint usage to see what changes resonated and we adapted as a result.

Labs has given us a space to test out new ideas, shape design decisions, and play with new endpoint structure.

Since introducing Labs in May of 2019, we’ve released and tested the following API features: 

Endpoints: 

  • Tweets and users (Labs v2): These new versions of the core Tweet lookup and user lookup endpoints provide a new foundation for working with the Twitter API. Developers can use these endpoints to quickly lookup Tweets and people on Twitter by ID and username.
  • Filtered stream (Labs v1): These endpoints allow developers to narrow down the full stream of Twitter data to receive only the data they care about. Like Twitter’s standard statuses/filter streaming endpoint, the filtered stream endpoints enable developers to create filter rules on a real-time stream but with enhanced reliability, functionality, and scale.
  • Sampled stream (Labs v1): This endpoint allows developers to stream a sample of new Tweets as they are published across 1% of all public Tweets in real-time. The sampled stream endpoint is particularly useful for those developers who wish to perform analysis and extract signals from the public conversation. 
  • Recent search (Labs v2): This endpoint makes it easy to discover trends, events, and relevant topics in real-time. The Labs recent search endpoint enables developers to query the most recent seven days of Tweets and receive full-fidelity responses.
  • Hide replies (Labs v2): This endpoint gives you the ability to programmatically hide replies using criteria you define. Just like the functionality in the Twitter experience, replies will be hidden from the main conversation but still visible. You can use the endpoint to create apps to help people hide replies they don’t find valuable.
  • Metrics (Labs v1): This endpoint makes it easy to understand the impact of your owned/authorized Tweets with access to a number of impressions and engagement metrics via a singular endpoint. Note that we plan to deprecate this endpoint in the future, with this data being available on the Tweet and Media objects in Labs recent search, Tweets, and users endpoints. 

Additions to the Tweet object:

  • Tweet annotations: New metadata elements added to the default Tweet payload—which make it easier to identify entities and topical Tweets. 
  • Fully unwound URLs: New elements to provide explicit pointers to the linked content, the health of that link, and the domain it resolves to.
  • Metrics data: We added core metrics data directly to the Tweet payload within the Tweet and Media objects. Currently, this data is included when using the Labs recent search, Tweets, and users endpoints.

Before we launch the new Twitter API and graduate many of these features from Labs, we want to share a bit about how feedback in Labs has influenced the development of these features. Here are a few examples of what we’ve learned over the past year. 

Understanding the need for more access options

We’ve always known that our developer ecosystem is diverse, but our Twitter API didn’t address this well. In fact, you could say our API has taken a one-size-fits-all approach. Over the course of the past few years, through many conversations with developers, we’ve learned just how limiting our pricing and rate limit models are for many types of developers: especially academic researchers and developers building for fun. Our next generation of the Twitter API takes this challenge head on. We can’t wait to share what we have planned.  

Parity with the Twitter service

We’ve long heard requests for features available on Twitter that we have not enabled in the API. And your feedback throughout Labs further emphasized all of the differences and value of these features for your app and users. 

A few of the most common feature requests we heard, included:

  • A way to understand and retrieve conversation threads (feedback examples #1 and #2)
  • API support for Twitter Polls (feedback example)
  • Ability to pull Retweets with comments (feedback example)

The features above are planned within the new Twitter API and we’ll be sharing more soon as we update our public product roadmap

Endpoints, fields and expansions

With Labs, we introduced a new endpoint format standardizing the rendering of fields, expansions, and annotations. As we released these, feedback poured in about ideas and changes to make them even easier to use. A few of our favorite requests, all of which have been incorporated with the current Labs offerings, include:

  • Clarity in our API key naming (Thanks Terence!)
  • Node/js examples in our Quick Start guides (Thanks Alim!)
  • The ability to request specific fields on a granular level

We also received specific and guiding feedback about some of the newly introduced Labs endpoint functionality, like:

Filtered stream

  • A desire for increased capability to filter. (Thanks Arnaud and SocialOpinion!) This has been incorporated into the new Twitter API coming soon. 

Metrics data

  • Requests for more consistency between the results on analytics.twitter.com and the Twitter API (for example, video views at the Tweet and media level)
  • Requests for more accessible versions of the enterprise Engagement API returning metrics about owned Tweets
  • Requests for the inclusion of URL clicks within metrics data (Thanks Dan!)

All of the above are planned for inclusion in the upcoming Twitter API. In fact, one piece of repetitive feedback led us to re-think our approach to delivering metrics data entirely:

  • A need to access any available metrics pertaining to an object from any endpoint returning that object.

We learned that delivering this information via a singular endpoint created extra work for you. As a result, we’ve introduced the metrics data directly into the Tweet object (available in the Labs recent search, Tweets, and users endpoints) and plan to bring this structure to the new Twitter API. 

We’d like to extend a giant thank you to all of you who have engaged with us and shared your feedback. Your input has been tremendously helpful in helping us define and align our roadmap with your goals. You’re helping us to build a better API. We’re committed to continuing these conversations with you. Over the next year, we’re investing even more resources and funds into activities to further engage with our community. Keep sharing your ideas and feedback with us and keep an eye on @TwitterDev for updates. There is much more to come… soon!