Scraper API
Hacker Newshackernews.itemAvailable
Hacker News item
The item — title, link, points, author, text, time — and the comment thread under it: each comment with its author, text, time, depth and the comment it replies to.
Give it an item's id, or its address on news.ycombinator.com: a story, an Ask HN, a job, a poll or a comment.
1 unit a run, for runs that return data. Runs that fail cost nothing. How units work
- Counted
- 1 unit a run
- Inputs
- 3, 1 required
- Record
- 14 fields
- A run takes
- up to 5 minutes
- Records kept
- 7 days
- Measured
- its success, on the status page
POST/v1/scrapers/hackernews.item/runs
sent, and answered
a record of the run14 fields
ok1 unit a run
A record this scraper returned for this input. The first 9 of its 14 fields are set down here; the whole record is below.

What it is used for
- Read a discussion in full
- A story and the thread under it, each comment with its author, its depth and when it was posted, in the thread's own order.
- Measure a launch's reception
- Read the thread under your launch post and sort what comes up into questions, praise and objections.
pointsandcomment_countgive its size. - Give a thread to a language model
- Hand the comments with their depth to a model for a summary of what readers agreed with, what they asked and what they argued about.
What you send
An item's id, or its address on news.ycombinator.com: a story, an Ask HN, a job, a poll or a comment. These are its 3 inputs, as its schema has them.
itemstring Required- The item's id, such as 8863, or its address on news.ycombinator.com.
max_commentsinteger Optional- Return at most this many comments, in the thread's order. 500 unless you say otherwise; up to 5,000.Default
500 max_depthinteger Optional- Return comments no deeper than this: 1 is replies to the item only.
A request, ready to send
It starts a run with the input shown at the top of this page, waits up to 60 seconds for it, and reads its records. Put your key in the variable it reads.
# Start a run and wait up to 60 seconds for it to finish
curl -X POST "https://api.enrichednow.com/v1/scrapers/hackernews.item/runs?wait=60" \
-H "Authorization: Bearer $ENRICHEDNOW_API_KEY" \
-H "Content-Type: application/json" \
-d '{"input":{"item":"8863","max_comments":3}}'
# Read its records, with the id the first call answered
curl "https://api.enrichednow.com/v1/runs/$RUN_ID/records?limit=100" \
-H "Authorization: Bearer $ENRICHEDNOW_API_KEY"from enrichednow import EnrichedNow
client = EnrichedNow() # reads ENRICHEDNOW_API_KEY
# Start a run, wait for it to end, and get its records
result = client.scrape("hackernews.item", {"item": "8863", "max_comments": 3})
print(result.run.id, result.run.status, result.run.record_count)
# Read its records: pages are fetched as you go
for record in result.records:
print(record)Install it with pip install enrichednow, then save as run.py and run python3 run.py
import EnrichedNow from "enrichednow";
const client = new EnrichedNow(); // reads ENRICHEDNOW_API_KEY
// Start a run, wait for it to end, and get its records
const { run, records } = await client.scrape("hackernews.item", { item: "8863", max_comments: 3 });
console.log(run.id, run.status, run.record_count);
// Read its records: pages are fetched as you go
for await (const record of records) console.log(record);Install it with npm install enrichednow, then save as run.mjs and run node run.mjs
package main
import (
"context"
"fmt"
"log"
"time"
enrichednow "github.com/enrichednow/enrichednow-go"
)
func main() {
client, err := enrichednow.NewClient() // reads ENRICHEDNOW_API_KEY
if err != nil {
log.Fatal(err)
}
ctx, cancel := context.WithTimeout(context.Background(), 10*time.Minute)
defer cancel()
// Start a run, wait for it to end, and get its records
run, records, err := client.Scrape(ctx, "hackernews.item", map[string]any{"item": "8863", "max_comments": 3})
if err != nil {
log.Fatal(err)
}
fmt.Println(run.ID, run.Status, run.RecordCount)
// Read its records: pages are fetched as you go
for records.Next() {
fmt.Println(string(records.Current()))
}
if err := records.Err(); err != nil {
log.Fatal(err)
}
}Install it with go get github.com/enrichednow/enrichednow-go@latest, then save as run.go and run go run run.go
import com.enrichednow.EnrichedNowClient;
import com.enrichednow.ScrapeResult;
import java.util.Map;
public class Run {
public static void main(String[] args) {
EnrichedNowClient client = EnrichedNowClient.fromEnv(); // reads ENRICHEDNOW_API_KEY
// Start a run, wait for it to end, and get its records
ScrapeResult result = client.scrape("hackernews.item", Map.of("item", "8863", "max_comments", 3));
System.out.println(result.run().id() + " " + result.run().status() + " " + result.run().recordCount());
// Read its records: pages are fetched as you go
for (Map<String, Object> record : result.records()) {
System.out.println(record);
}
}
}Add com.enrichednow:enrichednow-java:0.4.0 to your Maven or Gradle build, then save as Run.java
enrichednow run hackernews.item --input-json '{"item":"8863","max_comments":3}'Install it with curl -fsSL https://raw.githubusercontent.com/enrichednow/enrichednow-cli/main/install.sh | sh
What comes back
The item — title, link, points, author, text, time — and the comment thread under it: each comment with its author, text, time, depth and the comment it replies to. A record has 14 fields. One we could not read is null, never an empty string or a zero.
{
"item_id": 8863,
"type": "story",
"hn_url": "https://news.ycombinator.com/item?id=8863",
"title": "My YC app: Dropbox - Throw away your USB drive",
"url": "http://www.getdropbox.com/u/2/screencast.html",
"author": "dhouston",
"points": 104,
"text": null,
"created_at": "2007-04-04T19:16:40Z",
"parent_id": null,
"story_id": 8863,
"comment_count": 71,
"comments": [
{
"comment_id": 8865,
"parent_id": 8863,
"depth": 1,
"author": "dhouston",
"text": "oh, and a mac port is coming :)",
"created_at": "2007-04-04T19:22:55Z",
"replies": 1
},
{
"comment_id": 9007,
"parent_id": 8865,
"depth": 2,
"author": "vlad",
"text": "Drew, this is awesome! All of the features you mentioned are exactly what people need.",
"created_at": "2007-04-05T01:48:11Z",
"replies": 0
}
],
"fetched_at": "2026-11-19T18:07:40.797077Z"
}The scraper returned this record for the input above, reading a saved copy of the page, not the live site.
Values shortened for this page: comments: 3 items, the first 2 shown.
The fields of a record
item_idinteger- Hacker News's id of the item.
typestring- What the item is: story, comment, poll, pollopt or job.
hn_urlstring- The item's page on news.ycombinator.com.
titlestring or null- The title; null for a comment.
urlstring or null- The address a story links to; null for a text post and for a comment.
authorstring or null- The username of the account that posted it.
pointsinteger or null- The item's score; null for a comment and for a job advert.
textstring or null- The body as plain text: of a text post, a job advert or a comment; null for a story that is only a link.
created_atdatetime or null- When it was posted, in UTC.
parent_idinteger or null- For a comment, the id of what it replies to.
story_idinteger or null- The id of the story the item belongs to: its own for a story.
comment_countinteger- How many comments there are under the item in all, at every depth, not counting deleted ones.
commentslist of objects- The comments under the item, each before its replies, as many as max_comments and no deeper than max_depth allow.Each holds
comment_id,parent_id,depth,author,text,created_at,replies. fetched_atdatetime- When the item was read, in UTC.
Units and limits
- Counted per request
- Billed per request: a run that returns data costs 1 unit, however many records it returns.
- A miss costs nothing
- A run that fails, that meets something not supported yet, or that you cancel costs nothing. You pay for runs that return data.
- What bounds a run
- A run may take up to 5 minutes. Its records are read in pages of up to 1,000 and are kept for 7 days.
What it does not do
- Comments come in the order they were posted under each parent, not in the order the site ranks them.
- Deleted comments are left out; comment_count counts the ones that remain.
- A comment's points are not public, and are null.
The bounds its schema sets
max_comments- 0 to 5,000; 500 unless you say otherwise
max_depth- 1 to 100
Questions
What does Hacker News item return?
The item — title, link, points, author, text, time — and the comment thread under it: each comment with its author, text, time, depth and the comment it replies to. A record has 14 fields, among them item_id, type, hn_url, title, url and author. A value that could not be read is null, never an empty string or a zero.
What do I send?
An item's id, or its address on news.ycombinator.com: a story, an Ask HN, a job, a poll or a comment. The input item is required. Optional: max_comments and max_depth.
How is it counted?
Billed per request: a run that returns data costs 1 unit, however many records it returns. A run that fails, that meets something not supported yet, or that you cancel costs nothing. The first 1,000 units each month are free.
How much does one run return?
Its schema sets these bounds: max_comments 0 to 5,000 (500 unless you say otherwise); max_depth 1 to 100. A run may take up to 5 minutes.
What does it not do?
Comments come in the order they were posted under each parent, not in the order the site ranks them. Deleted comments are left out; comment_count counts the ones that remain. A comment's points are not public, and are null.
How long are the records kept, and in what format do they come?
Records are kept for 7 days after the run ended, and read in pages of up to 1,000. They come as JSON, as NDJSON with one record a line, or as CSV with a column for each field.
Can an AI assistant call it?
Yes. Through the EnrichedNow MCP server an assistant calls the tool run_scraper with the scraper_id hackernews.item and the same input. It costs what the same API call costs.
Hacker News
Hacker News as anyone sees it: its lists, an item with its comment thread, and its search.
Hacker News stories
hackernews.storiesA list: the front page, new, best, Ask HN, Show HN or jobs, and a page of it. The rows of that page in the site's order: rank, title, link, the site it links to, points, the submitter, comment count and when it was submitted.
Hacker News search
hackernews.searchWords to search for, and filters: the kind of item, an author, points, comments and a time range. A page of the stories and comments found: title, link, author, points, comment count, text, time, and for a comment the story it was made under.
- Industry
- News, music and books
- Where
- Worldwide
Run it on an input of your own.
Create an account, make a key, and send the request above with your own input. The first 1,000 units each month are free.