Read comments and replies
See where comments, replies and comment search exist, and which call to use on each platform
Each platform that shows comments has its own call for them, and most have one for replies too. This page lists them, shows how to price one for free, and points to the call that reads many posts at once.
Price a comments call for free
Ask for the price of a call before you send it. The estimate takes the endpoint's id and the same parameters, costs nothing and creates nothing.
curl -G "https://www.socialcrawl.dev/v1/utility/estimate" \
-H "x-api-key: sc_your_key_here" \
--data-urlencode "id=youtube/video/comments" \
--data-urlencode "url=https://www.youtube.com/watch?v=dQw4w9WgXcQ"{
"success": true,
"data": {
"id": "youtube/video/comments",
"valid": true,
"hold": 1,
"expected_min": 1,
"expected_max": 1,
"pricing": "metered",
"levers": [
{ "param": "label", "hold": 5, "effect": "label=spam raises the hold to 5 credits." }
]
},
"credits_used": 0
}hold is what the call reserves before it runs. levers names the options that change the price. A call that fails is refunded.
Which call reads comments?
Every endpoint whose job is comments or replies, with its price per call:
Read one post's comments and replies
Send the post's URL to its platform's comments endpoint. Each response is one page, and pagination.next_cursor fetches the next.
curl -G "https://www.socialcrawl.dev/v1/youtube/video/comments" \
-H "x-api-key: sc_your_key_here" \
--data-urlencode "url=https://www.youtube.com/watch?v=dQw4w9WgXcQ"Replies are a second call on most platforms. The replies endpoint in the table takes the comment, or the token the comments response gave for it. To get both in one request, use GET /v1/prism/comments. It walks the thread and nests each comment's replies under it. Reddit and Hacker News always return the whole nested thread.
Can I search comments?
Reddit has its own comment search, GET /v1/reddit/search/comments. On X a reply is a post, so GET /v1/twitter/search/tweets finds replies along with other posts. Instagram and TikTok have no comment search. To find what people say under posts about a topic on those platforms, read the comments of the posts a search found. Discover does that in one run.
Comments from many posts at once
POST /v1/prism/post-comments takes a list of post URLs from several platforms and returns each post's comments in one call. The comments in bulk cookbook walks through it and turns it into a poll for new comments only. For a long list of one platform's calls, background jobs run them for you.
How do I read the reply counters on a comments response?
Each entry in data.comments from GET /v1/prism/comments is { comment, replies }. The replies sit in the replies array beside their comment and never appear as separate entries. The counters count like this:
total_fetchedis the top-level comments scanned, before anylimit.returnedis the top-level comments incomments.replies_returnedis the replies nested under those comments.parents_expandedis how many comments carry at least one reply.completedistruewhen the whole thread was read. It isfalsewhen a limit or the time budget stopped the scan, andnext_cursorthen resumes it.replies_truncatedis on a single comment. It istruewhen that comment has more replies than were fetched.
The replies parameter nests the replies under every comment whose engagement.replies is above zero. It is on by default for TikTok, YouTube and Facebook. On Instagram it is off unless you send replies=true. Each replies call that returned replies costs 1 credit, and the walk covers up to 100 comments and 10 replies pages per comment in one call. Send replies=false when you only want the top comments. Reddit and Hacker News always return their whole nested thread.
curl "https://www.socialcrawl.dev/v1/prism/comments?url=https://www.youtube.com/watch?v=dQw4w9WgXcQ&replies=true&sort=top&max=100" \
-H "x-api-key: sc_your_key_here"