Quite often, web REST API's return JSON data but are limited to the number of records they return.
Good API's also return the total number of records that could be returned along with the current offset (from start), the record limit and perhaps even a URL that lets you make the next call in the series.
Mailroute is a cloud service that pre-checks email for you, filtering out spam and viruses and letting you white-/black-list sending domains and email addresses.
It has a pretty good API that returns 20 records at a time. So, if you want to return a large number (all) of the white-/black-list entries, you need a flow that will loop through each recordset.
The attached flow does just that. It also makes use of links to keep the looping flow neat. Also uses JSONata in Change nodes instead of function nodes so reducing the level of JavaScript coding knowledge required.
Embedded in the flow is a comment node with instructions on how to set some required in-memory variables that I've used so that I don't need to share my secrets with you.