Scraper API
YouTubeyoutube.commentsAvailable
YouTube comments
The comments under the video, top or newest first, with replies if you ask for them: text, likes, reply count, time, pinned and hearted marks, and the author's channel.
Give it a YouTube video's address, or its id.
1 unit a record, for runs that return data. Runs that fail cost nothing. How units work
- Counted
- 1 unit a record
- Inputs
- 5
- Record
- 19 fields
- A run takes
- up to 5 minutes
- Records kept
- 7 days
- Measured
- its success, on the status page
POST/v1/scrapers/youtube.comments/runs
sent, and answered
a record of the run19 fields
ok1 unit a record
A record this scraper returned for this input. The first 9 of its 19 fields are set down here; the whole record is below.

What it is used for
- Read what viewers say
- The comments under a video with their text, likes, replies and whether the channel pinned or hearted them.
- Measure a response
- Collect the comments on a launch video and count what comes up.
like_countshows which remarks other viewers agreed with. - Answer faster
- List the comments with replies and the ones without, and see which questions under your own videos are still waiting.
What you send
A YouTube video's address, or its id. These are its 5 inputs, as its schema has them.
urlstring One of the two- The video's address: a youtube.com/watch, youtu.be, /shorts/, /live/ or /embed/ link.
video_idstring One of the two- The video's 11-character id.
sortstring Optional- The order: "top" (YouTube's default ranking) or "newest" first.Default
top max_resultsinteger Optional- The most comments to return, replies included. Comments load 20 at a time, so a larger number takes longer.Default
20 replies_per_commentinteger Optional- How many replies to return under each comment that has some. 0 returns top-level comments only.Default
0
A request, ready to send
It starts a run with the input shown at the top of this page, waits up to 60 seconds for it, and reads its records. Put your key in the variable it reads.
# Start a run and wait up to 60 seconds for it to finish
curl -X POST "https://api.enrichednow.com/v1/scrapers/youtube.comments/runs?wait=60" \
-H "Authorization: Bearer $ENRICHEDNOW_API_KEY" \
-H "Content-Type: application/json" \
-d '{"input":{"video_id":"jfKfPfyJRdk","max_results":6}}'
# Read its records, with the id the first call answered
curl "https://api.enrichednow.com/v1/runs/$RUN_ID/records?limit=100" \
-H "Authorization: Bearer $ENRICHEDNOW_API_KEY"from enrichednow import EnrichedNow
client = EnrichedNow() # reads ENRICHEDNOW_API_KEY
# Start a run, wait for it to end, and get its records
result = client.scrape("youtube.comments", {
"video_id": "jfKfPfyJRdk",
"max_results": 6,
})
print(result.run.id, result.run.status, result.run.record_count)
# Read its records: pages are fetched as you go
for record in result.records:
print(record)Install it with pip install enrichednow, then save as run.py and run python3 run.py
import EnrichedNow from "enrichednow";
const client = new EnrichedNow(); // reads ENRICHEDNOW_API_KEY
// Start a run, wait for it to end, and get its records
const { run, records } = await client.scrape("youtube.comments", {
video_id: "jfKfPfyJRdk",
max_results: 6,
});
console.log(run.id, run.status, run.record_count);
// Read its records: pages are fetched as you go
for await (const record of records) console.log(record);Install it with npm install enrichednow, then save as run.mjs and run node run.mjs
package main
import (
"context"
"fmt"
"log"
"time"
enrichednow "github.com/enrichednow/enrichednow-go"
)
func main() {
client, err := enrichednow.NewClient() // reads ENRICHEDNOW_API_KEY
if err != nil {
log.Fatal(err)
}
ctx, cancel := context.WithTimeout(context.Background(), 10*time.Minute)
defer cancel()
// Start a run, wait for it to end, and get its records
run, records, err := client.Scrape(ctx, "youtube.comments", map[string]any{"video_id": "jfKfPfyJRdk", "max_results": 6})
if err != nil {
log.Fatal(err)
}
fmt.Println(run.ID, run.Status, run.RecordCount)
// Read its records: pages are fetched as you go
for records.Next() {
fmt.Println(string(records.Current()))
}
if err := records.Err(); err != nil {
log.Fatal(err)
}
}Install it with go get github.com/enrichednow/enrichednow-go@latest, then save as run.go and run go run run.go
import com.enrichednow.EnrichedNowClient;
import com.enrichednow.ScrapeResult;
import java.util.Map;
public class Run {
public static void main(String[] args) {
EnrichedNowClient client = EnrichedNowClient.fromEnv(); // reads ENRICHEDNOW_API_KEY
// Start a run, wait for it to end, and get its records
ScrapeResult result = client.scrape("youtube.comments", Map.of("video_id", "jfKfPfyJRdk", "max_results", 6));
System.out.println(result.run().id() + " " + result.run().status() + " " + result.run().recordCount());
// Read its records: pages are fetched as you go
for (Map<String, Object> record : result.records()) {
System.out.println(record);
}
}
}Add com.enrichednow:enrichednow-java:0.4.0 to your Maven or Gradle build, then save as Run.java
enrichednow run youtube.comments --input video_id=jfKfPfyJRdk --input max_results=6Install it with curl -fsSL https://raw.githubusercontent.com/enrichednow/enrichednow-cli/main/install.sh | sh
What comes back
The comments under the video, top or newest first, with replies if you ask for them: text, likes, reply count, time, pinned and hearted marks, and the author's channel. A record has 19 fields. One we could not read is null, never an empty string or a zero.
{
"position": 1,
"id": "UgwMz6w7c5oC_ZvYmzB4AaABAg",
"video_id": "jfKfPfyJRdk",
"url": "https://www.youtube.com/watch?v=jfKfPfyJRdk&lc=UgwMz6w7c5oC_ZvYmzB4AaABAg",
"is_reply": false,
"parent_id": null,
"text": "The radio is back online, join us now: https://youtu.be/EWrX250Zhko \nThank you for your patience🧡",
"published_text": "5 months ago",
"edited": false,
"like_count_text": "42",
"like_count": 42,
"reply_count": 2,
"pinned": true,
"hearted": false,
"author_name": "@LofiGirl",
"author_channel_id": "UCSJ4gkVC6NrvII8umztf0Ow",
"author_channel_url": "https://www.youtube.com/@LofiGirl",
"author_is_channel_owner": true,
"author_verified": true
}The scraper returned this record for the input above, reading a saved copy of the page, not the live site.
The fields of a record
positioninteger- Its place among the returned records, from 1: comments in the order asked for, each followed by its replies.
idstring- The comment's id.
video_idstring- The id of the video it is under.
urlstring- A link that opens the video with this comment highlighted.
is_replyboolean- True for a reply to another comment, false for a top-level comment.
parent_idstring or null- For a reply: the id of the comment it answers; null for a top-level comment.
textstring or null- The comment's text.
published_textstring or null- When it was posted, as shown ("3 weeks ago").
editedboolean- YouTube marks the comment as edited.
like_count_textstring or null- The likes as shown ("223K", "42"); null when no count is shown.
like_countinteger or null- The likes as a number: exact below a thousand, the rounded figure YouTube shows above; 0 when no count is shown.
reply_countinteger or null- For a top-level comment: how many replies it has; null for a reply.
pinnedboolean- The channel pinned this comment to the top.
heartedboolean- The channel gave this comment its heart.
author_namestring or null- The author's name as shown beside the comment, usually a handle ("@name").
author_channel_idstring or null- The author's channel id (UC…).
author_channel_urlstring or null- The author's channel address, as the page links it.
author_is_channel_ownerboolean or null- True when the author is the channel that published the video.
author_verifiedboolean or null- The author's channel shows a verified or official-artist badge.
Units and limits
- Counted per record
- Billed per record: a run that returns data costs 1 unit for each record it returns.
- A miss costs nothing
- A run that fails, that meets something not supported yet, or that you cancel costs nothing. You pay for runs that return data.
- What bounds a run
- A run may take up to 5 minutes. Its records are read in pages of up to 1,000 and are kept for 7 days.
What it does not do
- Up to 500 comments a run, replies included.
- Times are as YouTube words them ("3 weeks ago"), and like counts above a thousand are the rounded figures it shows.
- A video with comments turned off returns no records.
The bounds its schema sets
sort- top, newest; top unless you say otherwise
max_results- 1 to 500; 20 unless you say otherwise
replies_per_comment- 0 to 50; 0 unless you say otherwise
Questions
What does YouTube comments return?
The comments under the video, top or newest first, with replies if you ask for them: text, likes, reply count, time, pinned and hearted marks, and the author's channel. A record has 19 fields, among them position, id, video_id, url, is_reply and parent_id. A value that could not be read is null, never an empty string or a zero.
What do I send?
A YouTube video's address, or its id. Of url and video_id, send one of the two. Optional: sort, max_results and replies_per_comment.
How is it counted?
Billed per record: a run that returns data costs 1 unit for each record it returns. A run that fails, that meets something not supported yet, or that you cancel costs nothing. The first 1,000 units each month are free.
How much does one run return?
Its schema sets these bounds: sort top, newest (top unless you say otherwise); max_results 1 to 500 (20 unless you say otherwise); replies_per_comment 0 to 50 (0 unless you say otherwise). A run may take up to 5 minutes.
What does it not do?
Up to 500 comments a run, replies included. Times are as YouTube words them ("3 weeks ago"), and like counts above a thousand are the rounded figures it shows. A video with comments turned off returns no records.
How long are the records kept, and in what format do they come?
Records are kept for 7 days after the run ended, and read in pages of up to 1,000. They come as JSON, as NDJSON with one record a line, or as CSV with a column for each field.
Can an AI assistant call it?
Yes. Through the EnrichedNow MCP server an assistant calls the tool run_scraper with the scraper_id youtube.comments and the same input. It costs what the same API call costs.
Used in this playbook
A playbook runs YouTube comments as one of its steps and hands back the finished list. Its runs of this scraper cost what they cost here, and the playbook adds nothing.
Finance
Social Sentiment
How often the tickers and brands you follow are mentioned on social sources, in what tone, and how both moved since the last run.
YouTube
YouTube's public pages, as a visitor who is not signed in sees them.
YouTube search
youtube.searchA search query. The videos, Shorts, channels and playlists YouTube lists for the query, in its order; or, with type movie, the films of YouTube Movies & TV with their genre, year and credits.
YouTube video
youtube.videoA YouTube video's address, or its id. Its title, description, channel, dates, length, views, likes, comment count, tags, hashtags, chapters and caption languages.
YouTube channel
youtube.channelA YouTube channel's address, handle or id. Its name, description, subscribers, video count, country, join date, total views, links, avatar and banner.
YouTube channel videos
youtube.channel_videosA YouTube channel's address, handle or id. The videos on the channel's Videos tab, newest first.
YouTube channel Shorts
youtube.channel_shortsA YouTube channel's address, handle or id. The Shorts on the channel's Shorts tab, newest first: title, views and cover image.
YouTube channel live streams
youtube.channel_streamsA YouTube channel's address, handle or id. The streams on the channel's Live tab: on air now, scheduled and past, with viewers, views and length.
YouTube channel playlists
youtube.channel_playlistsA YouTube channel's address, handle or id. The playlists the channel lists on its Playlists tab: title, number of videos and cover image.
YouTube playlist
youtube.playlistA YouTube playlist's address, or its id. The videos in the playlist, in its order: title, length, views, age and thumbnail.
YouTube transcript
youtube.transcriptA YouTube video's address, or its id, and optionally a language. The video's captions as timed segments and as one text, with the language, whether they are auto-generated, and every language the video offers.
YouTube Music search
youtube.music_searchWords to search YouTube Music for: a song, an artist, an album. The top result and the songs, videos, albums, singles, artists, playlists and episodes YouTube Music lists, each with its kind, title, artists, the plays or audience shown, the year for an album, and its address.
- Industry
- Social and video
- Where
- Worldwide
Run it on an input of your own.
Create an account, make a key, and send the request above with your own input. The first 1,000 units each month are free.