How to find all 'retweet with comments' for a particular Tweet using API?

codeObserver picture codeObserver · Jul 13, 2015 · Viewed 10.6k times · Source

I want to get all the 'retweets with comments' of a tweet.

Here are few things I noticed with twitter api

  1. Retweets with comments are treated as tweets. The retweet count does not increase if you add a comment, also the twitter message is "XYZ quoted you instead retweeted you'
  2. You clearly can't use this API endpoint https://dev.twitter.com/rest/reference/post/statuses/retweet/:id

Is there a way to find all the 'tweet/retweet with comment' if you can supply the original Tweet/Id?

Answer

Leb picture Leb · Jul 13, 2015

So you're referring to Quoted Tweets (retweet with comments). There is no official method for that from the REST API yet, however, there are couple of ways to do it.

  1. Since all quoted tweets contain the short url to the original one, you can still use in_reply_to_status_id and filter by short url of the original tweet
  2. Search for tweets that contain the field quoted_status_id this can be done either through REST or STREAMING API.

quoted_status_id: This field only surfaces when the Tweet is a quote Tweet. This field contains the integer value Tweet ID of the quoted Tweet.