YouTube Comments Scraper avatar

YouTube Comments Scraper

Pricing

from $0.15 / 1,000 comment extracteds

Go to Apify Store
YouTube Comments Scraper

YouTube Comments Scraper

Export public YouTube and Shorts comments, replies, authors, likes, creator signals, and thread metadata with keyword filters, retries, and downloadable datasets.

Pricing

from $0.15 / 1,000 comment extracteds

Rating

0.0

(0)

Developer

Fetch Cat

Fetch Cat

Maintained by Community

Actor stats

0

Bookmarked

12

Total users

3

Monthly active users

11 days ago

Last modified

Security

Limited permissions

Share

Export public YouTube video and Shorts comments and replies with stable IDs, source video context, visible likes and creator signals. Apply bounded keyword, like and reply controls, then download rows for separate research or analysis. Public comment samples do not represent every viewer or comments hidden, removed or unavailable to anonymous access.

Quick start

Choose a known public video, a small comment cap and whether replies are needed. The existing example uses a familiar video with top sorting:

{
"videoUrls": [
"https://www.youtube.com/watch?v=dQw4w9WgXcQ"
],
"maxCommentsPerVideo": 25,
"sort": "top",
"includeReplies": true,
"connectionMode": "automatic"
}

Prefer a video guide? This short Apify walkthrough shows you how to set up and run an Actor. It uses a different Actor, but the setup steps are the same.

Ready-to-run examples

What you get

One saved comment or reply row with video identity, available comment ID and link, author context, text, displayed publish time and collection time. Optional pins, hearts, edited flags, badges, likes and reply counts depend on what YouTube exposes. Relative publish text is not a precise historical timestamp, and badges are source signals rather than independent identity verification.

Who is it for?

  • Creators and community teams: review questions, complaints and content ideas from selected videos.
  • Agencies and social listening teams: prepare bounded viewer-feedback samples for client or competitor reporting.
  • Researchers: retain comment IDs, thread context and collection times for reproducible public-conversation samples.

How you can use the data

  • Prepare a bounded viewer-feedback sample. Collect a small top or newest sample for the existing dQw4w9WgXcQ video and keep sort, videoId and scrapedAt beside text. Topic or sentiment summaries belong in a separate analysis step and should describe the observed sample rather than all viewers.
  • Review thread context selectively. Enable replies with a low per-thread limit, retaining parentCommentId and isReply. Public reply counts can exceed the exposed sample, so missing rows do not establish that a conversation had no further replies.
  • Build a question or complaint review queue. Use include/exclude keywords and minimum visible likes when relevant, keeping the scan cap explicit. A filtered empty result can reflect the work limit or matching rules rather than an absence of that topic everywhere.
  • Compare your own recurring exports. Store commentId, videoId, runTag and scrapedAt in your destination, then deduplicate before reviewing additions. Schedules rerun the requested sources rather than providing a built-in complete comment history or automated moderation decision.

Input settings

SettingJSON keyWhat to enter
YouTube video URLsvideoUrlsPublic YouTube watch, Shorts, youtu.be, or embed URLs.
YouTube video IDsvideoIdsRaw 11-character IDs when you already have them.
Maximum comments per videomaxCommentsPerVideoCombined comment/reply cap per video and sort.
Maximum comments to inspectmaxCommentsToScanPerVideoScan cap per video and sort. Default is the smaller of 3× the row cap and 5,000.
Sort ordersorttop, newest or both. Both takes separately capped samples, which can overlap.
Include repliesincludeRepliesWhether reply rows are collected with top-level comments.
Maximum replies per threadmaxRepliesPerCommentBound reply fan-out for large threads.
Include/exclude keywordsincludeKeywords, excludeKeywordsCase-insensitive filtering on comment text and author.
Minimum likesminLikesSave only comments meeting a visible-like threshold.
Run tagrunTagAdd a workflow or campaign label to each row.
Safe deadlinemaxRunSecondsProcessing budget from the original run start. Does not renew on restart.
ConnectionconnectionModeautomatic uses the existing managed proxy route. direct has no paid fallback.

Provide at least one video URL or ID, with up to 100 unique videos per run. Watch, Shorts, embed and youtu.be links are supported. For a top-level-only sample, turn replies off. For thread context, keep replies on and set a small reply cap. Detailed connection choices and custom proxy settings are explained in the input form.

Output data

The existing illustrative row contains historical counts and relative dates, not a current audience measurement:

