Reputation: 628
मैं एक विशेष प्रयोक्ता का अनुसरण करने वाले लोगों के आंकडे को प्राप्त कर उस पर कुछ तर्क लगा कर कुछ उत्तम प्रयोक्ताओं को प्राप्त करने का इच्छुक हूँ । मुझे ट्विट्टर के अनुप्रयोग तंत्रांश अंतर्फलक को प्रत्येक १५ मिनट में केवल १५ बार आवाह्न कर पाने का पता चला । तो मैंने https://api.twitter.com/1.1/followers/list.json इकाई का प्रयोग किया और केवल २० परिणाम प्राप्त कर पाने में सफल रहा व प्रत्येक १५ मिनट में केवल १५ ही आवाह्म हो सकते हैं । तो इसका अर्थ हुआ :
तो मान लीजिये मुझे भारत के प्रधानमंत्री श्री नरेन्द्र मोदी जी के अनुयायियों का आँकडा पाना है तो :
अनुयायियों का आँकडा पाने में लगने वाला समय : १२०८३ घंटे -> ५०३ दिवस -> १.३७ वर्ष
क्या मैं कुछ गलत कर रहा हूँ या फिर ट्विट्टर से आँकडा पाने में ही कठिनाई है ?
I thought of getting followers data for a particular user and run the obtained data through some logic to filter out some worthy users. And I came to know of 15 calls in 15 mins rule. So I use the endpoint https://api.twitter.com/1.1/followers/list.json and I can get just 20 results in one request and there are just 15 requests per 15 minutes. So this means :
To get follower data of e.g. Mr. Narendra Modi, The Prime Minister of Bharat (a.k.a. India )
Time to get followers data with the rate limit: 12083 hours -> 503 days -> 1.37 years
Am I doing this wrong or is it really tough to get data from Twitter ?
Upvotes: 1
Views: 188
Reputation: 7513
The bad new is that it is difficult. However, the good news is that there are a couple things that will improve your situation: count and application authorization.
Your calculations are based on the default number of items returned, 20, but you can use the count parameter to increase that to 200. That improves your results to 3000 and 12000 in 15 minutes and 1 hour, respectively.
For rate limits, you can reference the following Rate Limit Chart:
https://dev.twitter.com/rest/public/rate-limits
This indicates that the number of requests for user authorization is 15. However, you also have the option of application authorization and that number of requests is 30 in the 15 minute time window.
This effectively doubles the rate, giving you 6000 and 24000 results in the 15 and 1 hour times, respectively, by both increasing count and switching to application authorization.
Here's an earlier post on rate limits with the search API that might also give you ideas:
How rate limit works in twitter in search API
Upvotes: 1