Hacker News

Get a Hacker News story’s comments

Retrieve a nested Hacker News comment tree with comment fields and children. Bound the walk with depth and limit to read only the levels you need. Deleted comments retain null author and text values, and coverage describes the returned tree. Each successful request costs 1 account credit, including partial results. Failed requests cost 0 credits.

get/v1/hackernews/story/comments

Request

  • Base URL: https://api.scrapeatlas.com
  • URL: https://api.scrapeatlas.com/v1/hackernews/story/comments
  • Auth: API key in header x-api-key

Query parameters

idstring required

Required numeric Hacker News item ID; a comment ID returns that comment’s subtree.

depthstring

Reply levels to return, 1–128; top-level comments are depth 1. Defaults to the whole tree. Truncated levels report depth_limit partial coverage.

limitstring

Maximum comment nodes to return, 1–5,000; defaults to 5,000. A truncated tree reports comment_limit partial coverage.

Response

Inspect the response status and failure or coverage fields.

OR

Changes

No recorded changes to this operation across all 1 revision of this API.