youtube-comments

The top-level comments of one public YouTube video, in YouTube's top-comments order, one row per comment: text, author, likes, reply count, when it was posted, whether the creator hearted or pinned it. video is the watch URL, a youtu.be link or the 11-character id; limit how many comments (default 50, at most 500). YouTube sends 20 comments a page, about 0.5 s each. A video with comments turned off gives no rows. When YouTube stops answering partway, the comments read so far come back with a warning that the list stopped early.

stagedyoutube.comWASM module11 fields2 units + 1 per 20 commentsfresh 15 min
‹ Recipes
…json
POST api.crawl4ai.com/recipes/…

$ crawl recipe

              
Live · your key · counts against your quota✓ 200 OK
# Hit Run - the rows render here as a table, with the cost

Fields

11 columns on every row. null means the site does not state it.
fieldtypemeaning
comment_idstringYouTube's id of the comment (Ugz...), the lc value in a comment link.
video_idstringThe 11-character id of the video the comment is on.
textstringThe comment as written, line breaks and emoji included.
authorobjectThe commenter, {name, handle, channel_id, url}: name is the name YouTube shows on the comment (the @handle for nearly every channel today); handle is from the channel link, null when the channel has none; url is the channel's /channel/<id> link.
likesintegerLikes as an integer, from the count YouTube shows: above 1,000 YouTube rounds it (324K gives 324000), so treat large values as approximate; 0 when no count is shown.
repliesintegerHow many replies the comment has, from the count YouTube shows (rounded the same way above 1,000); the replies themselves are not rows.
publishedstringWhen it was posted, YouTube's own relative text in English ("4 hours ago", "6 years ago (edited)").
published_dateThe UTC date (YYYY-MM-DD) of published, only when every moment that text can mean, one unit either side, falls on one day (minutes and hours ago, by YouTube's clock); null otherwise, never a guess.
hearted_by_creatorbooleantrue when the video's creator gave the comment a heart.
pinnedbooleantrue when the creator pinned the comment to the top.
urlstringA link that opens the video with this comment shown first.

null means the site does not state it.

comment_idstringYouTube's id of the comment (Ugz...), the lc value in a comment link.
video_idstringThe 11-character id of the video the comment is on.
textstringThe comment as written, line breaks and emoji included.
authorobjectThe commenter, {name, handle, channel_id, url}: name is the name YouTube shows on the comment (the @handle for nearly every channel today); handle is from the channel link, null when the channel has none; url is the channel's /channel/<id> link.
likesintegerLikes as an integer, from the count YouTube shows: above 1,000 YouTube rounds it (324K gives 324000), so treat large values as approximate; 0 when no count is shown.
repliesintegerHow many replies the comment has, from the count YouTube shows (rounded the same way above 1,000); the replies themselves are not rows.
publishedstringWhen it was posted, YouTube's own relative text in English ("4 hours ago", "6 years ago (edited)").
published_dateThe UTC date (YYYY-MM-DD) of published, only when every moment that text can mean, one unit either side, falls on one day (minutes and hours ago, by YouTube's clock); null otherwise, never a guess.
hearted_by_creatorbooleantrue when the video's creator gave the comment a heart.
pinnedbooleantrue when the creator pinned the comment to the top.
urlstringA link that opens the video with this comment shown first.

How it behaves

Cost. 2 units + 1 per 20 comments. A failed run costs 0.

Freshness 15 min. The same input within 15 min is served from cache at 0 units.

How it answers. Answers at once for one input; a large run goes as a job you poll.

Questions about this recipeQuestions

Short answers. The API reference has the long ones.

Call POST /recipes/youtube-comments with your key and video and limit. You get rows with the 11 fields above. The recipe is tested against the live site every 6 hours.

Need more from YouTube?

Extra fields, higher volume, or a private copy with a freshness SLA. We build it on Enterprise.

Request a change

For developers

Get a free API key and run your first crawl.

1,000 credits every month. No credit card. Your self-hosted setup keeps working.

For teams

Talk to us about volume, regions and an SLA.

A 30-minute call with the team that writes the crawler. DPA on request, invoice billing, your choice of US, EU or Singapore.