I am still trying to figure out how to handle YouTube api pageToken

These could both be good options to achieve an output as an object/array if you're using Node JS. The top one has been assigned to @patrick so the functionality may be coming along in Wappler some time soon? This is a good use case, but I'm sure there are others.

This would probably be faster than writing to the DB in your server action, I guess it depends if there's any value in having the results saved more permanently?

If on PHP you could use a custom formatter too using:

https://www.php.net/manual/en/function.array-push.php

or similar.