While working with the Twitter API, it's useful to familiarize yourself with their limits. You have two main limits for a GET
request, one is a Rate Limit (how many requests you can make in a 15 minute timeframe) and the other is the limit of how many results a certain call gives you.
In your scenario, you are using the GET followers/list
endpoint from their API. You can read the docs for that here. That endpoint returns a list of followers and is limited to 20 followers per request and 15 request per 15 minutes, meaning that in a 15 minute timeframe, you can only retrieve 15*20 = 300
users. So to retrieve 600K followers that would take a very long time ( 30K minutes = 500 hours = ~21 days ).
It would be more efficient to use the GET followers/id
which returns up to 5K user ids with each request with the same 15 request per 15 minute rate limit. Twitter API reference here. You can use this in conjunction with the Twitter GET users/lookup
which returns up to 100 users per request and has a rate limit of 900 requests per 15 minutes. This means it would take 2 hours (at 75K users per 15 minute increment) to get 600K followers id's. And less than 2 hours to get the user objects ( at 90K users per 15 minutes ).
The rate limits can change depending on how the package you are using does authentication. If you are logging in as a Twitter user with your credentials, then the above rate limits are correct. If you are using only application credentials, then getting the followers will take 3x longer as users/lookup
has a rate limit of 300 requests in that case or 30K users per 15 minutes. This answer has some good information on rate limits.