YouTube Get Post Comments

2.07积分/次
ae_youtube_get_post_comments

## 用途 获取 YouTube 社区帖子的评论,支持分页。本工具用于帖子评论,不用于视频评论,也不直接获取某条评论下的回复。 ## 输入条件 `post_id` 与 `continuation_token` 至少提供一个: - `post_id`(字符串):首次请求时使用的社区帖子 ID,可从帖子链接中提取。例如链接 `https://www.youtube.com/post/UgkxiCSRfD6g7SPlWGPDa3vbP7aIsytXRkvy` 中的帖子 ID 为 `UgkxiCSRfD6g7SPlWGPDa3vbP7aIsytXRkvy`。 - `continuation_token`(字符串):首次请求也可使用帖子详情返回的 `comments_continuation_token`;获取后续页时,使用上一次评论响应返回的 `continuation_token`。 可选设置: - `language_code`(字符串):语言代码,默认 `"zh-CN"`。 - `country_code`(字符串):国家代码,默认 `"US"`。 - `need_format`(布尔值):是否清洗并格式化返回数据,默认 `true`。下述字段说明适用于格式化结果,不保证未格式化结果具有相同结构。 ## 返回含义 当 `need_format=true` 时,结果数据包括: - `comments`:当前页的评论列表。评论字段包括 `comment_id`(评论 ID)、`content`(正文)、`published_time`(发布时间)、`like_count`(点赞数)、`like_count_a11y`(点赞数无障碍文本)、`reply_count`(回复数)和 `reply_count_text`(回复数文本)。 - 每条评论的 `author`:作者信息,包括 `channel_id`(频道 ID)、`display_name`(显示名称)、`channel_url`(频道链接)、`avatar_url`(头像链接)、`is_verified`(是否认证)和 `is_creator`(是否为创作者)。 - 每条评论的 `reply_continuation_token`(如有):用于通过单独的回复获取工具读取该评论的回复。 - `continuation_token`(如有):用于获取下一页帖子评论的分页令牌。 继续翻页时,将结果中的分页令牌作为下一次请求的 `continuation_token`。不要把单条评论的回复令牌当作本评论列表的下一页令牌。

社交
2.07积分/次

价格说明

2.07积分/次
条件费用
每次调用2.07积分/次

2.07积分/次 按查询次数计费。查询成功但未返回结果时,也会扣除积分。

工具参数

未传入的可选参数将使用平台默认值。

参数类型必填说明默认值
post_idstring否帖子ID(首次请求时必填)/Post ID (required for first request)—
need_formatboolean否是否需要清洗数据,提取关键内容,移除冗余数据/Whether to clean and format the datatrue
country_codestring否国家代码(如US, JP等)/Country codeUS
language_codestring否语言代码(如zh-CN, en-US等)/Language codezh-CN
continuation_tokenstring否分页token(分页时必填,也可用 get_post_detail 返回的 comments_continuation_token)/Pagination token—

调用示例

参数模板

根据参数配置生成,使用前请替换示例值。

POST/agent-api/v1/tool/executeX-Api-Key
请求代码request.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": {}
}'

暂无返回示例。