YouTube Comments Scraper avatar

YouTube Comments Scraper

Pricing

from $0.21 / 1,000 comments

Go to Apify Store
YouTube Comments Scraper

YouTube Comments Scraper

Scrape comments and replies from YouTube videos and Shorts: text, author, likes, reply count, pinned and creator-hearted flags. Top or newest first. No API key needed.

Pricing

from $0.21 / 1,000 comments

Rating

0.0

(0)

Developer

Solar G

Solar G

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

13 hours ago

Last modified

Share

Scrapes comments, and optionally replies, from YouTube videos and Shorts. Each comment has its text, author, like and reply counts, pinned and creator-hearted flags, plus the video's title and exact total comment count. No YouTube API key or quota is needed.

For a quick one-off check without an Apify account, a free web version with a small daily limit is available at purfled.com/youtube-comments-export.

Input

FieldDescription
videosVideo URLs (watch?v=, youtu.be/, /shorts/, /live/) or video IDs. Several URLs on one line separated by spaces are split.
maxCommentsPerVideoTop-level comments per video. Default 100.
sorttop (YouTube's default ranking) or newest.
includeRepliesAlso collect replies. Default false.
maxRepliesPerCommentReply limit per comment when replies are included. Default 20.
{
"videos": ["https://www.youtube.com/watch?v=jNQXAC9IVRw"],
"maxCommentsPerVideo": 500,
"sort": "newest",
"includeReplies": true,
"maxRepliesPerComment": 10
}

Output

Example from a real run:

{
"videoId": "jNQXAC9IVRw",
"videoTitle": "Me at the zoo",
"videoCommentCount": 10643771,
"input": "https://www.youtube.com/watch?v=jNQXAC9IVRw",
"commentId": "UgzuC3zzpRZkjc5Qzsd4AaABAg",
"parentCommentId": null,
"isReply": false,
"text": "We're so honored that the first ever YouTube video was filmed here!",
"author": "@SanDiegoZoo",
"authorChannelId": "UCC5NfQ6Mf0dq_eEwv4P_hWA",
"authorIsVerified": true,
"authorIsChannelOwner": false,
"likes": 4800000,
"replyCount": 986,
"publishedTimeText": "6 years ago",
"publishedAtApprox": "2020-10-25T00:39:38.215Z",
"isEdited": false,
"isPinned": true,
"isHeartedByCreator": true,
"url": "https://www.youtube.com/watch?v=jNQXAC9IVRw&lc=UgzuC3zzpRZkjc5Qzsd4AaABAg"
}

Field notes:

  • videoCommentCount is the exact total YouTube shows above the comments (including replies).
  • Replies have isReply: true and parentCommentId set.
  • YouTube shows only relative times ("3 days ago"), so publishedAtApprox is an estimate.
  • Comment likes above 1,000 are rounded by YouTube (for example 4.8M).
  • With sort: "newest", a pinned comment still comes first, as on YouTube.

Errors: a video that cannot be scraped gives one item with videoId, input and an error, and the run carries on with the other videos. Error items are not charged. The messages are:

  • "Comments are turned off for this video"
  • "Live streams have live chat, not comments"
  • "Age-restricted: comments need sign-in"
  • "Video not found, private or removed"
  • "Not a YouTube video URL or ID"
  • "This video has no comments yet"

API usage

curl -X POST "https://api.apify.com/v2/acts/solarg~youtube-comments-scraper/run-sync-get-dataset-items?token=YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{"videos": ["jNQXAC9IVRw"], "maxCommentsPerVideo": 200}'
from apify_client import ApifyClient
client = ApifyClient("YOUR_API_TOKEN")
run = client.actor("solarg/youtube-comments-scraper").call(run_input={"videos": ["jNQXAC9IVRw"], "maxCommentsPerVideo": 200})
items = client.dataset(run["defaultDatasetId"]).list_items().items

Pricing

$0.30 per 1,000 comments (replies count as comments). Error items are free. Apify paid plans get lower prices: 10% off on Bronze, 20% on Silver and 30% on Gold and above. Platform usage is included in the price.

Limitations

  • Comment order and availability are what YouTube shows publicly. Held-for-review and deleted comments are not visible.
  • Very large videos can take several minutes per 10,000 comments.

Report problems in the Issues tab.