We are announcing an update to Twitter Developer Labs with some exciting new features, including Quote Tweet counts metadata, and a new GET /users object expansion for the user’s most recent Tweet.
Quote Tweet counts
For the first time ever, developers can use the new Labs endpoints to retrieve the number of times a Tweet has been quoted, within the original Tweet object.
{
"data": [
{
"id": "1067094924124872705",
"created_at": "2018-11-26T16:37:10.000Z",
"text": "Just getting started with Twitter APIs? Find out what you need in order to build an app. Watch this video! https://t.co/Hg8nkfoizN",
"author_id": "2244994945",
"attachments": {
"media_keys": [
"13_1064638969197977600"
]
},
"entities": {
"urls": [
{
"start": 107,
"end": 130,
"url": "https://t.co/Hg8nkfoizN"
}
]
},
"stats": {
"retweet_count": 185,
"reply_count": 0,
"like_count": 1432,
"quote_count": 29
},
"possibly_sensitive": false,
"lang": "en",
"source": "<a href=\"https://studio.twitter.com\" rel=\"nofollow\">Twitter Media Studio</a>",
"format": "detailed"
}
]
}
GET /users expansion for most recent Tweet
We heard feedback in our UserVoice forum that you want to be able to return a person’s most recent Tweet. This is now possible in Labs through our new user object expansion!
{
"data": [
{
"id": "2244994945",
"created_at": "2013-12-14T04:35:55.000Z",
"name": "Twitter Dev",
"username": "TwitterDev",
"protected": false,
"location": "Internet",
"url": "https://t.co/FGl7VOULyL",
"description": "Your official source for Twitter Platform news, updates & events. Need technical help? Visit https://t.co/mGHnxZU8c1 ⌨️ #TapIntoTwitter",
"verified": true,
"entities": {
"url": {
"urls": [
{
"start": 0,
"end": 23,
"url": "https://t.co/FGl7VOULyL",
"expanded_url": "https://developer.twitter.com/",
"display_url": "developer.twitter.com"
}
]
},
"description": {
"urls": [
{
"start": 93,
"end": 116,
"url": "https://t.co/mGHnxZU8c1",
"expanded_url": "https://devcommunity.x.com/",
"display_url": "devcommunity.x.com"
}
],
"hashtags": [
{
"start": 120,
"end": 135,
"tag": "TapIntoTwitter"
}
]
}
},
"profile_image_url": "https://pbs.twimg.com/profile_images/880136122604507136/xHrnqf1T_normal.jpg",
"most_recent_tweet_id": "1151905394995974150",
"format": "default"
}
],
"includes": {
"tweets": [
{
"id": "1151905394995974150",
"created_at": "2019-07-18T17:23:42.000Z",
"text": "Our new Autohook sample is a node module and command-line tool that helps you automatically ✨ set up and run your Account Activity API webhooks! Get started in just a few minutes. Available on npm, yarn, and Github💻https://t.co/A7dIgjUFRC",
"author_id": "2244994945",
"entities": {
"urls": [
{
"start": 215,
"end": 238,
"url": "https://t.co/A7dIgjUFRC",
"expanded_url": "https://github.com/twitterdev/autohook",
"display_url": "github.com/twitterdev/aut…"
}
]
},
"format": "default"
}
]
}
}
Getting Started
If you’re interested in playing with these new fields and functionality, see our documentation on formats and expansions, which include updated payloads. Please remember, the endpoints we release in Labs will be previews and are likely to change before they are released broadly, so we encourage you to take that into consideration as you build.
We’re looking forward to hearing your thoughts on these updates using our feedback channel. As always, you can get in touch with us to ask questions or surface issues within the Labs category.