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?
Quota usage Projects that enable the YouTube Data API have a default quota allocation of 10,000 units per day, an amount sufficient for the overwhelming majority of our API users.
To prevent potential abuse, YouTube grants each user a unique API key that allows them to connect their website or app to the platform. Each API key is designated for an individual project. If you're using the API on two different websites, you should create two different API keys.
Yes, using the YouTube API does not incur any monetary cost for the entity calling the API. If you go over your quota an 403 Error will be returned by the API.
This guide provides and explains a Python script that uploads a YouTube video using the YouTube Data API. The code uses the Google APIs Client Library for Python. (Client libraries for other popular programming languages are also available.)
The limit is 50 ids. You have to make a request to /videos
per playlist page, you can't just have one gigantic request.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With