Youtube API v3 get comments

后端 未结 1 1364
爱一瞬间的悲伤
爱一瞬间的悲伤 2021-01-20 20:37

I am using Comments: list method

Request

https://www.googleapis.com/youtube/v3/comments?part=snippet&parentId=ay4MKe1u7Ec&key=`{MY_KEY}`


        
相关标签:
1条回答
  • 2021-01-20 20:56

    The comments->list method is only used when you need to get additional info about comments where you already know the comment ID ... or in the case of your URL, if you are trying to get more details about comments that are replies to a parentID. In other words, you can't put a videoID into the comments->list method.

    What you want is the commentThreads->list endpoint:

    https://www.googleapis.com/youtube/v3/commentThreads?part=snippet&videoId=ay4MKe1u7Ec&key={YOUR_API_KEY}
    

    That'll give you all the comments with their IDs ... you can take those IDs, then, and run them through the comments->list endpoint to get more granular info.

    0 讨论(0)
提交回复
热议问题