# Hacker News Story Comments API (https://www.socialcrawl.dev/platforms/hackernews/story-comments) > Returns the whole comment tree for a story under `data.items[]`, in the unified Comment shape: each entry carries `id`, `author`, `text`, `published_at`, the HN permalink at `url`, its direct-reply count at `engagement.replies`, and its nested replies at `replies[]`, recursively. Algolia serves the entire thread in one response, so there is no cursor and nothing is left behind. Note that a story's `num_comments` on the search index counts every node ever posted, including ones the thread no longer shows, so it can exceed the tree returned here. Same upstream call as `/v1/hackernews/story`, with the CommentList archetype selecting the `children` list. TL;DR: `GET /v1/hackernews/story/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 | | --- | --- | --- | | `id` | yes | HN story id (the numeric `objectID`). | | `since` | no | Only rows published on or after this date: YYYY-MM-DD (midnight UTC) or an ISO 8601 timestamp. Rows older than it are left off each page. This list is not in date order, so the walk does not stop at the date: keep following `next_cursor`, and each page costs what a page costs even when every row on it is filtered out. A row with no date is kept. `published_after`, `start_date`, `from_date`, `publish_time` (`yesterday`, `this-week`, `this-month`, `last-3-months`, `last-6-months`) and `max_age_days` are accepted and applied as `since`. | | `until` | no | Only rows published on or before this date: YYYY-MM-DD (that whole UTC day is included) or an ISO 8601 timestamp. Newer rows are left off each page and the walk does not stop, so older pages follow. A row with no date is kept. `published_before`, `end_date` and `to_date` are accepted and applied as `until`. | ## Code example ```bash curl -G "https://www.socialcrawl.dev/v1/hackernews/story/comments" \ --data-urlencode "id=8863" \ -H "x-api-key: sc_YOUR_API_KEY" ``` ## FAQ ### How do I fetch the comments on a Hacker News story? Send a GET request to /v1/hackernews/story/comments with the story's item ID in the id parameter. SocialCrawl returns the full threaded comment tree, with each comment's author, body text, created date, and nested replies in one response. ### Are replies nested or flat in the response? Replies are nested. Each comment carries a children array containing its direct replies, which in turn hold their own replies. Walk the tree recursively for the full discussion, or flatten it when you only need a sentiment snapshot. ### What fields does each comment include? Author handle, comment body text, created timestamp, parent ID, and the children array of nested replies. The structure mirrors the Hacker News thread exactly so you can reconstruct the conversation order in your own UI or pipeline. ### Can I analyze developer sentiment from HN threads? Yes. Pull the comment tree for stories about your product, a competitor, or a technology, then run sentiment or topic analysis over the bodies. It is a common pattern for dev-sentiment tracking next to your Reddit and X comment sources. ### How much does the Hacker News Comments API cost? Each comment fetch costs 1 credit on the standard tier, regardless of how many comments a story has. New accounts get 100 free credits with no credit card required, enough to pull around 100 full comment threads. See the full Hacker News API: https://www.socialcrawl.dev/platforms/hackernews ## 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 to fetch all comments on a Hacker News story with an API - What does the SocialCrawl Hacker News Comments API return?