How to pull data from web APIs with pagination

There is a simpler way to query API with pagination. An updated (and simplified) example is published in a new thread: