youtube/
comments

Use the YouTube Comments API to collect publicly visible YouTube comments from one or more video URLs, returning normalized text, authors, likes, reply counts, source videos, and conversation context.

YouTube Comments API

Comments
Discussion data
Video URLs
0.3 credits / result
Ready
Ready

Enter parameters and send a request. The task status and normalized results will appear here.

README

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.

YouTube Comments API Features

  • Multi-video comment collectionA single YouTube Comments API request can collect public comments from multiple video URLs.
  • 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.

YouTube Comments API Parameters

ParametersRequiredDescription
urlsRequiredPublic YouTube video URLs with visible comments, separated by commas or new lines.
results_limitOptionalMaximum number of eligible records to request for each input URL. Must be a positive integer and defaults to 100.
sort_byOptionalComment ordering. Defaults to newest; relevance uses YouTube's public ranking.

How to Use the YouTube Comments API

Decide whether recency or prominence matters, set a per-video sampling budget, and keep the returned relationships intact when comments enter your analysis pipeline.

  1. Choose public video URLs and define whether you need current reactions or YouTube-ranked discussion.
  2. POST urls, results_limit, and sort_by to /v1/youtube/comments; the limit applies to every video.
  3. Poll /v1/tasks/{task_id}, allowing enabled videos and unavailable comment sections to resolve in the same batch.
  4. 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=50

YouTube Comments API 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.

YouTube Comments API 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.

Beyond the YouTube Comments API, use these APIs when you need a different type of public YouTube data.

Explore other platforms

Combine YouTube data with public data from other supported social platforms.

YouTube Comments API — FAQ

YouTube Comments API collects publicly visible comments from one or more YouTube video URLs. It returns normalized text, author details, publication time, likes, reply counts, source video references, parent comment IDs, and collection time.

Submit one or more public YouTube video URLs, an optional results_limit, and an optional sort_by value.

Use newest for newest-first comments or relevance for YouTube's public relevance order. newest is the default.

Reply records can include parent_comment_id, while replies_count shows the public number of replies associated with a comment.

results_limit is a maximum per video. Videos with disabled, filtered, restricted, or fewer publicly visible comments can return fewer records or an empty result.

The YouTube Comments API charges 0.3 credits for each normalized comment result returned.

By SocQ · Updated

From the official YouTube API documentation:

“Projects that enable the YouTube Data API have a default quota allocation of 100 search.list calls, 100 videos.insert calls, and 10,000 units per day combined for all other endpoints.”
Google for Developers: YouTube Data API quota costs · accessed November 2026