How do I fetch comments in version 3 of the YouTube API?
Asked Answered
D

2

7

How do I fetch comments for a video in version 3 of the YouTube API? I've been trying youtube.activities.list and youtube.videos.list and most other methods available in the Google API Explorer. Am I missing something here?

(youtube.activities.list seems to be the proper call, but that only returns my own uploads and playlist items.)

December answered 21/11, 2012 at 8:41 Comment(0)
V
7

Update: Comments feature is now available in Data API v3. http://youtube-eng.blogspot.com/2015/04/manage-comments-with-youtube-data-api-v3.html

Vasily answered 30/11, 2012 at 19:55 Comment(2)
Is there any ETA on when fetching comments through the v3 API will be available?December
Hi @Jeff, is there any comments endpoint in any of the apis for live video streams? A way to get and post comments to that live streams comments?Starinsky
A
1
https://www.googleapis.com/youtube/v3/commentThreads?part=snippet%2Creplies&maxResults=20&videoId=Au87oAJ2jeE&key=app-key

result json

{
 "kind": "youtube#commentThreadListResponse",
 "etag": "\"mPrpS7Nrk6Ggi_P7VJ8-KsEOiIw/Q8IErPBy5AB6a2BKgaDaOWcf_jQ\"",
 "pageInfo": {
  "totalResults": 10,
  "resultsPerPage": 20
 },
 "items": [
  {
   "kind": "youtube#commentThread",
   "etag": "\"mPrpS7Nrk6Ggi_P7VJ8-KsEOiIw/bdn5c_ALv5vbJlPCzNuP1B9UqiU\"",
   "id": "z12qxfxr2onpy1b5l04cdfzrgwabir0q4bo",
   "snippet": {
    "channelId": "UCJr72fY4cTaNZv7WPbvjaSw",
    "videoId": "Au87oAJ2jeE",
    "topLevelComment": {
     "kind": "youtube#comment",
     "etag": "\"mPrpS7Nrk6Ggi_P7VJ8-KsEOiIw/JZObCX09D4_6WRoUvqcZuSWtjRw\"",
     "id": "z12qxfxr2onpy1b5l04cdfzrgwabir0q4bo",
     "snippet": {
      "channelId": "UCJr72fY4cTaNZv7WPbvjaSw",
      "videoId": "Au87oAJ2jeE",
      "textDisplay": "Thank you Dan and Envato for creating this video!\ufeff",
      "authorDisplayName": "Randy Taschner",
      "authorProfileImageUrl": "https://lh6.googleusercontent.com/--vE0X3_vDCs/AAAAAAAAAAI/AAAAAAAAAJU/aBCbmKPAMtc/photo.jpg?sz=50",
      "authorChannelUrl": "http://www.youtube.com/channel/UCTRuBHRb4BRFcob-hMj6NnQ",
      "authorChannelId": {
       "value": "UCTRuBHRb4BRFcob-hMj6NnQ"
      },
      "authorGoogleplusProfileUrl": "https://plus.google.com/109363234563168058777",
      "canRate": false,
      "viewerRating": "none",
      "likeCount": 1,
      "publishedAt": "2015-08-16T05:02:25.807Z",
      "updatedAt": "2015-08-16T05:02:25.807Z"
     }
    },
    "canReply": false,
    "totalReplyCount": 0,
    "isPublic": true
   }
  }
}
Agnesse answered 14/11, 2015 at 11:21 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.