{
"videoId": "dQw4w9WgXcQ",
"videoUrl": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
"videoTitle": "Rick Astley - Never Gonna Give You Up (Official Video) (4K Remaster)",
"commentId": "Ugzge340dBgB75hWBm54AaABAg",
"parentCommentId": null,
"isReply": false,
"authorName": "@YouTube",
"authorChannelUrl": "https://www.youtube.com/@YouTube",
"authorThumbnailUrl": null,
"text": "can confirm: he never gave us up",
"likeCount": 255000,
"publishedTimeText": "1 year ago",
"replyCount": 960,
"sort": "top",
"scrapedAt": "2026-06-16T14:21:28.786Z"
}
FieldDescription
videoIdYouTube video ID
videoUrlCanonical YouTube watch URL
videoTitlePublic video title when exposed by YouTube
commentIdPublic comment identifier when exposed by YouTube
parentCommentIdParent comment ID for replies
isReplyWhether the row is a nested reply
authorNamePublic author display name
authorChannelUrlPublic author channel URL
authorThumbnailUrlPublic author avatar image URL
textComment or reply text
likeCountVisible like count when available
publishedTimeTextRelative published time shown by YouTube
replyCountVisible reply count when available
commentUrlDirect public URL to the comment when its ID is exposed
authorChannelIdStable public author channel ID when exposed
authorIsChannelOwnerWhether the author owns the video channel when exposed
authorIsVerifiedWhether YouTube exposes a verified-author badge
isPinnedWhether the comment is pinned when exposed
isEditedWhether the visible timestamp indicates an edited comment
hasCreatorHeartWhether the creator-heart signal is exposed
sortRequested comment sort mode
runTagOptional caller-supplied workflow label
scrapedAtISO timestamp when the row was saved

Download your results

Open your run's dataset, choose Export and select JSON, CSV or Excel. JSON keeps nested fields together. CSV and Excel are useful when you want to review the records in a spreadsheet.

See Apify's download and export guide for the available formats and field options.

Pricing

This Actor uses pay-per-event pricing. Input validation and durable fresh-run admission happen before the start charge. Each billed comment event corresponds to a row already stored in the dataset.

A fresh admitted execution charges the start event before extraction, even if it later returns no rows or fails. Saved public comments and replies are charged as comment events, including separately saved copies from overlapping top/newest samples. Nonmatching comments are not stored or charged as comment events. An abrupt interruption between storing rows, billing and saving the summary can leave saved rows with incomplete billing or summary counts. These operations are not one transaction. Reopening that execution does not reconcile uncertain charges or resume extraction.

See the live Pricing tab for current rates and subscription-tier discounts. Apify may also charge platform usage for compute, storage, proxies, or data transfer outside this Actor pricing.

Tips for best results

  • Start with a short known-video sample. Check public comment availability before increasing per-video caps.
  • Keep replies only when needed. Use parentCommentId and isReply to retain thread context without assuming every reply was exposed.
  • Bound filtered scanning. A scan limit can stop before enough keyword or minimum-like matches are found.
  • Keep stable comment identity. Deduplicate recurring exports downstream by commentId and retain videoId and collection time.
  • Read summary outcomes. Distinguish disabled or genuinely empty comments from inaccessible sources and filtered zero-row results.

Limits and caveats

  • Public coverage only. Hidden, removed, moderated or login-only comments cannot be returned. A playback sign-in prompt does not prevent extraction when comments remain public.
  • Bounded samples, not full archives. Row, scan, reply and runtime limits can stop before all comments are collected. A combined ceiling of 50,000 continuation pages per video/sort includes comment and reply pages, separately from inspected-row limits and bounded request retries. Reaching that ceiling with outstanding work fails the run and preserves saved rows. Top/newest samples may overlap. Filters can legitimately leave no matching saved rows.
  • Bounded in-memory identity. Deduplication retains fixed-size SHA-256 fingerprints of the existing comment and page-token identities, not full variable-length keys. Cryptographic collisions are negligibly unlikely, not mathematically impossible. The 512 MiB deployment also bounds V8 old-space to 320 MiB and semi-space to 8 MiB. These are heap controls, not a total process-memory guarantee.
  • New executions, not resurrection. The deadline is measured from the original run start. Restarted, resurrected, migrated or otherwise continued executions are rejected before new extraction or charges, as are runs whose fresh admission cannot be verified. Existing output is retained. Automatic recovery is deliberately not supported. Start a new run for another attempt and deduplicate overlapping exports downstream.
  • Source-backed empty results. Explicitly unavailable targets, disabled comments and reported zero comments can finish as EMPTY_SOURCE, with a per-input reason. Blocking and unreadable responses remain extraction errors, not proof of no comments.
  • Check completeness. RUN_SUMMARY records each video/sort outcome and saved-row count. Mixed failures can leave a PARTIAL summary even when the platform run says succeeded. A deadline still fails the run. BUDGET_LIMIT stops further extraction while preserving affordable saved rows.
  • Unknown is not zero. Visible likes, reply counts and creator signals can be missing. Relative publish text is not an exact timestamp.

