How do I get the follower count for thousands of T

2019-08-27 18:26发布

I know that I can use "users/show" and get "followers_count" or I can do "followers/ids" and count the number of IDs returned, but both of these methods are rate-limited at 150 requests per hour when anonymous and 350 when signed w OAuth.

The program I'm writing uses the Twitter Search API to look for all mentions of a hashtag. I'm using the Search API and not the Streaming API because I need to look for historical tweets, not just real time.

When I find a tweet that contains the hashtag, I want to save the user's handle, tweet ID, time of tweet, and the number of followers that user has. Since the number of followers per user isn't returned with the Search API, I need to use another API call for that. That extra call is what's causing me trouble.

Are there any more efficient ways to get the number of followers for more than 350 users per hour? (There are a TON of tweets coming in...)

1条回答
成全新的幸福
2楼-- · 2019-08-27 19:06

Your only option is GET users/lookup which supports fetching up too 100 user objects in a single request. Authentication is required so you will be allowed 35000 user objects/hour. If that still isn't enough should look into queueing the requests.

查看更多
登录 后发表回答