Youtube Comment Scraper
Pricing
$0.40 / 1,000 results
Youtube Comment Scraper
** 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)
- Open this Actor in Apify Console.
- Paste your YouTube video URL(s) into
startUrls. - 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 ApifyClientclient = 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 withurlfields.maxComments(integer | optional) β Max comments per video (use withgetAllComments=false).getAllComments(boolean | optional) β When true, fetches all available comments.sortBy(string | optional) βtop,newest, oroldest.proxyConfig(object | optional) β Proxy settings (e.g.,{ "useApifyProxy": true }).
βοΈ Configuration (Quick reference)
| π Name | π Type | β Required | βοΈ Default | π Example | π§ Notes |
|---|---|---|---|---|---|
| startUrls | array | β Yes | null | ["https://www.youtube.com/watch?v=abcd1234"] | Primary input β required. |
| maxComments | integer | β No | null | 200 | Limits results when getAllComments is false. |
| getAllComments | boolean | β No | false | true | Toggle full extraction. |
| sortBy | string | β No | "top" | "newest" | Sorting preference. |
| proxyConfig | object | βοΈ 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)
- Console β Paste JSON input and click Run. Results in default dataset.
- CLI β
apify run -p input.json. - API β Use
apify-clientto call the actor; fetchdefaultDatasetIdfor 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 instartUrls.- Empty output β video may be private or comments disabled.
- Rate-limiting / network errors β enable
proxyConfigor 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, andsortByinputs. - 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 shortenedyoutu.belinks. - For large runs, set
getAllCommentstotrueand consider using Apify Proxy. - Keep
maxCommentsif you want a controlled result set for sampling.
Troubleshooting tips
- If dataset is empty, verify the video is public and has comments enabled.
- Use
maxCommentsto reduce runtime and avoid transient rate limits.
Security
- Always keep
APIFY_TOKENand proxy credentials in Apify secrets. - Do not store sensitive credentials in input JSON.
End of saved files.
On this page
-
- π Summary
- π‘ Use cases / When to use
- β‘ Quick Start (Console β one click)
- βοΈ Quick Start (CLI & API)
- π Inputs (fields & schema highlights)
- βοΈ Configuration (Quick reference)
- π Outputs (dataset / KV examples)
- π Environment Variables
- βΆοΈ How to Run (step-by-step)
- β° Scheduling & Webhooks
- πΎοΈ Logs & Troubleshooting
- π Permissions & Storage notes
- π Changelog / Versioning tip
- π Notes / TODOs
- π Proxy Configuration
- π References
- π€ What I inferred from main.py
Share Actor:
