kittyray
kittyray

Reputation: 33

Is it possible to get a one-off quota increase for the YouTube api?

I'm in a situation where I'm trying to add about ~4,000 videos to a YouTube playlist. With the cost-based quota system I can only add about 200 a day, which puts me at about three weeks for this project. Also the list of videos I need to add will continue to grow until I finalize the playlist as it is somewhat submission-based.

Is there some other endpoint I'm missing that would allow for the bulk addition of videos to a single playlist with a lower overall cost? Otherwise, what I'm mostly interest is learning if it possible to pay for a one-off increase and get one day of high quota points? The application for expansion seems to be for More Official Projects and not just someone trying to avoid doing this all manually.

I'm also still a little confused about some aspects of the cost-based quotas as on the dashboard it says I'm allocated 1.8mm per minute, which seems incongruent against the 10k per day limit.

If it matters, I have all of the ids of the videos in both a plaintext document and as a csv if one works better than the other.

Upvotes: 3

Views: 1806

Answers (2)

Benjamin Loison
Benjamin Loison

Reputation: 5642

Ever wondered how to do that in a single request without using any quota?

Go on your playlist by using the well-known YouTube interface: https://www.youtube.com/playlist?list=PLAYLIST_ID

Click on , then click Add videos, type in the search bar (of Video search) a video id, noted YOUR_VIDEO_ID. Then select a suggested video.

Open the Network tab of your web-browser by using Ctrl + Shift + E (on Firefox) and filter XHR requests. Make sure to tick Persist Logs checkbox.

Now click on Add videos.

You should see a request to edit_playlist, copy it as cURL (by right-clicking). Change at the end:

"actions":[{"addedVideoId":"YOUR_VIDEO_ID","action":"ACTION_ADD_VIDEO"}]

to:

"actions":[{"addedVideoId":"YOUR_VIDEO_ID_0","action":"ACTION_ADD_VIDEO"}, {"addedVideoId":"YOUR_VIDEO_ID_1","action":"ACTION_ADD_VIDEO"}, ..., {"addedVideoId":"YOUR_VIDEO_ID_3999","action":"ACTION_ADD_VIDEO"}]

Where YOUR_VIDEO_ID_0 is your YOUR_VIDEO_ID and YOUR_VIDEO_ID_1 the second video you want to add to the playlist and so forth. Don't modify ACTION_ADD_VIDEO.

Execute the modified cURL request in a terminal and that's it! It works.

Note: YouTube playlist are limited to up to 5,000 videos don't go higher than that or you would receive the error Maximum playlist size exceeded.

Upvotes: 6

Linda Lawton - DaImTo
Linda Lawton - DaImTo

Reputation: 117196

Is there some other endpoint I'm missing that would allow for the bulk addition of videos to a single playlist with a lower overall cost?

No there is not. Even batching is not going to change the cost of the request. Im acutally not sure if the YouTube api even supports the batching endpoint.

I found a note in the change log march-11,2015 that says it is supported but i cant find any docs. Its still not going to help you as it doesn't change quota cost.

enter image description here

Otherwise, what I'm mostly interest is learning if it possible to pay for a one-off increase and get one day of high quota points?

Not one off, but you should consider applying for a quota extension. The initial 10k quota is designed for development and testing. Its not meant for large scale applications running in production.

I'm also still a little confused about some aspects of the cost-based quotas as on the dashboard it says I'm allocated 1.8mm per minute, which seems incongruent against the 10k per day limit.

each request costs something against your daily allotted quota.

Upvotes: 0

Related Questions