Skip to content

Comments

YouTube Comments API

Scrape YouTube comments with authors, likes, and reply threads included, structured for your AI agent.

Scrape the full comment section from any YouTube video and get structured data back. Each comment includes the author, like count, publish time, and reply count, plus whether the creator pinned it, hearted it, or replied.

Every comment includes a repliesToken to fetch its nested thread. Follow the continuationToken to page through the entire comment section from top to bottom.

Endpoint

POST https://api.stophy.dev/v1/video

Request
1curl -X POST https://api.stophy.dev/v1/video \
2 -H "Authorization: Bearer $STOPHY_API_KEY" \
3 -H "Content-Type: application/json" \
4 -d '{"videoUrl":"https://youtu.be/YkOSUVzOAA4","type":"comments","sortBy":"top"}'
Response
1{
2 "videoId": "YkOSUVzOAA4",
3 "sortBy": "top",
4 "items": [
5 {
6 "id": "Ug...",
7 "text": "T3 Stack = Illegal productivity levels",
8 "author": "@example",
9 "likeCount": 262,
10 "replyCount": 4,
11 "isHearted": true,
12 "isPinned": false,
13 "isChannelOwner": false,
14 "publishedAt": "2022-11-04T00:00:00Z",
15 "repliesToken": "EpQD..."
16 }
17 ],
18 "continuationToken": "Eg0SC..."
19}

What you can do

Creator signals included

isHearted, isPinned, isChannelOwner, and hasChannelOwnerReplied on every comment. Instantly see what the creator engaged with.

Full reply threading

Every comment includes a repliesToken. Use it to fetch the complete nested thread for any comment.

Sort by top or newest

Surface the most-liked comments first, or switch to newest for the freshest discussion.

Common use cases

  • Run sentiment analysis on audience reactions to a launch or announcement
  • Find creator-pinned and creator-hearted comments as quality signals
  • Cluster questions across a comment section to surface recurring FAQs
  • Track how audience reactions shift across a channel over time

Frequently asked questions

How do I fetch replies to a specific comment?
Every comment object includes a repliesToken. Send it back with type set to replies to get the full reply thread for that comment.
Can I read the entire comment section?
Yes. Follow the continuationToken in each response until it is absent and you will have every top-level comment. Each comment's repliesToken lets you expand any thread.
What creator signals are included?
Each comment has isChannelOwner, isHearted, isPinned, and hasChannelOwnerReplied flags, so you can see immediately what the creator engaged with most.