Comments

A comment resource contains information about a single YouTube comment. A comment resource can represent a comment about either a video or a channel. In addition, the comment could be a top-level comment or a reply to a top-level comment.

Methods

The API supports the following methods for comments resources:

list
Returns a list of comments that match the API request parameters. Try it now.
insert
Creates a reply to an existing comment. Note: To create a top-level comment, use the commentThreads.insert method. Try it now.
update
Modifies a comment. Try it now.
delete
Deletes a comment. Try it now.
setModerationStatus
Sets the moderation status of one or more comments. The API request must be authorized by the owner of the channel or video associated with the comments. Try it now.

Resource representation

The following JSON structure shows the format of a comments resource:

{
  "kind": "youtube#comment",
  "etag": etag,
  "id": string,
  "snippet": {
    "authorDisplayName": string,
    "authorProfileImageUrl": string,
    "authorChannelUrl": string,
    "authorChannelId": {
      "value": string
    },
    "channelId": string,
    "textDisplay": string,
    "textOriginal": string,
    "parentId": string,
    "canRate": boolean,
    "viewerRating": string,
    "likeCount": unsigned integer,
    "moderationStatus": string,
    "publishedAt": datetime,
    "updatedAt": datetime,
    "imageUrl": string
  }
}

Properties

The following table defines the properties that appear in this resource: