Returns a list of comments that match the API request parameters.
This method returns public comments without user authorization, plus the authenticated author's own held comments when authorized. It doesn't return heldForReview or likelySpam comments to channel owners or moderators; use commentThreads.list with moderationStatus=heldForReview instead.
For error details, see comments.list errors. For code examples, see comments.list code snippets.
HTTP request
GET https://youtube.googleapis.com/youtube/v3/comments
The URL uses gRPC Transcoding syntax.
Query parameters
| Parameters | |
|---|---|
id[] |
Returns the comments with the given IDs. Specify a single comment ID or a comma-separated list of comment IDs. A request must specify a value for either |
parentId |
Returns replies to the specified comment. YouTube supports one level of replies (replies to top-level comments), though replies to replies may be supported in the future. A request must specify a value for either |
textFormat |
The requested text format for the returned comments. Defaults to Valid values of this enum field are:
|
maxResults |
The This parameter isn't supported when filtering by |
pageToken |
The This parameter isn't supported when filtering by |
part[] |
Required. The |
Request body
The request body must be empty.
Response body
If successful, the response body contains data with the following structure:
| JSON representation |
|---|
{
"kind": string,
"etag": string,
"pageInfo": {
"totalResults": integer,
"resultsPerPage": integer
},
"items": [
{
object ( |
| Fields | |
|---|---|
kind |
Identifies what kind of resource this is. Value: the fixed string |
etag |
Etag of this resource. |
pageInfo |
General pagination information. |
pageInfo.totalResults |
The total number of results in the result set. |
pageInfo.resultsPerPage |
The number of results included in the API response. |
items[] |
A list of comments that match the request criteria. |
nextPageToken |
The token that can be used as the value of the |
Authorization scopes
Requires the following OAuth scope:
https://www.googleapis.com/auth/youtube.force-ssl
For more information, see the OAuth 2.0 Overview.