YouTube Comments List
1 credits/call
ae_youtube_comments_list
Retrieve individual comments and replies, including nested responses to specific comments.
1 credits/call
Pricing
1 credits/call
| Condition | Charge |
|---|---|
| Each call | 1 credits/call |
Parameters
Optional parameters use the platform defaults when omitted.
| Parameter | Type | Required | Description | Default |
|---|---|---|---|---|
id | string | No | Returns the comments with the given IDs for One Platform. | — |
part | string | Yes | The *part* parameter specifies a comma-separated list of one or more comment resource properties that the API response will include. | — |
parentId | string | No | Returns replies to the specified comment. Note, currently YouTube features only one level of replies (ie replies to top level comments). However replies to replies may be supported in the future. | — |
pageToken | string | No | Optional opaque pagination token. Omit on the first request. To fetch the next page, copy nextPageToken exactly from the previous response into pageToken and call this same endpoint again, keeping the playlist/channel/video identifiers, filters, part and other query settings unchanged. Use prevPageToken to go back when provided. Do not invent tokens or use a token from another query. Stop when nextPageToken is absent; no nextPageToken means no further page is advertised, even if a page contains fewer items than maxResults. | — |
maxResults | integer | No | Maximum number of items requested per page, not a limit on the total query results. Use nextPageToken as pageToken to retrieve subsequent pages when available. Accepted range: 1 to 100; values 0 and greater than 100 were rejected in direct API tests. | — |
textFormat | enum (textFormatUnspecified | html | plainText) | No | The requested text format for the returned comments. | — |
Invocation example
Copy the request and explore its response example.
POST
/agent-api/v1/tool/executeX-Api-KeyRequest coderequest.sh
curl --request POST \
--url 'https://agentearth.ai/agent-api/v1/tool/execute?tool_name=ae_youtube_comments_list' \
--header "X-Api-Key: $AGENTEARTH_API_KEY" \
--header 'Content-Type: application/json' \
--data-raw '{
"params": {
"maxResults": 20,
"parentId": "Ugyai7d3WqvurlFgv5J4AaABAg",
"part": "snippet",
"textFormat": "plainText"
}
}'Response exampleresponse.json
{
"etag": "ESaac0FeVdm8WvREVdHaMDDLfGM",
"items": [
{
"etag": "TxORlM9zcqsXrstQbgwRZ_GiXN0",
"id": "Ugyai7d3WqvurlFgv5J4AaABAg.AIDa1zWqvKRAIhbQcf20X3",
"kind": "youtube#comment",
"snippet": {
"authorChannelId": {
"value": "UCgs_z836nIK-vPfdscvi9UQ"
},
"authorChannelUrl": "http://www.youtube.com/@WATER-c5f",
"authorDisplayName": "@WATER-c5f",
"authorProfileImageUrl": "https://yt3.ggpht.com/auNw0IO8pz03omKaHfMN_SwaOYk4uzqZZMmQWMu2x0-sq4BfW_zmjQxjbwG6kXc4zmIj6jrQARY=s48-c-k-c0x00ffffff-no-rj",
"canRate": true,
"channelId": "UC5q43sWUAWEw4PlpqqQ_j-Q"
}
}
],
"kind": "youtube#commentListResponse",
"pageInfo": {
"resultsPerPage": 20
}
}This example shows part of the response. Copied content is valid JSON.

