1

I need help on calling Services > YouTube Data API v3 > youtube.search.list. I tried several times a few days ago and it worked just fine. Today, it does not return correct year. It included 2016.

part - snippet

channelid - UC-lHJZR3Gqxm24_Vd_AJ5Yw

publishedAfter - 2018-12-17T16:05:58.000Z

publishedBefore - 2018-12-20T16:05:58.000Z

John
  • 329
  • 2
  • 10
Jules
  • 11
  • 1

1 Answers1

0

Because Search: list can only retrieve channels, videos and playlists according to type parameter, I assume that by specifying a channelId you are looking for videos and playlists during a given period of time of a given YouTube channel.

Playlists are easily retrievable with https://www.googleapis.com/youtube/v3/playlists?part=snippet&channelId=UC-lHJZR3Gqxm24_Vd_AJ5Yw&key=YOUR_API_KEY.

And about videos because Search: list isn't reliable I would recommend you to get all videos for the given YouTube channel and then proceed to your sort on your own. I would recommend you to use this approach to retrieve all YouTube videos of a given YouTube channel. The approach consists in getting the uploads auto-created playlist id of the YouTube channel by using Channels: list with contentDetails in part and then use PlaylistItems: list to retrieve all public videos uploaded on this YouTube channel.

Benjamin Loison
  • 3,782
  • 4
  • 16
  • 33