How to get multipage JSON results from Google and Zendesk APIs

This post is about two ways to handle pagination (getting multipage results) in response to queries on Google and Zendesk APIs