Youtube Comment Scraper avatar
Youtube Comment Scraper

Pricing

$0.40 / 1,000 results

Go to Apify Store
Youtube Comment Scraper

Youtube Comment Scraper

Developed by

Neuro Scraper

Neuro Scraper

Maintained by Community

** Cheapest YouTube Comment Scraper**! πŸŽ₯ Turn comments πŸ’¬ into insights 🧠 for **research, marketing, and sentiment analysis** πŸ“Š. Fast ⚑, accurate 🎯, and effortless β€” your shortcut to understanding real emotions behind every video πŸš€.

0.0 (0)

Pricing

$0.40 / 1,000 results

1

2

2

Last modified

a day ago


FILE: README.md


🌟 YouTube Comment Scraper

⚑ Instant audience insights β€” collect, analyze, and export YouTube comments with zero friction.


πŸ“– Summary

A production-ready Apify Actor that extracts structured YouTube comments quickly and reliably. Ideal for research, marketing, sentiment analysis, and trend detection β€” plug-and-play in Apify Console.


πŸ’‘ Use cases / When to use

  • Research & academic analysis (qualitative + quantitative).
  • Sentiment analysis and brand monitoring.
  • Creator & community engagement insights.
  • Training data collection for NLP models.

⚑ Quick Start (Console β€” one click)

  1. Open this Actor in Apify Console.
  2. Paste your YouTube video URL(s) into startUrls.
  3. Click Run β€” results appear in the default dataset in seconds.

βš™οΈ Quick Start (CLI & API)

CLI

$apify run -p input.json

Python (apify-client)

from apify_client import ApifyClient
client = ApifyClient('<APIFY_TOKEN>')
run = client.actor('your-actor-id').call(run_input={
'startUrls': ['https://www.youtube.com/watch?v=abcd1234'],
'maxComments': 100,
'getAllComments': False,
'sortBy': 'top'
})
print('Dataset ID:', run['defaultDatasetId'])

πŸ“ Inputs (fields & schema highlights)

Always use JSON input for Console / CLI / API.

  • startUrls (array | required) β€” List of YouTube video URLs or objects with url fields.
  • maxComments (integer | optional) β€” Max comments per video (use with getAllComments=false).
  • getAllComments (boolean | optional) β€” When true, fetches all available comments.
  • sortBy (string | optional) β€” top, newest, or oldest.
  • proxyConfig (object | optional) β€” Proxy settings (e.g., { "useApifyProxy": true }).

βš™οΈ Configuration (Quick reference)

πŸ”‘ NameπŸ“ Type❓ Requiredβš™οΈ DefaultπŸ“Œ Example🧠 Notes
startUrlsarrayβœ… Yesnull["https://www.youtube.com/watch?v=abcd1234"]Primary input β€” required.
maxCommentsinteger❌ Nonull200Limits results when getAllComments is false.
getAllCommentsboolean❌ NofalsetrueToggle full extraction.
sortBystring❌ No"top""newest"Sorting preference.
proxyConfigobjectβš™οΈ Optional{}{"useApifyProxy": true}Proxy options for network reliability.

Console mini-example: Paste this into Input and click Run

{ "startUrls": ["https://www.youtube.com/watch?v=abcd1234"], "maxComments": 50 }

πŸ“„ Outputs (dataset / KV examples)

Each dataset item represents one comment with structured fields.

Example output item:

{
"cid": "Ugxyz123abc",
"author": "Jane Doe",
"text": "Great tutorial β€” helped me a lot!",
"votes": 124,
"time_text": "2 days ago",
"time_unix": 1716239023,
"video_id": "abcd1234",
"video_url": "https://www.youtube.com/watch?v=abcd1234",
"total_available_comments": 523
}

πŸ”‘ Environment Variables

Use placeholders for secrets.

  • APIFY_TOKEN: <APIFY_TOKEN> β€” required for API/CLI runs.
  • HTTP_PROXY: http://<PROXY_USER:PASS@HOST:PORT> β€” optional.
  • HTTPS_PROXY: https://<PROXY_USER:PASS@HOST:PORT> β€” optional.

▢️ How to Run (step-by-step)

  1. Console β€” Paste JSON input and click Run. Results in default dataset.
  2. CLI β€” apify run -p input.json.
  3. API β€” Use apify-client to call the actor; fetch defaultDatasetId for results.

⏰ Scheduling & Webhooks

  • Use Apify Schedules to run automatically (hourly/daily).
  • Attach Webhooks to trigger downstream processes (e.g., downstream ML or dashboards).

πŸ•ΎοΈ Logs & Troubleshooting

Common messages & quick fixes

  • No startUrls provided β€” Add valid YouTube URLs in startUrls.
  • Empty output β†’ video may be private or comments disabled.
  • Rate-limiting / network errors β†’ enable proxyConfig or Apify Proxy.

πŸ”’ Permissions & Storage notes

  • Outputs are stored in the Apify default dataset.
  • No personal credentials are stored in plaintext β€” always use secrets.
  • Privacy-safe: collects public comments only; follow YouTube terms of service.

πŸ”Ÿ Changelog / Versioning tip

  • v1.0 β€” Initial production-ready release.
  • Versioning tip: bump major for breaking changes to input schema.

πŸ–Œ Notes / TODOs

  • TODO: Consider proxy rotation for large-scale scraping β€” main.py performs network calls.
  • TODO: Add optional post-processing hooks (e.g., sentiment flag) β€” non-breaking enhancement.

🌍 Proxy Configuration

If you encounter network issues or rate limits, enable Apify Proxy or set custom proxies.

Enable Apify Proxy (Console) β€” toggle proxyConfig.useApifyProxy to true.

Custom proxy example

{ "proxyConfig": { "proxyUrls": ["http://<PROXY_USER:PASS@HOST:PORT"] } }

Env vars

HTTP_PROXY=http://<PROXY_USER:PASS@HOST:PORT>
HTTPS_PROXY=https://<PROXY_USER:PASS@HOST:PORT>

Remember to store credentials as Apify secrets, not in plain input. TODO: Consider proxy rotation for large-scale scraping.


πŸ“š References

  • Apify Actor README Guidelines β€” official docs.
  • Input/Output schema β€” official docs.
  • Apify CLI & API docs β€” official docs.

πŸ€” What I inferred from main.py

  • Actor extracts YouTube comments from provided video URLs.
  • Supports maxComments, getAllComments, and sortBy inputs.
  • Async architecture for efficient fetching.
  • Network activity detected β†’ Proxy guidance included.

Run this Actor on Apify Console β€” get instant results in seconds.


FILE: input.example.json


{ "startUrls": [ "https://www.youtube.com/watch?v=abcd1234", "https://youtu.be/wxyz5678" ], "maxComments": 100, "getAllComments": false, "sortBy": "top", "proxyConfig": { "useApifyProxy": true } }


FILE: CONFIG.md


CONFIG.md β€” Quick configuration & tips

Purpose

Small reference for operators deploying this actor at scale.

Important notes

  • Input schema expects startUrls (array). Supports both full YouTube links and shortened youtu.be links.
  • For large runs, set getAllComments to true and consider using Apify Proxy.
  • Keep maxComments if you want a controlled result set for sampling.

Troubleshooting tips

  • If dataset is empty, verify the video is public and has comments enabled.
  • Use maxComments to reduce runtime and avoid transient rate limits.

Security

  • Always keep APIFY_TOKEN and proxy credentials in Apify secrets.
  • Do not store sensitive credentials in input JSON.

End of saved files.