Docs · Reference
YouTube Comments
GET /v1/youtube/comments0.05 credits / commentcache 360 minPublic comments on one YouTube video, in YouTube's Top or Newest order, exactly as a signed-out visitor can load them: text, like count, published date, edited flag, reply count, pinned and creator-hearted flags, with optional replies. Commenter names are pseudonymized ("Commenter 1") unless you ask for them, and @mentions of those commenters are replaced the same way. Billed per comment returned, 1 credit per 20; videos with comments turned off, blocks and failures are free.
Query parameters
video_idstring · required | YouTube video ID (11 characters) or any youtube.com / youtu.be video, Shorts or live URL. |
sortstring | YouTube's comment order: Top or Newest first. Default: "top" Allowed: top, newest |
limitinteger | Maximum comments to return, replies included. Billed per comment returned (1 credit per 20). Default: 100 |
include_repliesboolean | Also load the replies under each comment (they count towards limit). Default: false |
max_replies_per_commentinteger | With include_replies: at most this many replies per comment. Default: 10 |
include_reviewer_namesboolean | Return commenter display names (@handles), channel IDs and avatars. Off by default: authors are 'Commenter 1', 'Commenter 2', ... (stable within one response) and @mentions of them in comment text are replaced the same way. Default: false |
hlstring | Interface language (affects '2 days ago' texts). Default: "en" |
glstring | Two-letter country code to view the video from. Default: "us" |
max_ageinteger | Accept a cached answer up to this many seconds old, billed at 50%. |
Response data fields
Example
curl "https://api.gridlode.com/v1/youtube/comments?video_id=aircAruvnKk&limit=20" \
-H "Authorization: Bearer $GRIDLODE_KEY"Try it without code on the YouTube Comments API page.