when I make request to get playlist items, I get only 5 items from the playlist. But they were much more. who knows how to disable this restriction?
2
votes
1 Answers
4
votes
You need to set the maxResults
parameter to whatever you like (max is 50
):
https://www.googleapis.com/youtube/v3/playlistItems?part=snippet&playlistId=PL7W7Mm4SA4uNAsS33fh3HPlN7ffx7ZdMN&key=mykey&maxResults=50
Additionally, you should check whether your result has the nextPageToken
item. If so, make another request with the parameter pageToken
set to the value of nextPageToken
. Repeat this until there's no more nextPageToken
item.