Privacy and data handling

This Actor only requests the permissions needed to run the input you provide. It uses your input (such as URLs, search terms, identifiers, filters, and limits) only to fetch the requested public data from the relevant source site or API for this Actor, then writes results to your Apify dataset/key-value store.

Results are saved in your Apify storage. Requests may use Apify Proxy according to your connection settings. Failure diagnostics can include input with credentials removed and relevant error context so FetchCat can investigate problems. Do not submit secrets or unnecessary sensitive data in target URLs, filters or labels.

You are responsible for using this Actor lawfully, respecting the target site's terms, and avoiding unnecessary personal or sensitive data in inputs. Review the output before storing, sharing, or combining it with other data.

Automation and integrations

Save your settings for next time

Once you have an input that works for you, save it as an Apify task. This keeps your settings together so you can use them again without filling in the form from scratch.

Run on a schedule

Need fresh results regularly? You can schedule the Actor or a saved task to run at a time that suits you.

Each scheduled run collects the data again. If you want to compare results or highlight changes, add that step in your own workflow.

Send results to your other tools

Use n8n, Make or Zapier to connect this scraper to the rest of your workflow. For example, you could pass its results to an AI assistant or add records to a spreadsheet. Follow the Apify integration guides for your chosen tool.

For a custom connection, an Apify webhook can notify your app when a run finishes or fails. Your app can then fetch the results or handle the failure.

API usage

Want to collect this data from your own app or automation? The examples below send input to the scraper and show how to collect its results.

The Node.js and Python examples wait for the run to finish before reading its results. The cURL example starts the run and returns its details. Wait for that run to finish, then use its defaultDatasetId to fetch the results.

For setup instructions, see Apify's JavaScript client guide, Python client guide and Actor runs API reference.

cURL

curl "https://api.apify.com/v2/acts/fetch_cat~youtube-comments-scraper/runs?token=$APIFY_TOKEN" \
-H 'Content-Type: application/json' \
-d '{
"videoUrls": ["https://www.youtube.com/watch?v=dQw4w9WgXcQ"],
"maxCommentsPerVideo": 25,
"sort": "top",
"includeReplies": true
}'

Node.js

