> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.beatapi.io/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.beatapi.io/_mcp/server.

# 怎么按最新评论获取，而不是热门评论？

> 在 youtube.web_v2.get_video_comments 中设置 sort_by 为 newest 获取最新评论，或单独以 sort_by 为 top 查询热门讨论。

在 `youtube.web_v2.get_video_comments` 中设置 `sort_by:"newest"` 即可按最新顺序获取评论，而非默认的热门评论。若同时需要热门讨论，请另发一条 `sort_by:"top"` 请求，并在合并两组结果时按真实评论 ID 去重。

## 请求最新评论

向 `POST https://api.beatapi.io/v1/social-data/call` 传入 `video_id`、`sort_by:"newest"`、`language_code` 和 `country_code`：

```bash
curl -sS https://api.beatapi.io/v1/social-data/call \
  -H "Authorization: Bearer $BEATAPI_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{"action":"youtube.web_v2.get_video_comments","params":{"video_id":"<video_id>","sort_by":"newest","language_code":"en-US","country_code":"US"}}'
```

## newest 与 top 两种排序的适用场景

* **`sort_by:"newest"`：** 优先返回近期评论，适合在产品更新后快速排查新出现的操作问题。
* **`sort_by:"top"`：** 单独拉取高关注度的热门讨论，定位反复被提及的核心疑问。
* **合并结果去重：** 同一条评论可能同时出现在 `newest` 和 `top` 页面中，合并数据时以真实评论 ID 作为去重键。

## 合同与相关问题

执行请求前，免费检查 `data:youtube.web_v2.get_video_comments` 合同。

[返回YouTube问题索引](/zh/faq/youtube)。