How do I get a list of uploaded videos for a certain channel with the new YouTube Data API (V3)?

前端 未结 2 1644
你的背包
你的背包 2020-11-29 21:23

I am trying to get a list of video ids for all uploaded videos to a channel. I would also like to use the new version of the YouTube Data API (V3). How do I do this?

2条回答
  •  無奈伤痛
    2020-11-29 21:54

    In the meantime, there is a much easier way:

    • Use the channels.list
    • set forUsername = [CHANNELNAME]
    • set part = contentDetails

    grab $data->items[0]->contentDetails->relatedPlaylists->uploads --> [PLAYLISTID]

    • Use playlistItems.list
    • Set playlistId = [PLAYLISTID] from step 1
    • Go through each PlaylistItem and pull out the video ids

提交回复
热议问题