List
|
|||||
|
|
Returns a list of comments that match the API request parameters
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 6 input parameters
Name | Format | Description |
---|---|---|
part Required |
STRING |
The part parameter specifies a comma-separated list of one or more comment resource properties that the API response will include |
id |
STRING |
The id parameter specifies a comma-separated list of comment IDs for the resources that are being retrieved. In a comment resource, the id property specifies the comment's ID |
maxResults |
INTEGER |
The maxResults parameter specifies the maximum number of items that should be returned in the result set. Note: This parameter is not supported for use in conjunction with the id parameter |
pageToken |
STRING |
The pageToken parameter identifies a specific page in the result set that should be returned. In an API response, the nextPageToken property identifies the next page of the result that can be retrieved. Note: This parameter is not supported for use in conjunction with the id parameter |
parentId |
STRING |
The parentId parameter specifies the ID of the comment for which replies should be retrieved. Note: YouTube currently supports replies only for top-level comments. However, replies to replies may be supported in the future |
textFormat |
ENUMERATION |
This parameter indicates whether the API should return comments formatted as HTML or as plain text |
= Parameter name
= Format
part STRING Required The part parameter specifies a comma-separated list of one or more comment resource properties that the API response will include |
id STRING The id parameter specifies a comma-separated list of comment IDs for the resources that are being retrieved. In a comment resource, the id property specifies the comment's ID |
maxResults INTEGER The maxResults parameter specifies the maximum number of items that should be returned in the result set. Note: This parameter is not supported for use in conjunction with the id parameter |
pageToken STRING The pageToken parameter identifies a specific page in the result set that should be returned. In an API response, the nextPageToken property identifies the next page of the result that can be retrieved. Note: This parameter is not supported for use in conjunction with the id parameter |
parentId STRING The parentId parameter specifies the ID of the comment for which replies should be retrieved. Note: YouTube currently supports replies only for top-level comments. However, replies to replies may be supported in the future |
textFormat ENUMERATION This parameter indicates whether the API should return comments formatted as HTML or as plain text |
Output
This building block provides 29 output parameters
Name | Format | Description |
---|---|---|
etag |
STRING |
Etag of this resource |
eventId |
STRING |
Serialized EventId of the request which produced this response |
items[] |
OBJECT |
A comment represents a single YouTube comment |
items[].etag |
STRING |
Etag of this resource |
items[].id |
STRING |
The ID that YouTube uses to uniquely identify the comment |
items[].kind |
STRING |
Identifies what kind of resource this is. Value: the fixed string "youtube#comment" |
items[].snippet |
OBJECT |
Basic details about a comment, such as its author and text |
items[].snippet.authorChannelId |
ANY |
The id of the author's YouTube channel, if any |
items[].snippet.authorChannelUrl |
STRING |
Link to the author's YouTube channel, if any |
items[].snippet.authorDisplayName |
STRING |
The name of the user who posted the comment |
items[].snippet.authorProfileImageUrl |
STRING |
The URL for the avatar of the user who posted the comment |
items[].snippet.canRate |
BOOLEAN |
Whether the current viewer can rate this comment |
items[].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 |
items[].snippet.likeCount |
INTEGER |
The total number of likes this comment has received |
items[].snippet.moderationStatus |
ENUMERATION |
The comment's moderation status. Will not be set if the comments were requested through the id filter |
items[].snippet.parentId |
STRING |
The unique id of the parent comment, only set for replies |
items[].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 |
items[].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 |
items[].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 |
items[].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 |
items[].snippet.videoId |
STRING |
The ID of the video the comment refers to, if any |
items[].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 |
kind |
STRING |
Identifies what kind of resource this is. Value: the fixed string "youtube#commentListResponse" |
nextPageToken |
STRING |
The token that can be used as the value of the pageToken parameter to retrieve the next page in the result set |
pageInfo |
OBJECT |
Paging details for lists of resources, including total number of items available and number of resources returned in a single page |
pageInfo.resultsPerPage |
INTEGER |
The number of results included in the API response |
pageInfo.totalResults |
INTEGER |
The total number of results in the result set |
tokenPagination |
OBJECT |
Stub token pagination template to suppress results |
visitorId |
STRING |
The visitorId identifies the visitor |
= Parameter name
= Format
etag STRING Etag of this resource |
eventId STRING Serialized EventId of the request which produced this response |
items[] OBJECT A comment represents a single YouTube comment |
items[].etag STRING Etag of this resource |
items[].id STRING The ID that YouTube uses to uniquely identify the comment |
items[].kind STRING Identifies what kind of resource this is. Value: the fixed string "youtube#comment" |
items[].snippet OBJECT Basic details about a comment, such as its author and text |
items[].snippet.authorChannelId ANY The id of the author's YouTube channel, if any |
items[].snippet.authorChannelUrl STRING Link to the author's YouTube channel, if any |
items[].snippet.authorDisplayName STRING The name of the user who posted the comment |
items[].snippet.authorProfileImageUrl STRING The URL for the avatar of the user who posted the comment |
items[].snippet.canRate BOOLEAN Whether the current viewer can rate this comment |
items[].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 |
items[].snippet.likeCount INTEGER The total number of likes this comment has received |
items[].snippet.moderationStatus ENUMERATION The comment's moderation status. Will not be set if the comments were requested through the id filter |
items[].snippet.parentId STRING The unique id of the parent comment, only set for replies |
items[].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 |
items[].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 |
items[].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 |
items[].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 |
items[].snippet.videoId STRING The ID of the video the comment refers to, if any |
items[].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 |
kind STRING Identifies what kind of resource this is. Value: the fixed string "youtube#commentListResponse" |
nextPageToken STRING The token that can be used as the value of the pageToken parameter to retrieve the next page in the result set |
pageInfo OBJECT Paging details for lists of resources, including total number of items available and number of resources returned in a single page |
pageInfo.resultsPerPage INTEGER The number of results included in the API response |
pageInfo.totalResults INTEGER The total number of results in the result set |
tokenPagination OBJECT Stub token pagination template to suppress results |
visitorId STRING The visitorId identifies the visitor |