Returns a list of comment threads that match the API request parameters.
Quota impact: A call to this method has a quota cost of 1 unit.
Common use cases
Request
HTTP request
GET https://www.googleapis.com/youtube/v3/commentThreads
Parameters
The following table lists the parameters that this query supports. All of the parameters listed are query parameters.
| Parameters | ||
|---|---|---|
| Required parameters | ||
| part | stringThe partparameter specifies a comma-separated list of one or morecommentThreadresource properties that the API response will include.The following list contains the partnames that you can include in the parameter value:
 | |
| Filters (specify exactly one of the following parameters) | ||
| allThreadsRelatedToChannelId | stringThe allThreadsRelatedToChannelIdparameter instructs the API to return all comment threads associated with the specified channel. | |
| id | stringThe idparameter specifies a comma-separated list of comment thread IDs for the resources that should be retrieved. | |
| videoId | stringThe videoIdparameter instructs the API to return comment threads associated with the specified video ID. | |
| Optional parameters | ||
| maxResults | unsigned integerThe maxResultsparameter 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 idparameter. Acceptable values are1to100, inclusive. The default value is20. | |
| moderationStatus | stringThis parameter can only be used in a properly authorized request. 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 idparameter. The default value ispublished.Acceptable values are: 
 | |
| order | stringThe orderparameter specifies the order in which the API response should list comment threads. Valid values are:
 idparameter. | |
| pageToken | stringThe pageTokenparameter identifies a specific page in the result set that should be returned. In an API response, thenextPageTokenproperty identifies the next page of the result that can be retrieved.Note: This parameter is not supported for use in conjunction with the idparameter. | |
| searchTerms | stringThe searchTermsparameter 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 idparameter. | |
| textFormat | stringSet this parameter's value to htmlorplainTextto instruct the API to return the comments left by users in html formatted or in plain text. The default value ishtml.Acceptable values are: 
 | |
Request body
Don't provide a request body when calling this method.
Response
If successful, this method returns a response body with the following structure:
{
  "kind": "youtube#commentThreadListResponse",
  "etag": etag,
  "nextPageToken": string,
  "pageInfo": {
    "totalResults": integer,
    "resultsPerPage": integer
  },
  "items": [
    commentThread Resource
  ]
}Properties
The following table defines the properties that appear in this resource:
| Properties | |
|---|---|
| kind | stringIdentifies the API resource's type. The value will be youtube#commentThreadListResponse. | 
| etag | etagThe Etag of this resource. | 
| nextPageToken | stringThe token that can be used as the value of the pageTokenparameter to retrieve the next page in the result set. | 
| pageInfo | objectThe pageInfoobject encapsulates paging information for the result set. | 
| pageInfo.totalResults | integerThe total number of results in the result set. | 
| pageInfo.resultsPerPage | integerThe number of results included in the API response. | 
| items[] | listA list of comment threads that match the request criteria. | 
Errors
The following table identifies error messages that the API could return in response to a call to this method. For more details, see the error message documentation.
| Error type | Error detail | Description | 
|---|---|---|
| badRequest (400) | operationNotSupported | The idfilter is only compatible with comments based on Google+. | 
| badRequest (400) | processingFailure | The API server failed to successfully process the request. While this can be a transient error, it usually indicates that the request's input is invalid. Check the structure of the commentThreadresource in the request body to ensure that it is valid. | 
| forbidden (403) | commentsDisabled | The video identified by the videoIdparameter has disabled comments. | 
| forbidden (403) | forbidden | One or more of the requested comment threads cannot be retrieved due to insufficient permissions. The request might not be properly authorized. | 
| notFound (404) | channelNotFound | The channel identified by the allThreadsRelatedToChannelIdparameter couldn't be found. | 
| notFound (404) | commentThreadNotFound | One or more of the specified comment threads cannot be found. Check the values of the request's idparameter to ensure that it is correct. | 
| notFound (404) | videoNotFound | The video identified by the videoIdparameter couldn't be found. | 
Try it!
Use the APIs Explorer to call this API and see the API request and response.