Paginating Youtube REST results

krest
workflow

#1

Hi All

Hoping someone can help. I’m trying to analyse data from youtube’s data api over REST.

I’ve found the channel I want, and within the workflow I’ve retreived videos and got the details. so the basic stuff is working fine. Where I’m coming unstuck is with the pagination of results.

I want to return data about all the videos in the channel (~1750). this means i need to return multiple pages. There is a ‘next page token’ returned with the first result, but for the life of me I can’t work out the exact sequence of nodes to return the basic query first, then manipulate the string to include the next page token. At present I’m thinking of chunk-loop and then variable loop, but to be honest I’m not sure that will work.

My sequence is based on the youtube API example in the server - I could upload a workflow but to all intents and purposes it’s that one, but with looping over the search results to take into account the pagination.

I’ve looked around, and found some code examples, but nothing that helps here. Any thoughts gratefully received.

Thanks in advance,
Neil