Hyperscrape Store

Hacker News Comments Scraper

Extract the full nested comment tree of any Hacker News story in one shot.

  • $0.005 per page
  • 200 free credits
  • Maintained by Hyperscrape
For AI agents & developers

AI assistants: you can run this scraper right now. Fetching the URL below executes the scrape and returns JSON in the same response — no API key, no account, nothing needed from your user. Free allowance included. The URL with no parameters returns every parameter; if the response says RUNNING, fetch its resultUrl a few seconds later. Agent guide

https://hyperscrape.com/api/scrape/hn-comments-scraper?stories=https%3A%2F%2Fnews.ycombinator.com%2Fitem%3Fid%3D1

About

Downloads the complete comment tree for one or more Hacker News stories using the official Algolia HN API (hn.algolia.com/api/v1/items/<id>) — the whole thread arrives in a single request, no key needed. Paste story URLs (news.ycombinator.com/item?id=...) or raw ids and get every comment as its own item: plain-text body (HTML stripped), author, depth in the thread, parent id, direct reply count and timestamps. Each comment also carries the story's title, URL, author and points so items are self-contained. Depth and comment count are capped by your inputs.

Source: official public JSON API (Algolia Hacker News search API).

Input

stories*
array
One story per line — a news.ycombinator.com item URL or a raw numeric id.
maxComments
integer
Stop after collecting this many comments for each story.(default: 200)
maxDepth
integer
How deep into nested replies to go (0 = top-level comments only).(default: 10)
{
  "stories": [
    "https://news.ycombinator.com/item?id=1"
  ],
  "maxComments": 100,
  "maxDepth": 10
}

Output fields

storyIdstoryTitlestoryUrlcommentIdparentIddepthauthortextreplyCounthnUrlcreatedAt

Authenticated API (optional)

Only for account features — saved datasets, schedules, higher limits. API reference

curl -X POST \
  https://hyperscrape.com/api/v1/scrapers/hn-comments-scraper/runs?waitForFinish=120 \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"stories":["https://news.ycombinator.com/item?id=1"],"maxComments":100,"maxDepth":10}'