Resource: CommentThread
A commentThread resource contains information about a YouTube comment thread, which comprises a top-level comment and replies, if any exist, to that comment. A commentThread resource represents comments on a video or a post.
Both the top-level comment and the replies are comment resources nested inside the commentThread resource. A commentThread resource doesn't necessarily contain all replies to a comment; call the comments.list method to retrieve all replies for a particular comment. Some comments don't have replies.
Comments on posts are in a pilot phase with access limited to select launch partners (approved Google Cloud projects). Broader public API access is planned for General Availability in 2027.
| JSON representation |
|---|
{ "kind": string, "etag": string, "id": string, "snippet": { "channelId": string, "videoId": string, "postId": string, "topLevelComment": { object ( |
| Fields | |
|---|---|
kind |
Identifies what kind of resource this is. Value: the fixed string |
etag |
Etag of this resource. |
id |
The ID that YouTube uses to uniquely identify the comment thread. |
snippet |
The |
snippet.channelId |
The YouTube channel associated with the comments in the thread. The |
snippet.videoId |
The ID of the video the comments refer to, if any. |
snippet.postId |
The ID of the post that the comments refer to, if any. When you insert a comment thread, set this field to add a comment to a post. This field is available only to approved Google Cloud projects. |
snippet.topLevelComment |
The thread's top-level comment. |
snippet.canReply |
Indicates whether the viewer can reply to the thread. This value is viewer-specific; other viewers might see a different value. |
snippet.totalReplyCount |
The total number of replies submitted in response to the top-level comment (excluding the top-level comment itself). |
snippet.isPublic |
Indicates whether the thread, including all of its comments and replies, is visible to all YouTube users. Always |
replies |
The |
replies.comments[] |
A list of one or more replies to the top-level comment. The list contains a limited number of replies (at most 5). Unless the number of returned items equals |
Methods |
|
|---|---|
|
Creates a new top-level comment. |
|
Returns a list of comment threads that match the API request parameters. |