List
|
|||||
|
|
Returns a list of comment threads 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 11 input parameters
Name | Format | Description |
---|---|---|
part Required |
STRING |
The part parameter specifies a comma-separated list of one or more commentThread resource properties that the API response will include |
allThreadsRelatedToChannelId |
STRING |
The allThreadsRelatedToChannelId parameter instructs the API to return all comment threads associated with the specified channel. The response can include comments about the channel or about the channel's videos |
channelId |
STRING |
The channelId parameter instructs the API to return comment threads containing comments about the specified channel. (The response will not include comments left on videos that the channel uploaded.) |
id |
STRING |
The id parameter specifies a comma-separated list of comment thread IDs for the resources that should be retrieved |
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 |
moderationStatus |
ENUMERATION |
Set this parameter to limit the returned comment threads to a particular moderation state. Note: This parameter is not supported for use in conjunction with the id parameter |
order |
ENUMERATION |
The order parameter specifies the order in which the API response should list comment threads. Valid values are:
|
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 |
searchTerms |
STRING |
The searchTerms parameter instructs the API to limit the API response to only contain comments that contain the specified search terms. Note: This parameter is not supported for use in conjunction with the id parameter |
textFormat |
ENUMERATION |
Set this parameter's value to html or plainText to instruct the API to return the comments left by users in html formatted or in plain text |
videoId |
STRING |
The videoId parameter instructs the API to return comment threads associated with the specified video ID |
= Parameter name
= Format
part STRING Required The part parameter specifies a comma-separated list of one or more commentThread resource properties that the API response will include |
allThreadsRelatedToChannelId STRING The allThreadsRelatedToChannelId parameter instructs the API to return all comment threads associated with the specified channel. The response can include comments about the channel or about the channel's videos |
channelId STRING The channelId parameter instructs the API to return comment threads containing comments about the specified channel. (The response will not include comments left on videos that the channel uploaded.) |
id STRING The id parameter specifies a comma-separated list of comment thread IDs for the resources that should be retrieved |
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 |
moderationStatus ENUMERATION Set this parameter to limit the returned comment threads to a particular moderation state. Note: This parameter is not supported for use in conjunction with the id parameter |
order ENUMERATION The order parameter specifies the order in which the API response should list comment threads. Valid values are:
|
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 |
searchTerms STRING The searchTerms parameter instructs the API to limit the API response to only contain comments that contain the specified search terms. Note: This parameter is not supported for use in conjunction with the id parameter |
textFormat ENUMERATION Set this parameter's value to html or plainText to instruct the API to return the comments left by users in html formatted or in plain text |
videoId STRING The videoId parameter instructs the API to return comment threads associated with the specified video ID |
Output
This building block provides 25 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 thread represents information that applies to a top level comment and all its replies. It can also include the top level comment itself and some of the replies |
items[].etag |
STRING |
Etag of this resource |
items[].id |
STRING |
The ID that YouTube uses to uniquely identify the comment thread |
items[].kind |
STRING |
Identifies what kind of resource this is. Value: the fixed string "youtube#commentThread" |
items[].replies |
OBJECT |
Comments written in (direct or indirect) reply to the top level comment |
items[].replies.comments[] |
OBJECT |
A comment represents a single YouTube comment |
items[].snippet |
OBJECT |
Basic details about a comment thread |
items[].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 |
items[].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 |
items[].snippet.isPublic |
BOOLEAN |
Whether the thread (and therefore all its comments) is visible to all YouTube users |
items[].snippet.topLevelComment |
OBJECT |
A comment represents a single YouTube comment |
items[].snippet.topLevelComment.etag |
STRING |
Etag of this resource |
items[].snippet.topLevelComment.id |
STRING |
The ID that YouTube uses to uniquely identify the comment |
items[].snippet.topLevelComment.kind |
STRING |
Identifies what kind of resource this is. Value: the fixed string "youtube#comment" |
items[].snippet.totalReplyCount |
INTEGER |
The total number of replies (not including the top level comment) |
items[].snippet.videoId |
STRING |
The ID of the video the comments refer to, if any. No video_id implies a channel discussion comment |
kind |
STRING |
Identifies what kind of resource this is. Value: the fixed string "youtube#commentThreadListResponse" |
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 thread represents information that applies to a top level comment and all its replies. It can also include the top level comment itself and some of the replies |
items[].etag STRING Etag of this resource |
items[].id STRING The ID that YouTube uses to uniquely identify the comment thread |
items[].kind STRING Identifies what kind of resource this is. Value: the fixed string "youtube#commentThread" |
items[].replies OBJECT Comments written in (direct or indirect) reply to the top level comment |
items[].replies.comments[] OBJECT A comment represents a single YouTube comment |
items[].snippet OBJECT Basic details about a comment thread |
items[].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 |
items[].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 |
items[].snippet.isPublic BOOLEAN Whether the thread (and therefore all its comments) is visible to all YouTube users |
items[].snippet.topLevelComment OBJECT A comment represents a single YouTube comment |
items[].snippet.topLevelComment.etag STRING Etag of this resource |
items[].snippet.topLevelComment.id STRING The ID that YouTube uses to uniquely identify the comment |
items[].snippet.topLevelComment.kind STRING Identifies what kind of resource this is. Value: the fixed string "youtube#comment" |
items[].snippet.totalReplyCount INTEGER The total number of replies (not including the top level comment) |
items[].snippet.videoId STRING The ID of the video the comments refer to, if any. No video_id implies a channel discussion comment |
kind STRING Identifies what kind of resource this is. Value: the fixed string "youtube#commentThreadListResponse" |
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 |