Insert

Creates a new top-level comment

51 variables
50 variables

Creates a new top-level comment. To add a reply to an existing comment, use the comments.insert method instead

Authorization

To use this building block you will have to grant access to at least one of the following scopes:

  • See, edit, and permanently delete your YouTube videos, ratings, comments and captions

Input

This building block consumes 51 input parameters

  = Parameter name
  = Format

part STRING Required

The part parameter identifies the properties that the API response will include. Set the parameter value to snippet. The snippet part has a quota cost of 2 units

etag STRING

Etag of this resource

id STRING

The ID that YouTube uses to uniquely identify the comment thread

kind STRING

Identifies what kind of resource this is. Value: the fixed string "youtube#commentThread"

replies OBJECT

Comments written in (direct or indirect) reply to the top level comment

replies.comments[] OBJECT

A comment represents a single YouTube comment

replies.comments[].etag STRING

Etag of this resource

replies.comments[].id STRING

The ID that YouTube uses to uniquely identify the comment

replies.comments[].kind STRING

Identifies what kind of resource this is. Value: the fixed string "youtube#comment"

replies.comments[].snippet OBJECT

Basic details about a comment, such as its author and text

replies.comments[].snippet.authorChannelId ANY

The id of the author's YouTube channel, if any

replies.comments[].snippet.authorChannelUrl STRING

Link to the author's YouTube channel, if any

replies.comments[].snippet.authorDisplayName STRING

The name of the user who posted the comment

replies.comments[].snippet.authorProfileImageUrl STRING

The URL for the avatar of the user who posted the comment

replies.comments[].snippet.canRate BOOLEAN

Whether the current viewer can rate this comment

replies.comments[].snippet.channelId STRING

The id of the corresponding YouTube channel. In case of a channel comment this is the channel the comment refers to. In case of a video comment it's the video's channel

replies.comments[].snippet.likeCount INTEGER

The total number of likes this comment has received

replies.comments[].snippet.moderationStatus ENUMERATION

The comment's moderation status. Will not be set if the comments were requested through the id filter

replies.comments[].snippet.parentId STRING

The unique id of the parent comment, only set for replies

replies.comments[].snippet.publishedAt DATE_TIME

The date and time when the comment was orignally published. The value is specified in ISO 8601 (YYYY-MM-DDThh:mm:ss.sZ) format

replies.comments[].snippet.textDisplay STRING

The comment's text. The format is either plain text or HTML dependent on what has been requested. Even the plain text representation may differ from the text originally posted in that it may replace video links with video titles etc

replies.comments[].snippet.textOriginal STRING

The comment's original raw text as initially posted or last updated. The original text will only be returned if it is accessible to the viewer, which is only guaranteed if the viewer is the comment's author

replies.comments[].snippet.updatedAt DATE_TIME

The date and time when was last updated . The value is specified in ISO 8601 (YYYY-MM-DDThh:mm:ss.sZ) format

replies.comments[].snippet.videoId STRING

The ID of the video the comment refers to, if any

replies.comments[].snippet.viewerRating ENUMERATION

The rating the viewer has given to this comment. For the time being this will never return RATE_TYPE_DISLIKE and instead return RATE_TYPE_NONE. This may change in the future

snippet OBJECT

Basic details about a comment thread

snippet.canReply BOOLEAN

Whether the current viewer of the thread can reply to it. This is viewer specific - other viewers may see a different value for this field

snippet.channelId STRING

The YouTube channel the comments in the thread refer to or the channel with the video the comments refer to. If video_id isn't set the comments refer to the channel itself

snippet.isPublic BOOLEAN

Whether the thread (and therefore all its comments) is visible to all YouTube users

snippet.topLevelComment OBJECT

A comment represents a single YouTube comment

snippet.topLevelComment.etag STRING

Etag of this resource

snippet.topLevelComment.id STRING

The ID that YouTube uses to uniquely identify the comment

snippet.topLevelComment.kind STRING

Identifies what kind of resource this is. Value: the fixed string "youtube#comment"

snippet.topLevelComment.snippet OBJECT

Basic details about a comment, such as its author and text

snippet.topLevelComment.snippet.authorChannelId ANY

