Get active users - via API

So what if you looped through each page (maybe using something like Python) to increment the page number and fetch the data until there’s no data left to fetch? Would that work?