# 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 replies nested where the platform supports it (TikTok, YouTube, Facebook). Reddit and Hacker News return their whole nested thread; Instagram is top-level only. 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 internal page call (minimum 2) — `sort`/`limit` never change the price, which always follows pages scanned (`max`). 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 status, cost, and latency. TL;DR: `GET /v1/prism/comments` costs 1 credit per call 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 | Expand replies for comments that have them, where the platform supports it (default true; TikTok/YouTube/Facebook only). 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"`. (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 "https://www.socialcrawl.dev/v1/prism/comments?url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DdQw4w9WgXcQ" \ -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?