YouTube Get Post Comments

2.07 credits/call
ae_youtube_get_post_comments

## Purpose Retrieve comments on a YouTube community post, with pagination. This is for post comments, not video comments or replies to an individual comment. ## Inputs Provide at least one of the following: - `post_id` (string): The community post ID for an initial request. Extract it from a URL such as `https://www.youtube.com/post/UgkxiCSRfD6g7SPlWGPDa3vbP7aIsytXRkvy`. - `continuation_token` (string): Use the `comments_continuation_token` from post details to start, or the `continuation_token` from a previous comments response to retrieve the next page. Optional settings: - `language_code` (string): Language code; default `"zh-CN"`. - `country_code` (string): Country code; default `"US"`. - `need_format` (boolean): Clean and format the returned data; default `true`. The field layout below is documented for formatted results, not for unformatted results. ## Results With `need_format=true`, the result data includes: - `comments`: The comments on the requested page. Comment fields include `comment_id`, `content`, `published_time`, `like_count`, `like_count_a11y` (accessible like-count text), `reply_count`, and `reply_count_text`. - Each comment's `author`: Author information including `channel_id`, `display_name`, `channel_url`, `avatar_url`, `is_verified`, and `is_creator`. - Each comment's `reply_continuation_token`, where available: A token for retrieving that comment's replies with a separate reply-retrieval tool. - `continuation_token`: A token for requesting the next page of post comments when available. Pass the returned page token as `continuation_token` to continue reading comments. A reply token is not the next-page token for this list.

Social
2.07 credits/call

Pricing

2.07 credits/call
ConditionCharge
Each call2.07 credits/call

2.07 credits/call Charges are per query. A successful query is billed even if it returns no results.

Parameters

Optional parameters use the platform defaults when omitted.

ParameterTypeRequiredDescriptionDefault
post_idstringNo帖子ID(首次请求时必填)/Post ID (required for first request)—
need_formatbooleanNo是否需要清洗数据,提取关键内容,移除冗余数据/Whether to clean and format the datatrue
country_codestringNo国家代码(如US, JP等)/Country codeUS
language_codestringNo语言代码(如zh-CN, en-US等)/Language codezh-CN
continuation_tokenstringNo分页token(分页时必填,也可用 get_post_detail 返回的 comments_continuation_token)/Pagination token—

Invocation example

Parameter template

Generated from the parameter configuration. Replace the sample values before use.

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_get_post_comments' \
  --header "X-Api-Key: $AGENTEARTH_API_KEY" \
  --header 'Content-Type: application/json' \
  --data-raw '{
  "params": {}
}'

No response example available yet.