Is it possible to get the title, description and items of a YouTube playlist with a single request?

StackOverflow https://stackoverflow.com/questions/17440252

  •  02-06-2022
  •  | 
  •  

I'm creating an application that relies heavily on YouTube playlists. Whenever I request these playlists, I need to retrieve their title and description (aka: their snippet) as well as their items (aka: playlistItems).

The only way I can seem to retrieve the snippet is with:

https://www.googleapis.com/youtube/v3/playlists?part=snippet&id=PLAYLIST_ID

And the only way I can seem to retrieve the playlist items is with:

https://www.googleapis.com/youtube/v3/playlistItems?playlistId=PLAYLIST_ID

Since there are limitations to how much traffic per application key YouTube allows, is there any way I can do this in a single request?

有帮助吗?

解决方案

Yes, due to RestFul nature of the API, playlist properties and and items' properties come in two different calls.

But API limit will not be a problem as long as your application is working in the means of Terms of Service. YouTube API is working on improving the quota system as well as can give more quotas for valid requests.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top