URGENT: How to retrieve data from over 5,000 profiles without hitting the API limits?

JahRaujo
@JahRaujo Jah Raujo

I'm a doctorate student doing research on technology appropriation by young people in Brazil, and I need to sort bots from humans in a list of over 5,000 user profiles. I ran into a PHP code (from this site: http://bit.ly/MZisnL) that I installed on my server and that, I hope, can help me start trying to find the solution to my problem. As I run it, though, it seems to be hitting the API limits before even retrieving half the data from my user profiles set. I've talked to Jason R. (from Twitter API Policy) who's been very helpful and has granted my account the Gardenhose access level to the Streaming API (whatever that means - but I think it means I will be able to do more with the code). I just don't know how to connect the code to my profile so as to be able to retrieve data from all the profiles in my sample - if that's really what I have to do. Can anyone help me? If so, can you do it in a 'for dummies' way, cause I'm not a developer and I am running out of time to finish my research. Thanks in advance.

1 day 7 hours ago

Replies

cjmcguinness
@cjmcguinness Charles McGuinness

You're using a call, users/show, that returns one user at a time. If you can, try users/lookup, which can retrieve 100 users at a time. You'll need 50 calls for your 5000 users instead of 5000 calls.

Either way, rate limiting is a fact of life with Twitter. Put a sleep between your calls to slow it down.

16 hours 23 min ago
JahRaujo
@JahRaujo Jah Raujo

Thank you for your help, Charles. I did as you said, but I just couldn't figure out how to: (a) add 50 users per call and (b) put a sleep between calls and still collect all data on a page. Sorry, but I'm not a programmer. All I can do is fiddle with the code, and trial and error is not always the quickest way to do something like this.

10 hours 55 min ago
cjmcguinness
@cjmcguinness Charles McGuinness

Do you need just each user's profile information, or do you need the most recent tweets from each one of them?

8 hours 12 min ago