YouTube

YouTube Comments Scraper

Extract the comments and replies of YouTube videos and Shorts without logging in: comment text, author name, channel and avatar, likes, reply count, publish time, pinned and hearted flags, with Top or Newest sorting.

YouTube Comments Scraper by Goldmine

What it extracts

Every field below comes from the Actor’s published dataset schema.

FieldDescriptionType
videoTitleVideotext
authorNameAuthortext
textCommenttext
likeCountLikesnumber
replyCountRepliesnumber
publishedTimeTextPublishedtext
isReplyReplyboolean
isPinnedPinnedboolean
isHeartedByCreatorHeartedboolean
authorIsCreatorBy creatorboolean
authorAvatarUrlAvatarimage
commentUrlComment URLlink
inputUrlInputtext

Input parameters

Generated from the Actor’s input schema — the same fields the Apify console shows.

ParameterTypeRequiredDescription
startUrlsarrayRequiredYouTube videos whose comments to scrape. Paste a video URL such as https://www.youtube.com/watch?v=dQw4w9WgXcQ, a youtu.be link, a Shorts URL (…/shorts/…), a live URL, or a bare 11-character video id. One entry per video, and as many videos as you like.
maxItemsintegerOptionalMaximum number of comments to scrape from each video (start URL). Replies, when included, count toward this limit.
sortBystringOptionalThe order YouTube lists the comments in: Top comments (most engagement first) or Newest first. A pinned comment comes first in both.
includeRepliesbooleanOptionalAlso scrape the replies to each comment. Each reply is saved as its own item, right after the comment it answers, with parentCommentId set.
maxRepliesPerCommentintegerOptionalWhen replies are included, the maximum number of replies to scrape for each comment, in the order YouTube lists them.
proxyConfigurationobjectOptionalProxy configuration. YouTube serves comments without a proxy, so none is used by default. Switch to Apify datacenter or residential proxies if videos come back blocked.

API access

Run this Actor from your own code over the Apify API.

Inputjson
{
  "startUrls": [
    "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
  ]
}
REST — run and get resultsbash
curl -X POST \
  "https://api.apify.com/v2/acts/logical_scrapers~youtube-comments-scraper/run-sync-get-dataset-items?token=YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"startUrls":["https://www.youtube.com/watch?v=dQw4w9WgXcQ"]}'
JavaScript — apify-clientjavascript
import { ApifyClient } from 'apify-client'

const client = new ApifyClient({ token: 'YOUR_API_TOKEN' })

const run = await client.actor('logical_scrapers~youtube-comments-scraper').call({
  "startUrls": [
    "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
  ]
})

const { items } = await client.dataset(run.defaultDatasetId).listItems()
console.log(items)
Python — apify-clientpython
from apify_client import ApifyClient

client = ApifyClient("YOUR_API_TOKEN")

run = client.actor("logical_scrapers~youtube-comments-scraper").call(run_input={
    "startUrls": [
        "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
    ],
})

for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

Runs are executed on Apify. Create an API token in your Apify account, then call the Actor over REST or with the official client for your language. The same input object works in the Apify console, so you can test interactively before automating.

Pricing

Data not currently verified. This Actor's pricing model is not declared in our source repository.

Current rates are published on the Apify listing and can change, so they are not duplicated here. See pricing on Apify

Reliability

99.4% run success rate

Measured across all public Goldmine Actors on Apify, 2026-08-24. This is an account-level figure, not a per-Actor benchmark — per-Actor speed and completeness benchmarks are not yet published. Source.

Field and input tables are generated from this Actor's published schemas. Usage figures measured 2026-08-24 from the Apify listing.