In the last few days, you might have noticed hashtags suggesting there was going to be a new release of the Twitter API. A recent blog post confirmed this is the case. In this blog post I cover some of these announcements.
I recap on what I’ve been doing with the Twitter Labs Initiative. Labs APIs were early access APIs and based on a recent blog post by Twitter, some may make their way into V2 of the Twitter API.
I also share a collection of resources that can help you hit the ground running with Labs API endpoints.
This is one of the biggest releases since v1.1 of the API. Here are some of the key announcements that I’ve pulled together from various blogs and news sources.
Customizable JSON Payloads
V2 is a complete rebuild from technology that was originally developed in 2012. One of the cool features is that you now have the option specifying, down to the field level, which information you want returned from each payload. This can be useful in situations where bandwidth, storage or message size is an issue.
My Take: I do most things in Azure and storage is economical so don’t have an immediate need to restrict to size of JSON payloads. It’s good to have the option though.
New Product Tracks and Access Levels
You currently have 3 options when it comes to consuming Twitter data via the API:
- Standard (Free)
- Premium (PAYG / Self Service)
- Enterprise (custom payment arrangement)
I’ve moved between Standard and Premium whilst building Social Opinion and creating Twitter API integrations for clients such as University and Michigan & National Geographic Photo Ark.
The development process typically went like this:
- Create prototype using Standard (Free) APIs
- Test the prototype
- Graduate to Premium APIs (Paid) (to get more data)
- Migrate prototype code and update to use Premium Endpoints
- Test and ship the Premium Solution
The issue here was that you had to effectively code two integrations. With V2, this is no longer the case.
(image source Twitter)
There are three new Product Tracks:
- Academic Research
This is the first product to consider if you’re getting started, looking to learn or just code for fun. At the time of writing, there are plans to add Elevated Access to this track.
Researchers use the Twitter API to tap into the public conversation. Qualified academic researchers will have a way to get Elevated or Custom access to API endpoints.
Twitter is one of the most valuables sources of public conversation on the planet. With over 166 million Daily Monetizable Active Users (mDAU’s) developers can build businesses leveraging Twitter data. The Business Track supports this and, in the future,, this track will include options for Elevated or Custom Access.
My Take: Each Product Track grows in line with your use case and you also have the option of elevating access within your existing Track. This saves you from having to reengineer you API integration when you need to scale.
This is a feature I’m interested in.
It will shave time of the development effort as you only need to code one integration.
As your use case grows, you can pay for elevated access on the existing product track. I will drift between a combination of Standard Basic/ Standard Elevated and in time, when Social Opinion scales, will move into the Business Product Track.
New Developer Portal
There is mention of a new Developer Portal. I personally like the existing portal but what will be interesting to see how collaboration between Teams and Collaborators will be handled. One of the main reasons being that I sometimes enlist the help of a freelancer to help me ship code. It’ll be interesting to see how I can integrate this collaboration effort with the new Developer Portal.
12 Months in the Labs Petri dish
I spent months experimenting with the Labs APIs, engaging with DevRel Team, providing feedback and suggestions for APIs. It was all worthwhile. This helped me quickly get upto speed with Labs APIs. At the time of writing, I’m uncertain if any of the Labs APIs will make their way into V2. For reference however, here are links to previous blog posts detailing implementations I’ve created for all Twitter Labs API endpoints:
This blog post introduces the Metrics API and shows you how to surface all key metrics for 1 or many Tweets:
Filtered Stream API
This collection of blog posts shows you a full blow web application that leverages the Labs Filtered Stream API. You can create upto 15 filter rules and dynamically change them. When data is processed, you can visualize it through a collection of dashboards.
Sampled Stream API
This blog post shows you how to connect to the Sampled Stream which gives you 1% of all real-time Tweets:
Hide Replies API
This blog post shows you how to programmatically hide replies to Tweets in a few lines of code.
Social Opinion API
Thie NuGet package will let you quickly connect to all Labs endpoints using a few lines of code.
What Will Ship First in V2?
Based on this blog, it looks like some kind of Tweets stream will be one of the first things to ship inV2, along with capabilities that let you measure Tweet performance. I have a few hunches around which APIs will graduate from the public roadmap to help deliver this.
(Twitter Public Developer Roadmap)
I’d like to see Context Annotations making their way into V2. I’m actively using this to help identify the key topics, places, locations, businesses, and organisations that are forming the public conversation and using this to power several dashboards.
(Social Opinion dashboard that leverages Context Annotations)
For example, in the above screenshot, we can see some information that you can surface through Context Annotations, alongside hashtags, URLs and user accounts being mentioned.
In this blog post we’ve looked at some of the announcements that have been made prior to the release of the Twitter API rebuild. We looked at what may ship and I’ve shared some thoughts around this next generation of the Twitter API.