Skip to content
//YouTube Comments Scraper example\\

Comments from the last 30 days, 5 comments

Newest comments on a video within a time window.

Updated November 14, 2026

What this example returns

This example returns up to 5 comments.

The dataset’s “Overview” view shows 10 columns: Author, Comment, Type, Likes, Replies, Published, Creator heart, Channel owner, Video title, and Video URL. See every output field.

What each setting does

The input this example runs YouTube Comments Scraper with. “Try this input” opens it in the console, where you can run it as-is or change any field first.

Video URLs startUrls

https://www.youtube.com/watch?v=dQw4w9WgXcQ

Links to public YouTube videos. Watch, youtu.be, shorts, embed, and live links all work.

Maximum comments per video maxComments

5

How many comments to return for each video.

Default: 10 → this example uses 5

Comments published after oldestCommentDate

30 days

Only comments published after this time. Use a date such as 2026-03-01, or a relative value such as 1 day or 2 weeks. 1 day keeps today's comments. 2 days keeps yesterday and today.

.json
{
  "startUrls": [
    {
      "url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
    }
  ],
  "maxComments": 5,
  "oldestCommentDate": "30 days"
}

What it costs

From about $0.0025 for 5 comments

An estimate at the lowest plan price: 5 × $0.000508 per comment (One public comment returned). A run is charged for the events it reports, so one that finds fewer comments costs less. Platform usage is included in the event price.

Full pricing

When to use this example

From the YouTube Comments Scraper readme:

Does it include replies?

Not as separate rows. Only top-level comments are returned, with replyCount showing how many replies each one has.

Known limit

publishedTimeText is relative ("6 minutes ago"), not an exact timestamp.

Other ways to run YouTube Comments Scraper

All examples of YouTube Comments Scraper

About YouTube Comments Scraper

Extract public YouTube comments from video links: text, author, likes, replies, publish time, and the video title.

Price:
From $0.508 / 1,000 results
Developer:
Echofield
Categories:
Social media, Videos

YouTube Comments Scraper pageOutput fieldsPricing

Related actors

//From the blog\\

Latest articles

All articles

The internet is full of data.
Start owning yours.

Scrape.ly gives you the infrastructure, the tooling, and the team to extract, process, and operationalize web data at any scale. Setup takes minutes.

No credit card. No setup calls.