I want to get the total playtime of a youtube playlist, so first I request video id's for each element in a playlist then I request the durations for all the videos.
There is a limit to how many items the playlist returns, which is 50, so I have to make multiple requests until I get to the end of the playlist.
Youtube's Data API v3 Docs entry for /videos/list say that in the id
parameter to the api you can list multiple video id's, and that pageToken
"is not supported for use in conjunction with the id parameter". So I should be able to send more than 50 id's to get the entire collection back, but when I do I get a 400 response with the message "The request specifies an invalid filter parameter" ("invalidFilters").
Is there a limit to the number of id's you can send? If so, what is it?
The limit is 50 ids. You have to make a request to /videos
per playlist page, you can't just have one gigantic request.