发送:
List编号是上一个接口返回的UU开始的那个
GET https://youtube.googleapis.com/youtube/v3/playlistItems?part=contentDetails%2Csnippet%2Cstatus&playlistId=[List编号]&key=[YOUR_API_KEY] HTTP/1.1
Authorization: Bearer [YOUR_ACCESS_TOKEN]
Accept: application/json
返回:
{
"kind": "youtube#playlistItemListResponse",
"etag": "sKFBg0QAFkDAaRtysTrebMkkcN8",
"nextPageToken": "CDIQAA",
"items": [
{
"kind": "youtube#playlistItem",
"etag": "n0z9esMo-NzLrFpY_pRAVr9dd7w",
"id": "VVVfeDVYRzFPVjJQNnVaWjVGU005VHR3LlYtUXRjd0txOUpr",
"snippet": {
"publishedAt": "2021-05-13T20:17:27Z",
"channelId": "UC_x5XG1OV2P6uZZ5FSM9Ttw",
"title": "Google I/O 2021, Android Studio 4.2, Google Play update, and more!",
"description": "TL;DR 246 | The Google Developer News Show\n \n0:00 - Google I/O 2021 → https://goo.gle/3tKActE \n0:37 - Android Studio 4.2 → https://goo.gle/3hjinPQ \n1:14 - New safety section in Google Play → https://goo.gle/3eH5rBB \n1:46 - New Dashboard in Google Developer Profiles → https://goo.gle/33DWeDB \n2:16 - Please remember to like, subscribe, and share! \n\nHere to bring you the latest developer news from across Google is Developer Advocate Meghan Metha. Tune in every week for a new episode, and let us know what you think of the latest announcements in the comments below! 😃\n\nFollow Google Developers on Instagram → https://goo.gle/googledevs \n\nWatch more #DevShow → https://goo.gle/GDevShow \nSubscribe to Google Developers → https://goo.gle/developers \n\n#Google #Developers",
"thumbnails": {
"default": {
"url": "https://i.ytimg.com/vi/V-QtcwKq9Jk/default.jpg",
"width": 120,
"height": 90
},
"medium": {
"url": "https://i.ytimg.com/vi/V-QtcwKq9Jk/mqdefault.jpg",
"width": 320,
"height": 180
},
"high": {
"url": "https://i.ytimg.com/vi/V-QtcwKq9Jk/hqdefault.jpg",
"width": 480,
"height": 360
},
"standard": {
"url": "https://i.ytimg.com/vi/V-QtcwKq9Jk/sddefault.jpg",
"width": 640,
"height": 480
},
"maxres": {
"url": "https://i.ytimg.com/vi/V-QtcwKq9Jk/maxresdefault.jpg",
"width": 1280,
"height": 720
}
},
"channelTitle": "Google Developers",
"playlistId": "UU_x5XG1OV2P6uZZ5FSM9Ttw",
"position": 0,
"resourceId": {
"kind": "youtube#video",
"videoId": "V-QtcwKq9Jk"
},
"videoOwnerChannelTitle": "Google Developers",
"videoOwnerChannelId": "UC_x5XG1OV2P6uZZ5FSM9Ttw"
},
"contentDetails": {
"videoId": "V-QtcwKq9Jk",
"videoPublishedAt": "2021-05-13T21:00:21Z"
},
"status": {
"privacyStatus": "public"
}
}
],
"pageInfo": {
"totalResults": 5340,
"resultsPerPage": 50
}
}
根据视频ID获取视频信息
请求:
GET https://youtube.googleapis.com/youtube/v3/videos?part=snippet%2CcontentDetails%2Cstatistics&id=Ks-_Mh1QhMc%2CV-QtcwKq9Jk&key=[YOUR_API_KEY] HTTP/1.1
Authorization: Bearer [YOUR_ACCESS_TOKEN]
Accept: application/json
id字段可以传以逗号分隔的多个id,该id是从上面的一个请求的返回的,contentDetails下的VideoId
返回:
{
"kind": "youtube#videoListResponse",
"etag": "zWPULojPN0SgmjLS7RzRh6217I4",
"items": [
{
"kind": "youtube#video",
"etag": "H0Be3-hhwR0AH_bFMPSsvwMkFhg",
"id": "Ks-_Mh1QhMc",
"snippet": {
"publishedAt": "2012-10-01T15:27:35Z",
"channelId": "UCAuUUnT6oDeKwE6v1NGQxug",
"title": "Your body language may shape who you are | Amy Cuddy",
"description": "Body language affects how others see us, but it may also change how we see ourselves. Social psychologist Amy Cuddy argues that \"power posing\" -- standing in a posture of confidence, even when we don't feel confident -- can boost feelings of confidence, and might have an impact on our chances for success. (Note: Some of the findings presented in this talk have been referenced in an ongoing debate among social scientists about robustness and reproducibility. Read Amy Cuddy's response here: http://ideas.ted.com/inside-the-debate-about-power-posing-a-q-a-with-amy-cuddy/)\n\nGet TED Talks recommended just for you! Learn more at https://www.ted.com/signup.\n\nThe TED Talks channel features the best talks and performances from the TED Conference, where the world's leading thinkers and doers give the talk of their lives in 18 minutes (or less). Look for talks on Technology, Entertainment and Design -- plus science, business, global issues, the arts and more.\n\nFollow TED on Twitter: http://www.twitter.com/TEDTalks\nLike TED on Facebook: https://www.facebook.com/TED\n\nSubscribe to our channel: https://www.youtube.com/TED",
"thumbnails": {
"default": {
"url": "https://i.ytimg.com/vi/Ks-_Mh1QhMc/default.jpg",
"width": 120,
"height": 90
},
"medium": {
"url": "https://i.ytimg.com/vi/Ks-_Mh1QhMc/mqdefault.jpg",
"width": 320,
"height": 180
},
"high": {
"url": "https://i.ytimg.com/vi/Ks-_Mh1QhMc/hqdefault.jpg",
"width": 480,
"height": 360
},
"standard": {
"url": "https://i.ytimg.com/vi/Ks-_Mh1QhMc/sddefault.jpg",
"width": 640,
"height": 480
},
"maxres": {
"url": "https://i.ytimg.com/vi/Ks-_Mh1QhMc/maxresdefault.jpg",
"width": 1280,
"height": 720
}
},
"channelTitle": "TED",
"tags": [
"Amy Cuddy",
"TED",
"TEDTalk",
"TEDTalks",
"TED Talk",
"TED Talks",
"TEDGlobal",
"brain",
"business",
"psychology",
"self",
"success"
],
"categoryId": "22",
"liveBroadcastContent": "none",
"defaultLanguage": "en",
"localized": {
"title": "Your body language may shape who you are | Amy Cuddy",
"description": "Body language affects how others see us, but it may also change how we see ourselves. Social psychologist Amy Cuddy argues that \"power posing\" -- standing in a posture of confidence, even when we don't feel confident -- can boost feelings of confidence, and might have an impact on our chances for success. (Note: Some of the findings presented in this talk have been referenced in an ongoing debate among social scientists about robustness and reproducibility. Read Amy Cuddy's response here: http://ideas.ted.com/inside-the-debate-about-power-posing-a-q-a-with-amy-cuddy/)\n\nGet TED Talks recommended just for you! Learn more at https://www.ted.com/signup.\n\nThe TED Talks channel features the best talks and performances from the TED Conference, where the world's leading thinkers and doers give the talk of their lives in 18 minutes (or less). Look for talks on Technology, Entertainment and Design -- plus science, business, global issues, the arts and more.\n\nFollow TED on Twitter: http://www.twitter.com/TEDTalks\nLike TED on Facebook: https://www.facebook.com/TED\n\nSubscribe to our channel: https://www.youtube.com/TED"
},
"defaultAudioLanguage": "en"
},
"contentDetails": {
"duration": "PT21M3S",
"dimension": "2d",
"definition": "hd",
"caption": "true",
"licensedContent": true,
"contentRating": {},
"projection": "rectangular"
},
"statistics": {
"viewCount": "19630769",
"likeCount": "293174",
"dislikeCount": "5600",
"favoriteCount": "0",
"commentCount": "8671"
}
},
{
"kind": "youtube#video",
"etag": "eLxJnVkjRvCXeqs4kfxlWfT5iSQ",
"id": "V-QtcwKq9Jk",
"snippet": {
"publishedAt": "2021-05-13T21:00:21Z",
"channelId": "UC_x5XG1OV2P6uZZ5FSM9Ttw",
"title": "Google I/O 2021, Android Studio 4.2, Google Play update, and more!",
"description": "TL;DR 246 | The Google Developer News Show\n \n0:00 - Google I/O 2021 → https://goo.gle/3tKActE \n0:37 - Android Studio 4.2 → https://goo.gle/3hjinPQ \n1:14 - New safety section in Google Play → https://goo.gle/3eH5rBB \n1:46 - New Dashboard in Google Developer Profiles → https://goo.gle/33DWeDB \n2:16 - Please remember to like, subscribe, and share! \n\nHere to bring you the latest developer news from across Google is Developer Advocate Meghan Metha. Tune in every week for a new episode, and let us know what you think of the latest announcements in the comments below! 😃\n\nFollow Google Developers on Instagram → https://goo.gle/googledevs \n\nWatch more #DevShow → https://goo.gle/GDevShow \nSubscribe to Google Developers → https://goo.gle/developers \n\n#Google #Developers",
"thumbnails": {
"default": {
"url": "https://i.ytimg.com/vi/V-QtcwKq9Jk/default.jpg",
"width": 120,
"height": 90
},
"medium": {
"url": "https://i.ytimg.com/vi/V-QtcwKq9Jk/mqdefault.jpg",
"width": 320,
"height": 180
},
"high": {
"url": "https://i.ytimg.com/vi/V-QtcwKq9Jk/hqdefault.jpg",
"width": 480,
"height": 360
},
"standard": {
"url": "https://i.ytimg.com/vi/V-QtcwKq9Jk/sddefault.jpg",
"width": 640,
"height": 480
},
"maxres": {
"url": "https://i.ytimg.com/vi/V-QtcwKq9Jk/maxresdefault.jpg",
"width": 1280,
"height": 720
}
},
"channelTitle": "Google Developers",
"tags": [
"GDS: Yes",
"google i/o",
"google i/o 2021",
"google i/o 21",
"android studio 4.2",
"google play",
"google play update",
"google play safety section",
"google developer profiles",
"google developer profiles dashboard",
"android",
"android developers",
"google developer show",
"the google developer show",
"the developer show",
"dev show",
"dev news",
"tl;dr",
"developer news",
"news",
"updates",
"ds",
"google developers",
"google news",
"developers",
"developer",
"google latest",
"google",
"Meghan Metha"
],
"categoryId": "28",
"liveBroadcastContent": "none",
"defaultLanguage": "en",
"localized": {
"title": "Google I/O 2021, Android Studio 4.2, Google Play update, and more!",
"description": "TL;DR 246 | The Google Developer News Show\n \n0:00 - Google I/O 2021 → https://goo.gle/3tKActE \n0:37 - Android Studio 4.2 → https://goo.gle/3hjinPQ \n1:14 - New safety section in Google Play → https://goo.gle/3eH5rBB \n1:46 - New Dashboard in Google Developer Profiles → https://goo.gle/33DWeDB \n2:16 - Please remember to like, subscribe, and share! \n\nHere to bring you the latest developer news from across Google is Developer Advocate Meghan Metha. Tune in every week for a new episode, and let us know what you think of the latest announcements in the comments below! 😃\n\nFollow Google Developers on Instagram → https://goo.gle/googledevs \n\nWatch more #DevShow → https://goo.gle/GDevShow \nSubscribe to Google Developers → https://goo.gle/developers \n\n#Google #Developers"
},
"defaultAudioLanguage": "en-US"
},
"contentDetails": {
"duration": "PT2M33S",
"dimension": "2d",
"definition": "hd",
"caption": "true",
"licensedContent": false,
"contentRating": {},
"projection": "rectangular"
},
"statistics": {
"viewCount": "6744",
"likeCount": "301",
"dislikeCount": "8",
"favoriteCount": "0",
"commentCount": "10"
}
}
],
"pageInfo": {
"totalResults": 2,
"resultsPerPage": 2
}
}