Skip to content
//Hacker News Scraper example\\

Story with its comments, 10 comments

A story and its comment tree from an item link.

Updated November 14, 2026

What this example returns

This example returns up to 10 comments.

The dataset’s “Comments” view shows 6 columns: Story, Author, Depth, Text, Created, and HN page. See every output field.

What each setting does

The input this example runs Hacker News Scraper with. “Try this input” opens it in the console, where you can run it as-is or change any field first.

Hacker News URLs startUrls

https://news.ycombinator.com/item?id=8863

Item URLs (news.ycombinator.com/item?id=...) to get a story or comment with its comment tree, user URLs (user?id=...), list pages (/news, /newest, /ask, /show, /jobs, /best) or hn.algolia.com search URLs. Bare item ids work too.

Max comments per story maxCommentsPerItem

10

Cap on comments per story or item. 0 = the whole thread.

Default: 50 → this example uses 10

.json
{
  "startUrls": [
    "https://news.ycombinator.com/item?id=8863"
  ],
  "maxCommentsPerItem": 10
}

What it costs

From about $0.008 for 10 comments

An estimate at the lowest plan price: 10 × $0.000796 per result (One Hacker News story, comment or user profile saved to the dataset). A run is charged for the events it reports, so one that finds fewer comments costs less. Platform usage is included in the event price.

Full pricing

When to use this example

From the Hacker News Scraper readme:

Why are some fields empty?

Hacker News leaves them empty: link posts have no text, Ask HN posts have no url, comments have no points (HN hides them), and deleted comments are skipped.

Other ways to run Hacker News Scraper

All examples of Hacker News Scraper

About Hacker News Scraper

Scrape Hacker News stories, comments, front-page lists and user profiles. Full-archive search with points, comments, date and author filters, complete comment trees, live rankings. No login needed.

Price:
From $0.796 / 1,000 results
Developer:
Querystone
Categories:
News, Developer tools

Hacker News Scraper pageOutput fieldsPricing

Related actors

//From the blog\\

Latest articles

All articles

The internet is full of data.
Start owning yours.

Scrape.ly gives you the infrastructure, the tooling, and the team to extract, process, and operationalize web data at any scale. Setup takes minutes.

No credit card. No setup calls.