Is it possible to get a list of users who Re-tweeted a particular tweet?

api

#1

Hi! Filing this issue on behalf on an advertiser.

The advertiser recently ran a trend campaign with this tweet is now requesting for the list of users who have retweeted the tweet.

I understand that we need to use the http://api.twitter.com/1/statuses/914040437974867971/retweeted_by.xml API but I’m not exactly sure how to go about doing it.

Is it possible to pull out the data of ALL the users who have retweeted in this case? If yes, how do we go about doing so?

Would really appreciate your help regarding this!

Thank you!


#2

@parkbogerm: You can use the GET statuses/retweeters/ids endpoint.

$ twurl -H api.twitter.com "/1.1/statuses/retweeters/ids.json?id=914040437974867971"
{  
  "ids":[  
    800291790406369280,
    361918251,
    554332663,
    759392452738371586,
    1422632244,
    4737081043,
    825385114943107073,
    1251933524,
    2486554232,
    879350944554565632,
    889103066888261634,
    956442145,
    277300536,
    346379422,
    163920612,
    824647321459716096,
    2395699622,
    76519304,
    616912494,
    150751035,
    2822595307,
    3080649372,
    4583209274,
    852556014352191488,
    2951435635,
    3232531682,
    211788210,
    3239859246,
    873266118428733440,
    829698047009497088,
    4223645954,
    2830601870,
    1960820144,
    3312630985,
    232452413,
    3866114052,
    3505561645,
    865207983520727040,
    112710277,
    887810509906432000,
    821950806224011264,
    203378280,
    774296410850103296,
    293495606,
    3637030759,
    766965400508567554,
    701736979793182720,
    544246209,
    3513347532,
    905442977971036160,
    2839044307,
    907251685306769408,
    823535293819187201,
    865480059825475584,
    918110022294315009,
    824519418382147584,
    3285603661,
    910508581971046400,
    3136250172,
    1306288333,
    4461891912,
    830716874358861824,
    1095016536,
    334736460,
    755761181277556736,
    911167817306611712,
    4225271113,
    124476359,
    826724536448073728,
    2571862832,
    110385311,
    3028096324,
    720500431055622146,
    749492233,
    277821006,
    538282404,
    1295505889,
    704864377824915456,
    2491572332,
    708210607,
    2353044108,
    185529030,
    878880307788734464,
    705722538928672769,
    852165061426769920,
    2242110504,
    759008964591759360,
    3313277035,
    2978531030,
    3151421545,
    3194378389,
    2273059838,
    908294948989964288,
    886789509949513728,
    886387887922479105
  ],
  "next_cursor":0,
  "next_cursor_str":"0",
  "previous_cursor":0,
  "previous_cursor_str":"0"
}

However, note that the maximum number of user IDs returned is 100. If you need more than this, please see our Engagement API.


#3

To add to what @juanshishido mentioned here, to do this more effectively you’d usually need to be actively listening to a streaming connection to capture the retweet events, or use the 30 day search API to find them. Unfortunately you’re unlikely to be able to get all the retweets after the fact otherwise.