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.
Recipes are not open yet.
What this recipe returned on its last run. No key needed to look.
Fields
11 columns on every row. null means the site does not state it.| field | type | meaning |
|---|---|---|
| comment_id | string | YouTube's id of the comment (Ugz...), the lc value in a comment link. |
| video_id | string | The 11-character id of the video the comment is on. |
| text | string | The comment as written, line breaks and emoji included. |
| author | object | The 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. |
| likes | integer | Likes 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. |
| replies | integer | How many replies the comment has, from the count YouTube shows (rounded the same way above 1,000); the replies themselves are not rows. |
| published | string | When it was posted, YouTube's own relative text in English ("4 hours ago", "6 years ago (edited)"). |
| published_date | The 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_creator | boolean | true when the video's creator gave the comment a heart. |
| pinned | boolean | true when the creator pinned the comment to the top. |
| url | string | A link that opens the video with this comment shown first. |
null means the site does not state it.
lc value in a comment link.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.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.
2 units + 1 per 20 comments. A failed run costs 0. The same input within 15 min costs 0.
Yes. Sign up with Google, GitHub or email for a free key with 1,000 credits every month. No credit card.
The health check runs every 6 hours against the live site. A failing recipe shows as failing on this page until we fix it.
Extra fields, higher volume, or a private copy with a freshness SLA. We build it on Enterprise.
Request a changeMore for video and creators
All 8 recipes →The latest videos of a YouTube channel, newest first: title, link, video id, when it was published, views and the thumbnail.
The videos YouTube finds for a query: title, link, video id, channel, views, when it was published (as YouTube says it, "3 years ago")…
One YouTube video's facts from its page: title, channel and channel id, length, views, likes, publish date, category, keywords and the…
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.