The id of the author's YouTube channel, if any

snippet.topLevelComment.snippet.authorChannelUrl STRING

Link to the author's YouTube channel, if any

snippet.topLevelComment.snippet.authorDisplayName STRING

The name of the user who posted the comment

snippet.topLevelComment.snippet.authorProfileImageUrl STRING

The URL for the avatar of the user who posted the comment

snippet.topLevelComment.snippet.canRate BOOLEAN

Whether the current viewer can rate this comment

snippet.topLevelComment.snippet.channelId STRING

The id of the corresponding YouTube channel. In case of a channel comment this is the channel the comment refers to. In case of a video comment it's the video's channel

snippet.topLevelComment.snippet.likeCount INTEGER

The total number of likes this comment has received

snippet.topLevelComment.snippet.moderationStatus ENUMERATION

The comment's moderation status. Will not be set if the comments were requested through the id filter

snippet.topLevelComment.snippet.parentId STRING

The unique id of the parent comment, only set for replies

snippet.topLevelComment.snippet.publishedAt DATE_TIME

The date and time when the comment was orignally published. The value is specified in ISO 8601 (YYYY-MM-DDThh:mm:ss.sZ) format

snippet.topLevelComment.snippet.textDisplay STRING

The comment's text. The format is either plain text or HTML dependent on what has been requested. Even the plain text representation may differ from the text originally posted in that it may replace video links with video titles etc

snippet.topLevelComment.snippet.textOriginal STRING

The comment's original raw text as initially posted or last updated. The original text will only be returned if it is accessible to the viewer, which is only guaranteed if the viewer is the comment's author

snippet.topLevelComment.snippet.updatedAt DATE_TIME

The date and time when was last updated . The value is specified in ISO 8601 (YYYY-MM-DDThh:mm:ss.sZ) format

snippet.topLevelComment.snippet.videoId STRING

The ID of the video the comment refers to, if any

snippet.topLevelComment.snippet.viewerRating ENUMERATION

The rating the viewer has given to this comment. For the time being this will never return RATE_TYPE_DISLIKE and instead return RATE_TYPE_NONE. This may change in the future

snippet.totalReplyCount INTEGER

The total number of replies (not including the top level comment)

snippet.videoId STRING

The ID of the video the comments refer to, if any. No video_id implies a channel discussion comment

Output

This building block provides 50 output parameters

  = Parameter name
  = Format

etag STRING

Etag of this resource

id STRING

The ID that YouTube uses to uniquely identify the comment thread

kind STRING

Identifies what kind of resource this is. Value: the fixed string "youtube#commentThread"

replies OBJECT

Comments written in (direct or indirect) reply to the top level comment

replies.comments[] OBJECT

A comment represents a single YouTube comment

replies.comments[].etag STRING

Etag of this resource

replies.comments[].id STRING

The ID that YouTube uses to uniquely identify the comment

replies.comments[].kind STRING

Identifies what kind of resource this is. Value: the fixed string "youtube#comment"

replies.comments[].snippet OBJECT

Basic details about a comment, such as its author and text

replies.comments[].snippet.authorChannelId ANY

The id of the author's YouTube channel, if any

replies.comments[].snippet.authorChannelUrl STRING

Link to the author's YouTube channel, if any

replies.comments[].snippet.authorDisplayName STRING

The name of the user who posted the comment

replies.comments[].snippet.authorProfileImageUrl STRING

The URL for the avatar of the user who posted the comment

replies.comments[].snippet.canRate BOOLEAN

Whether the current viewer can rate this comment

replies.comments[].snippet.channelId STRING

The id of the corresponding YouTube channel. In case of a channel comment this is the channel the comment refers to. In case of a video comment it's the video's channel

replies.comments[].snippet.likeCount INTEGER

The total number of likes this comment has received

replies.comments[].snippet.moderationStatus ENUMERATION

The comment's moderation status. Will not be set if the comments were requested through the id filter

replies.comments[].snippet.parentId STRING

The unique id of the parent comment, only set for replies

replies.comments[].snippet.publishedAt DATE_TIME

The date and time when the comment was orignally published. The value is specified in ISO 8601 (YYYY-MM-DDThh:mm:ss.sZ) format

