YouTube Commentthreads List

1 credits/call
ae_youtube_commentthreads_list

List top-level comment threads for a specific YouTube video or channel.

SocialVideo
1 credits/call

Pricing

1 credits/call
ConditionCharge
Each call1 credits/call

Parameters

Optional parameters use the platform defaults when omitted.

ParameterTypeRequiredDescriptionDefault
idstringNoReturns the comment threads with the given IDs for Stubby or Apiary.—
partstringYesThe *part* parameter specifies a comma-separated list of one or more commentThread resource properties that the API response will include.—
orderenum (orderUnspecified | time | relevance)NoSort order for results. Options: orderUnspecified, time, relevance.—
postIdstringNoReturns the comment threads of the specified post.—
videoIdstringNoReturns the comment threads of the specified video.—
channelIdstringNoReturns the comment threads for all the channel comments (ie does not include comments left on videos).—
pageTokenstringNoOptional 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.—
maxResultsintegerNoMaximum number of items requested per page, not a limit on the total query results. Use nextPageToken as pageToken to retrieve subsequent pages when available. Direct API tests accepted 0 and values above 100, adjusting the effective page size to 1 through 100; use 1 to 100 for predictable pagination.—
textFormatenum (textFormatUnspecified | html | plainText)NoThe requested text format for the returned comments.—
searchTermsstringNoLimits the returned comment threads to those matching the specified key words. Not compatible with the 'id' filter.—
moderationStatusenum (published | heldForReview | likelySpam | rejected)NoLimits the returned comment threads to those with the specified moderation status. Not compatible with the 'id' filter. Valid values: published, heldForReview, likelySpam.—
allThreadsRelatedToChannelIdstringNoReturns the comment threads of all videos of the channel and the channel comments as well.—

Invocation example

Copy the request and explore its response example.

POST/agent-api/v1/tool/executeX-Api-Key
Request coderequest.sh
curl --request POST \
  --url 'https://agentearth.ai/agent-api/v1/tool/execute?tool_name=ae_youtube_commentthreads_list' \
  --header "X-Api-Key: $AGENTEARTH_API_KEY" \
  --header 'Content-Type: application/json' \
  --data-raw '{
  "params": {
    "maxResults": 100,
    "order": "time",
    "part": "snippet,replies",
    "textFormat": "plainText",
    "videoId": "HCk38SLBbfc"
  }
}'
Response exampleresponse.json
JSONPartial content
{
  "etag": "JwT6sWkkmFkDda0zREh6aj8K4so",
  "items": [
    {
      "etag": "DEtCauulehIAqAgSgZqbCFnFD2Y",
      "id": "Ugzq_Elmi2m2_4no6lR4AaABAg",
      "kind": "youtube#commentThread",
      "snippet": {
        "canReply": true,
        "channelId": "UCQSVSsG-ZstDqh6ln_wxSYg",
        "isPublic": true,
        "topLevelComment": {
          "etag": "Em6ULvYKZHpaAYnZ_tNguqj82gc",
          "id": "Ugzq_Elmi2m2_4no6lR4AaABAg",
          "kind": "youtube#comment",
          "snippet": {
            "authorChannelId": {},
            "authorChannelUrl": "http://www.youtube.com/@Aaravvvvvx",
            "authorDisplayName": "@Aaravvvvvx",
            "authorProfileImageUrl": "https://yt3.ggpht.com/ts1jBRGyTYxb7cFuDMqYS1nd1NapPqu__4lFdaCgJrmauILCfG6m04RRaQP3HWnjN16VeQSs=s48-c-k-c0x00ffffff-no-rj",
            "canRate": true,
            "channelId": "UCQSVSsG-ZstDqh6ln_wxSYg"
          }
        },
        "totalReplyCount": 0,
        "videoId": "HCk38SLBbfc"
      }
    }
  ],
  "kind": "youtube#commentThreadListResponse",
  "pageInfo": {
    "resultsPerPage": 100,
    "totalResults": 1
  }
}

This example shows part of the response. Copied content is valid JSON.