import { ApifyClient } from 'apify-client';
const client = new ApifyClient({ token: process.env.APIFY_TOKEN });
const run = await client.actor('fetch_cat/youtube-comments-scraper').call({
videoUrls: ['https://www.youtube.com/watch?v=dQw4w9WgXcQ'],
maxCommentsPerVideo: 25,
sort: 'top',
includeReplies: true,
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items);

Python

from apify_client import ApifyClient
client = ApifyClient('MY-APIFY-TOKEN')
run = client.actor('fetch_cat/youtube-comments-scraper').call(run_input={
'videoUrls': ['https://www.youtube.com/watch?v=dQw4w9WgXcQ'],
'maxCommentsPerVideo': 25,
'sort': 'top',
'includeReplies': True,
})
items = client.dataset(run['defaultDatasetId']).list_items().items
print(items)

MCP and AI agents

You can ask your AI assistant to collect data with YouTube Comments Scraper and help you work with the results. The scraper returns the data, and your assistant can then summarize it, compare records or prepare notes.

Connect your assistant through the Apify MCP server. MCP gives your assistant a way to find this scraper, run it and read the results. Follow the official setup and sign-in guide for your app.

Easier setup with an Apify plugin

If you use a supported coding assistant, the official Apify plugin can set up the connection for you. It connects your assistant to Apify and includes instructions for common tasks. Follow the guide for your particular app.

Use Apify AI in Console

Prefer to keep everything in Apify? Open Apify AI in Console and ask it to find Fetch Cat's YouTube Comments Scraper. You can describe the data you want and ask questions about the results.

Apify AI is currently in beta. It asks for confirmation before starting an Actor, and normal run charges apply.

Choose your assistant

Connect just this scraper

To keep your setup focused on this scraper, add this server configuration to a compatible MCP client:

{
"mcpServers": {
"apify": {
"url": "https://mcp.apify.com?tools=fetch_cat/youtube-comments-scraper"
}
}
}

Sign in to Apify when your client asks. If your client uses a Bearer token instead, follow its setup guide and keep the token in its secure configuration. Configuration formats vary by app, so use the linked guide if your client needs a different format.

Use Apify's general server

Already connected to the general Apify MCP server at https://mcp.apify.com? You can use it to find this scraper without adding another server. Ask your assistant to use YouTube Comments Scraper by Fetch Cat, or give it the identifier fetch_cat/youtube-comments-scraper.

Your assistant can check the available settings and retrieve the results from the returned run. If the run is still working, it should follow that run rather than start it again. Both connection options use Apify's hosted service.

Example requests

  • “Get five top comments from Rick Astley’s Never Gonna Give You Up video, without replies. Keep their source links so I can review the sample.”
  • “Retrieve five newest comments from https://www.youtube.com/watch?v=dQw4w9WgXcQ, including at most two replies per thread. Group the returned replies under their parent comments for review.”
  • “From that video, inspect at most fifteen comments and return up to five mentioning music, without replies. Put the returned text and available likes into a short table, and explain if none matched.”

Normal Apify charges apply. Check the live Pricing tab before asking your assistant to run a larger batch.

Pay with x402

If your AI agent has a funded wallet, it can pay for Apify usage through x402. This experimental option lets an agent use Apify without a conventional account.

Apify AGI provides a prepaid API token with a spending cap after payment. Your agent can use that token to run this scraper through the Apify API or an authenticated MCP connection.

Some MCP setups also support paying for each request directly. That is a different payment option, so check the official guide for its availability.

Follow the official guide for wallet setup, supported payment options and current terms. Apify handles the payments. Keep wallet keys and payment tokens in your agent's secure configuration.

Other ways for agents to pay

Apify also supports MPP for prepaid access through AGI and Skyfire for eligible Actors. If your agent already uses one of these, see the agentic payment guide to choose the right setup.

FAQ

Can I scrape multiple videos in one run?

Yes. Add multiple video URLs or IDs to the input.

Can I get replies?

Yes. Enable includeReplies to include nested replies when YouTube exposes them.

Can I export to CSV?

Yes. Apify datasets can be downloaded as CSV, JSON, Excel, XML, RSS, and HTML.

Can I run this from code?

Yes. Use the Apify API, JavaScript client, Python client, webhooks, schedules, or MCP.

Does this require a YouTube account?

No. The actor is designed for public comments visible without login.

Troubleshooting

Why did I get zero comments?

Check RUN_SUMMARY in the default key-value store. Explicitly unavailable/login-gated targets, disabled comments and sources reporting zero comments finish as EMPTY_SOURCE, with the source-backed reason in outcomes. Unknown, blocked or unreadable comment responses remain errors, not proof of an empty source. Keyword and minimum-like filters can legitimately produce zero stored rows. BUDGET_LIMIT means the run charge limit stopped further extraction. Saved comments remain available.

Why did restart or resurrection stop without extracting?

This Actor fails closed when an execution was already admitted or its fresh-run/storage history cannot be verified. Check LIFECYCLE_DIAGNOSTIC in its default key-value store. It preserves existing rows, original admission and summaries rather than repeating extraction or guessing whether interrupted charges completed. Start a new run, not a resurrection, and review the previous dataset before combining exports. A new run can incur its own start and saved-row charges. For local execution, use a new isolated storage directory for each fresh run.

Why are some fields null?

YouTube does not expose every field for every comment.

The actor keeps the row instead of inventing values.

Which connection should I choose?

Keep Automatic for the existing managed-proxy behavior, or choose Direct when you want no proxy. Direct never switches to a paid connection. Neither option guarantees access. See the input help for custom pools and settings precedence.

Explore other actors by the same developer on Apify:

Support and feedback

For custom additions or integrations, email hello@fetchcat.dev.

Found an error or have a feature request? Open an issue with the run URL, a non-sensitive input example and what you expected.

Need help sharing it? See Apify’s guide to sharing a run when reporting an issue. Sharing a run can give the developer access to its input, logs and results, so use a run that contains no sensitive data. Please leave out API tokens, passwords, cookies, private documents and personal data. Use a public sample URL or a redacted example instead.

Tried this scraper? We'd love to hear how it worked for you. Leave a review to help others choose the right tool and help us improve it. Your feedback means a lot to us.

Made with care for curious people, AI agents and the possibilities in data. ♥