0

No matter how many videos a youtube channel has, I only ever get 10 nextpagetokens, so with the '50 per page setting' I only get the data for about 500 Youtube videos, despite the response even stating the Youtube-channel has more videos ("pageInfo": { "totalResults": 1418,) I want to get them all.

I have enough quota for the API in the google cloud platform to go beyond the 10 tokens. I have tried to find the setting to increase the nextpagetoken count, but have been unable to find it.

Does anyone know how to get more nextpagetokens?

Siebe Albers
  • 73
  • 1
  • 7

1 Answers1

0

According to Search: list about the channelId filter:

Note: Search results are constrained to a maximum of 500 videos if your request specifies a value for the channelId parameter and sets the type parameter value to video, but it does not also set one of the forContentOwner, forDeveloper, or forMine filters.

I recommended instead using this approach to list all videos of a given YouTube channel. The approach consists in getting the uploads auto-created playlist id of the YouTube channel by using Channels: list with contentDetails in part and then use PlaylistItems: list to retrieve all public videos uploaded on this YouTube channel.

Benjamin Loison
  • 3,782
  • 4
  • 16
  • 33