탐색으로 건너뛰기

How do I get newest comments rather than top comments?

Set sort_by:"newest" in youtube.web_v2.get_video_comments to fetch recent comments instead of popular comments. To inspect popular discussions as well, run a separate request with sort_by:"top" and deduplicate merged results by the actual comment ID.

Requesting newest comments

Send sort_by:"newest" together with video_id, language_code, and country_code to POST https://api.beatapi.io/v1/social-data/call:

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"}}'

Choosing between newest and top sort modes

  • sort_by:"newest": Surfaces recent comments first, such as newly reported setup issues right after a product update.
  • sort_by:"top": Surfaces prominent popular discussions as a separate query rather than replacing the newest feed.
  • Merging both views: Because popular comments can also appear in recent pages, deduplicate combined newest and top outputs using each comment’s actual comment ID.

Before running the request, inspect the data:youtube.web_v2.get_video_comments contract for free.

Back to YouTube questions.