Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does youtube v3 Data api have a limit to the number of id's you can send to videos.list?

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?

like image 513
Ignat Avatar asked Apr 02 '16 08:04

Ignat


People also ask

What is the limit of YouTube API?

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.

How many YouTube API keys can I have?

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.

Is YouTube Data API v3 free?

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.

Can you upload videos with YouTube 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.)


1 Answers

The limit is 50 ids. You have to make a request to /videos per playlist page, you can't just have one gigantic request.

like image 139
Ignat Avatar answered Nov 09 '22 23:11

Ignat