SocialHz Engineering · 26 October 2026 · Requested by a customer
Comments API with per-comment sentiment
GET /api/v1/comments · GET /api/v1/search?get_sentiment=true
What shipped
Send a post's url to GET /api/v1/comments and get its comments, a page at a time, from X, YouTube, TikTok, Facebook, Instagram, Reddit or LinkedIn. Every comment has a sentiment object. Search posts can have one too.
Why
A brand team was reading hundreds of comments under launch posts by hand to judge the reaction. They asked for the comments with the tone already scored, in a form they could chart.
Request and response
GET /api/v1/comments?url=https://www.youtube.com/watch?v=<id>&pages=2
{
"comments": [{
"id": "Ugz…", "post_id": "<id>", "parent_id": null,
"text": "…", "published_at": "2026-10-20T15:07:00Z",
"like_count": 0, "reply_count": 0,
"sentiment": { "polarity": "negative", "score": 0.29, "confidence": 0.73 }
}],
"sentiment": { "positive": 8, "neutral": 29, "negative": 63, "unknown": 0, "score": 0.321 },
"has_more": true, "next_cursor": "…"
}The sentiment object
- polarity: positive, neutral or negative.
- score: 0 (most negative) through 0.5 (neutral) to 1 (most positive).
- confidence: 0 to 1.
- It judges the tone the author expresses, in any language. News and plain statements of fact usually come out neutral.
- A comment with no text, or one that couldn't be judged, gets null. Sentiment costs no extra credits.
Threads and progress
parent_id is the comment a reply answers, or null for a comment on the post itself.
progress.expected_total is the comment count the post shows, when it's known. A post you found with search in the last day carries its count, or you can send comments_count yourself. The platform's count can include deleted or hidden comments, so the last page may end a little below it.
Sentiment in search
Add get_sentiment=true to a search to score every post, or sentiment=negative (or a comma list) to keep only those posts. summary then splits the posts by polarity.
GET /api/v1/search?platform=youtube&query=wireless+earbuds&sentiment=negative
Request a feature
Tell us what you need on the updates page. The engineering team reads every request.