getFollowersIds() cursor problem


Hello, I am trying to fetch all the followers of a profile who has more than 171k followers.
I am storing the cursor in DB, for each page of 5000 ids, that’s no big deal, i am dealing with rate limiting, and getting it all that I need with no complications.

But when I loaded it all, the profile got 3 more followers, and the last page have only 1k users, how can I fetch these 3 new followers without setting the cursor back to -1, and reloading all the 171.003 ids again?
(I dont want to take like an hour to fetch 3 ids due to rate limiting again, and processing 171k unnecessary ids).

I expected that the last cursor that I saved previously to fetch me 1003 ids. But I keep getting the same 1000 again. How can I do a better approach to this?

Thanks, and sorry for bad English.


At this time, results are ordered with the most recent following first — however, this ordering is subject to unannounced change and eventual consistency issues.

GET followers/ids

Currently you just make a request with cursor=-1 and the new followers will generally be included in that response.


Thanks didn’t notice that. My bad. And how about the ones that unfollow me? I am trying to keep in db all the followers of an app as refreshed as possible. Another question, if someone who follow me then unfollow then re-follow, does this guy go to the top again or he gets his old place in the list when refetching?
I am asking this because I am aborting the fetching if one of the id’s that I got is already in db for performance reasons, considering I am fetching by the newest ones order.


To find out who unfollowed you would have to fetch all follower ids again and if someone then refollows I suspect the get added to the beginning of the ids not back where they were previously.