1
votes

I'm using GET https://www.googleapis.com/youtube/v3/playlistItems?part=contentDetails%2Csnippet&maxResults=50&playlistId=PLFs4vir_WsTwwb2zqmtE2WTEFdc7AQHnc&key={YOUR_API_KEY}

This returns all data, but only videoId in each video contentDetails. Maybe I'm missing something here?

2
Why the down vote? This question is perfectly valid. The documentation shows duration should be returned. But in practice this is not the case!Stephane Schittly
I too don't understand why the down vote, and your question has helped me and saved me some trouble. up voted.Alonzzo2

2 Answers

0
votes

YouTube has removed the features that set start and end times to playlist items: here's a product forum post that details this (and indicates an official response from Google account reps):

https://productforums.google.com/forum/#!topic/youtube/Gipu_cCDScI

Since playlists can no longer set start/end times on its items, the API no longer delivers them.

0
votes

Not an answer, but a workaround. You can retrieve a playlist and use videos list with up to 50 videoIds in the URL to retrieve each video duration.