replies.comments[].snippet.textDisplay STRING

The comment's text. The format is either plain text or HTML dependent on what has been requested. Even the plain text representation may differ from the text originally posted in that it may replace video links with video titles etc

replies.comments[].snippet.textOriginal STRING

The comment's original raw text as initially posted or last updated. The original text will only be returned if it is accessible to the viewer, which is only guaranteed if the viewer is the comment's author

replies.comments[].snippet.updatedAt DATE_TIME

The date and time when was last updated . The value is specified in ISO 8601 (YYYY-MM-DDThh:mm:ss.sZ) format

replies.comments[].snippet.videoId STRING

The ID of the video the comment refers to, if any

replies.comments[].snippet.viewerRating ENUMERATION

The rating the viewer has given to this comment. For the time being this will never return RATE_TYPE_DISLIKE and instead return RATE_TYPE_NONE. This may change in the future

snippet OBJECT

Basic details about a comment thread

snippet.canReply BOOLEAN

Whether the current viewer of the thread can reply to it. This is viewer specific - other viewers may see a different value for this field

snippet.channelId STRING

The YouTube channel the comments in the thread refer to or the channel with the video the comments refer to. If video_id isn't set the comments refer to the channel itself

snippet.isPublic BOOLEAN

Whether the thread (and therefore all its comments) is visible to all YouTube users

snippet.topLevelComment OBJECT

A comment represents a single YouTube comment

snippet.topLevelComment.etag STRING

Etag of this resource

snippet.topLevelComment.id STRING

The ID that YouTube uses to uniquely identify the comment

snippet.topLevelComment.kind STRING

Identifies what kind of resource this is. Value: the fixed string "youtube#comment"

snippet.topLevelComment.snippet OBJECT

Basic details about a comment, such as its author and text

snippet.topLevelComment.snippet.authorChannelId ANY

The id of the author's YouTube channel, if any

snippet.topLevelComment.snippet.authorChannelUrl STRING

Link to the author's YouTube channel, if any

snippet.topLevelComment.snippet.authorDisplayName STRING

The name of the user who posted the comment

snippet.topLevelComment.snippet.authorProfileImageUrl STRING

The URL for the avatar of the user who posted the comment

snippet.topLevelComment.snippet.canRate BOOLEAN

Whether the current viewer can rate this comment

snippet.topLevelComment.snippet.channelId STRING

The id of the corresponding YouTube channel. In case of a channel comment this is the channel the comment refers to. In case of a video comment it's the video's channel

snippet.topLevelComment.snippet.likeCount INTEGER

The total number of likes this comment has received

snippet.topLevelComment.snippet.moderationStatus ENUMERATION

The comment's moderation status. Will not be set if the comments were requested through the id filter

snippet.topLevelComment.snippet.parentId STRING

The unique id of the parent comment, only set for replies

snippet.topLevelComment.snippet.publishedAt DATE_TIME

The date and time when the comment was orignally published. The value is specified in ISO 8601 (YYYY-MM-DDThh:mm:ss.sZ) format

snippet.topLevelComment.snippet.textDisplay STRING

The comment's text. The format is either plain text or HTML dependent on what has been requested. Even the plain text representation may differ from the text originally posted in that it may replace video links with video titles etc

snippet.topLevelComment.snippet.textOriginal STRING

The comment's original raw text as initially posted or last updated. The original text will only be returned if it is accessible to the viewer, which is only guaranteed if the viewer is the comment's author

snippet.topLevelComment.snippet.updatedAt DATE_TIME

The date and time when was last updated . The value is specified in ISO 8601 (YYYY-MM-DDThh:mm:ss.sZ) format

snippet.topLevelComment.snippet.videoId STRING

The ID of the video the comment refers to, if any

snippet.topLevelComment.snippet.viewerRating ENUMERATION

The rating the viewer has given to this comment. For the time being this will never return RATE_TYPE_DISLIKE and instead return RATE_TYPE_NONE. This may change in the future

snippet.totalReplyCount INTEGER

The total number of replies (not including the top level comment)

snippet.videoId STRING

The ID of the video the comments refer to, if any. No video_id implies a channel discussion comment