# Prism Comments API (https://www.socialcrawl.dev/platforms/prism/comments) > Give it any TikTok, YouTube, Facebook, Reddit, Hacker News, or Instagram post URL and it harvests every top-level comment (paginated to the end) with ALL of each comment's replies nested under it, in one call. Each entry in `data.comments` is `{ comment, replies }`: a comment's replies are the `replies` array beside it, never separate entries, so `returned` and `total_fetched` count top-level comments and `replies_returned` counts the replies nested under them (`parents_expanded` is how many comments carry any). On TikTok, YouTube and Facebook (replies on by default) and on Instagram (when you send `replies=true`), every returned comment whose `engagement.replies` is above zero gets its replies fetched and their pages walked to the end, up to 100 parent comments and 10 replies pages per comment per call. A comment whose replies a limit, the time budget or a failed replies call stopped short is marked `replies_truncated: true` and the response says `completed: false`; nothing is dropped silently. Reddit and Hacker News return their whole nested thread; on Reddit, a reply branch the scan's credit or time budget cannot reach is marked the same way. Instagram without `replies=true` comes back top-level only, as before; you can also fetch one comment's replies yourself from `GET /v1/instagram/post/comment/replies` (post `url` plus the parent `comment_id`, cursor-paged, 1 credit a call). Pass `sort=top` to get the most-liked comments first (ranked by `engagement.likes`): ideal for pulling the top comments on a high-volume post; pair it with `limit` to cap how many you get back (e.g. `sort=top&max=500&limit=200` scans ~500 and returns the top 200). YouTube sorts upstream so its top set is exact; other platforms are sorted across the scanned set. Metered at 1 credit per comment page plus 1 credit per replies call that returned replies (minimum 2). The upfront hold covers the pages `max` implies plus 1 credit per parent comment it may expand (3 on Instagram, whose replies come 15 to a page), and everything unused is refunded. `sort`/`limit` never change the price. Instagram is the exception: an Instagram post URL is a flat 5 credits per call whatever `max` you pass, because that source returns the comment set in one call rather than by page; with `replies=true` it adds 1 credit per replies call that returned replies. Returns sync JSON, or a typed SSE stream when you send `Accept: text/event-stream`: a `page` chunk lands as each page settles. The `next_cursor` is one opaque token that resumes every leg; `legs[]` reports each page's and each replies call's status, cost, and latency. TL;DR: `GET /v1/prism/comments` costs 1 credit per comment page scanned plus 1 per replies call that returned replies. An Instagram post URL is a flat 5 credits whatever `max` you pass, plus 1 per replies call only when you send `replies=true` and returns SocialCrawl's unified JSON schema. Single x-api-key auth, 100 free credits on signup. ## Parameters | Parameter | Required | Description | | --- | --- | --- | | `url` | yes | Absolute http(s) URL of the post whose comments to harvest. | | `max` | no | Stop after roughly this many top-level comments (1-5000, default 1000). Whole pages are returned, so the actual count can slightly exceed this. Drives billing and, for `sort=top`, the depth of the ranking scan. | | `replies` | no | Nest every reply under the comments that have them (`engagement.replies` above zero), walking each comment's replies pages to the end: up to 100 comments and 10 replies pages per comment per call, 1 credit per replies call that returned replies. Default true on TikTok, YouTube and Facebook. On Instagram it is off unless you send `replies=true`, which adds 1 credit per replies call to the flat 5. A comment a limit or the time budget stopped short is marked `replies_truncated: true` and the response says `completed: false`. Reddit and Hacker News always return their whole nested thread and ignore it. Pair with `replies=false` when you only want the top comments. | | `cursor` | no | Opaque composite cursor from a prior response's `next_cursor` to resume harvesting. | | `sort` | no | `recent` (default: natural order) or `top` (most-liked first, ranked by each comment's like count). With `top`, the response adds `sorted_by: "likes_desc"`. On Instagram, `top` returns the platform's own ranked head (`sorted_by: "popular"`) rather than a re-sort, and that head is finite: use the default `recent` to harvest a whole Instagram thread. (top \| recent) | | `limit` | no | Cap on how many top-level comments to return after sorting/scanning (1-5000, defaults to `max`). Truncates only the returned set, never what was scanned or billed. The response reports `returned`. | ## Code example ```bash curl -G "https://www.socialcrawl.dev/v1/prism/comments" \ --data-urlencode "url=https://www.youtube.com/watch?v=dQw4w9WgXcQ" \ -H "x-api-key: sc_YOUR_API_KEY" ``` ## FAQ ### How do I get all the comments on a post? Send GET /v1/prism/comments?url= with your API key. SocialCrawl's comments API paginates the post's comments to the end for you and nests replies where the platform supports it, so you never drive a cursor or chase a reply token yourself. ### Which platforms does the comments API support? TikTok, YouTube, Facebook, Reddit, Hacker News, and Instagram. TikTok, YouTube, and Facebook expand replies under each comment; Reddit and Hacker News return their whole nested thread; Instagram is top-level only because it has no reply endpoint. A platform with no comments endpoint returns a 400 at zero credits. ### Does the response include nested replies? Yes. Each comment comes back as a node with its replies nested underneath, on TikTok, YouTube, and Facebook. Pass replies=false to fetch top-level comments only and skip the reply-expansion credits. Reddit and Hacker News always arrive as a nested tree. ### How is the comments API priced? It is metered at 1 credit per internal page call, with a 2-credit minimum. A small post is 2 credits; a large thread is billed per page actually fetched and refunded down to that amount, and the max parameter caps the spend predictably. ### Can I stream comments as they are collected? Yes. Send Accept: text/event-stream and the endpoint returns typed SSE chunks: a page chunk lands as each page of comments settles, then a done chunk with the final credits used. The default application/json returns one synchronous envelope with every comment. See the full Prism API: https://www.socialcrawl.dev/platforms/prism ## Pricing - Standard endpoints: 1 credit per call - Advanced endpoints: 5 credits per call - Premium endpoints: 10 credits per call - 100 free credits on signup, no credit card required. Cached responses cost 0 credits. Credit packs never expire. - Full pricing: https://www.socialcrawl.dev/pricing ## Explore with AI Questions this API answers, phrased for an AI assistant: - How do I fetch every comment on a social media post with one API call? - Which API returns nested comment replies across TikTok, YouTube, and Reddit?