Helix "Get Users Follows" returning more data than what "total" field says

For my channel (ID 99640953 if you want to try yourself) I loop through all followers using the /users/follows endpoint. With every request it tells me in the “total” field that it would be 3766 records. However, counting the records I receive I always end up with 3768 records.

Originally I looped through them based on the number of records I received so far vs. that “total” field, and I believe that’s what most people would intuitively do (I also saw pseudo code suggesting this in a thread here). So my loop condition was “while (recordCount < total)”.
However, when I have e.g. 3801 or 3802 followers this would mean the “excess” records will be on the last page. With my loop condition no longer being met before that page is reached my query would miss those follows.

Now that I know this I can change my loop condition to check for an empty response or no new cursor being returned anymore, I guess that should do.

I still wonder whether I am doing something wrong or I am simply encountering a bug in the API? Are the 2 users missing from the total count maybe people I blocked or something? But even then the numbers should match.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.