Fetching the retweeter ids from a tweet


#1

Hi,

I am trying to fetch the retweeter ids from this tweet with the tweet id 603728108164788225.
On twitter.com this tweet has currently about 2333 retweets.

On the API side however, I can only retrieve 54 ids using the following endpoint: https://dev.twitter.com/rest/reference/get/statuses/retweeters/ids

There is no next cursor either.

From looking at other (older) threads it looks like there is potentially account that are filtered by being protected or delete. But from a total of 2333 retweets having only 54 seems odd to me.
Is there an alternative (without implemented the stream API) to retrieve more retweeters?

As a reference here is the curl (without the token/auth headers):

curl --get ‘https://api.twitter.com/1.1/statuses/retweeters/ids.json’ --data ‘count=100&id=603728108164788225&stringify_ids=true’

And the response:

{“ids”:[“3047061848”,“2814205747”,“2893706234”,“2365426230”,“3146388073”,“3120210781”,“3117100990”,“1291377660”,“2992407101”,“3236884225”,“3157377391”,“3234707553”,“1215324002”,“3225980154”,“3227060114”,“2483525624”,“3016679355”,“1056754242”,“2288063503”,“3234719612”,“2951683519”,“1328242297”,“3006492692”,“3152446459”,“3183858468”,“2821914432”,“3087393876”,“1062806557”,“1418576628”,“3099456552”,“268267941”,“3180698563”,“3120583088”,“1362273260”,“2200635426”,“1320012925”,“3102400057”,“2589713611”,“2340597889”,“1857774570”,“3180564336”,“2472448124”,“2564472246”,“248139402”,“2372034558”,“1388354977”,“2207393089”,“2475589831”,“3162766195”,“2412634405”,“1248933684”,“3176466104”,“970111543”,“3164950982”],“next_cursor”:0,“next_cursor_str”:“0”,“previous_cursor”:0,“previous_cursor_str”:“0”}

Thank you!


#2

Seems strange that there’s no next_cursor response - I wonder does this mean that you can only get 100 retweeter ids? same as https://dev.twitter.com/rest/reference/get/statuses/retweets/%3Aid ?


#3

It is not possible to get more than the 100 latest retweeter IDs after the fact using these APIs. In general you should be able to request to get latest 100 in one call (I’m not sure why it is only returning 54). When you provide a small count like 5 or 10 it should return a next_cursor but it is not, and that issue is already being tracked as a bug. I will follow up and try to confirm why it’s only returning 54 for your use case.

The recommended practice for collecting retweeter IDs is to ping the streaming API in realtime and capture them as they come in, or it’s possible to get the data via Gnip or partners that provide solutions on top of Gnip data.

Thanks,

John