Skip to main content
1 of 6

Combine multipage API results in Mathematica

Can't seem to find a good post/answer to this so I'm asking the question.

I'm pulling data from the Swarm/Foursquare API, and it's paged (max 250 results per pull):

url = StringTemplate["https://api.foursquare.com/v2/users/self/checkins?auth_token=`c`&limit=250&v=20220406"][<|"c" -> oauthToken|>]; checkins = Import[url, "RawJSON"] 

(in the above code, c is a variable that I populate outside the script)

It's simple enough to compile multiple results in, say, PowerShell, Python, &c. My question is how would you combine the multiple pages in Wolfram to create a single data set? I'm having trouble getting this done.