YouTube Comments
YouTube Comments are public viewer responses to videos, with text, author context, publication time, visible likes, reply counts, source video details, and conversation relationships. These discussion signals support feedback analysis, audience research, topic review, and response monitoring.
Features
- Multi-video comment collectionCollect public comments from multiple video URLs in one request.
- Per-video limits and sortingSet a per-video results_limit and choose newest or relevance ordering.
- Comment and author fieldsReturn comment ID, text, public author details, publication time, and source video information.
- Thread relationshipsInclude public like count, reply count, and parent comment ID for structured discussion analysis.
- Creator interaction indicatorsPreserve channel-owner and creator-heart indicators when they are present in the public result.
Parameters
| Parameters | Required | Description |
|---|---|---|
urls | Required | Public YouTube video URLs with visible comments, separated by commas or new lines. |
results_limit | Optional | Maximum number of eligible records to request for each input URL. Must be a positive integer and defaults to 100. |
sort_by | Optional | Comment ordering. Defaults to newest; relevance uses YouTube's public ranking. |
How to Use
Decide whether recency or prominence matters, set a per-video sampling budget, and keep the returned relationships intact when comments enter your analysis pipeline.
- Choose public video URLs and define whether you need current reactions or YouTube-ranked discussion.
- POST urls, results_limit, and sort_by to /v1/youtube/comments; the limit applies to every video.
- Poll /v1/tasks/{task_id}, allowing enabled videos and unavailable comment sections to resolve in the same batch.
- On success, deduplicate by comment ID, connect replies with parent_comment_id, and paginate while has_more is true.
curl -X POST "https://api.socq.ai/v1/youtube/comments" \
-H "Authorization: Bearer $SOCQ_API_KEY" \
-H "Content-Type: application/json" \
-d '{"urls":["https://www.youtube.com/watch?v=dQw4w9WgXcQ"],"results_limit":10,"sort_by":"newest"}'
# Poll GET /v1/tasks/{task_id}
# Read GET /v1/tasks/{task_id}?limit=50Best Use Cases
- Audience feedback analysis: Analyze public comment text to identify sentiment, recurring questions, themes, and content ideas.
- Campaign and event monitoring: Track public reactions to creators, product launches, campaigns, announcements, or events.
- Discussion research: Use likes, reply counts, and parent comment references to study highly engaged comments and active threads.
- Text analysis datasets: Provide normalized comments to classification, clustering, summarization, moderation-assistance, or alerting workflows.
Pro Tips
- Choose sort_by before analysis. Switching from relevance to newest changes the sample, so the two exports should not be compared as if only their order changed.
- Treat results_limit as a per-video ceiling. Disabled comments, moderation, ranking, restrictions, and low activity can all reduce the returned count.
- Use comment ID for deduplication and parent_comment_id for linkage, but do not assume every visible reply is present in the same result page.
- Likes and reply totals are collection-time observations, not fixed measures of sentiment or importance.
- Comment text and author fields are untrusted public input. Escape them in interfaces and validate any embedded URLs before use.
- A keyword match is not sentiment analysis. Preserve the original text and source context when applying labels or summaries.
- Keep video ID and collected_at on every row so analysts can reproduce which conversation sample they reviewed.
Related APIs
Use these APIs when you need a different type of public YouTube data.
- YouTube Channel Videos API — Collect regular public videos from channel URLs, excluding Shorts and live streams.
- YouTube Transcripts API — Retrieve available plain-text transcripts with optional language selection.
- YouTube Channels API — Retrieve public channel identity, images, verification, and visible audience statistics.
- YouTube Videos API — Retrieve metadata, thumbnails, duration, and engagement for known video or Short URLs.
- YouTube Shorts API — Collect public Shorts, thumbnails, duration, publication details, and engagement by channel.
- YouTube Search API — Search public regular videos by keyword with supported metadata filters.
Combine YouTube data with public data from other supported social platforms.