Skip to the content

Scraper API

Hacker News

hackernews.storiesAvailable

Hacker News stories

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.

Give it a list: the front page, new, best, Ask HN, Show HN or jobs, and a page of it.

1 unit a run, for runs that return data. Runs that fail cost nothing. How units work

Counted
1 unit a run
Inputs
3
Record
13 fields
A run takes
up to 5 minutes
Records kept
7 days
Measured
its success, on the status page

POST/v1/scrapers/hackernews.stories/runs

{
"input": {
"list": "top"
}
}

sent, and answered

a record of the run13 fields

{
rank: 1
list: "top"
page: 1
item_id: 50547374
title: "Unauthenticated remote code execution in Nginx"
url: "https://www.wiz.io/blog/nginx-http2-rce-vulnerabilities"
site: "wiz.io"
hn_url: "https://news.ycombinator.com/item?id=50547374"
points: 930
… 4 more fields

ok1 unit a run

A record this scraper returned for this input. The first 9 of its 13 fields are set down here; the whole record is below.

news.ycombinator.com
The page Hacker News stories reads, as a browser shows it
The page this scraper reads, photographed in a browser on 19 November 2026. It belongs to its publisher, who has no part in this service.

What it is used for

Follow the front page
The stories on Hacker News's front page in their order: rank, title, link, points, author and number of comments.
Know when you reach it
Read the front page on a schedule and look for your own site among the rows, with the rank it holds and the points it has.
Send your team a digest
Read the best list or Show HN each week and pass on the stories worth a look, with the link to each one's discussion.

What you send

A list: the front page, new, best, Ask HN, Show HN or jobs, and a page of it. These are its 3 inputs, as its schema has them.

liststring Optional
top (the front page), new, best, ask, show or jobs. top unless you say otherwise.Default top
pageinteger Optional
The page of the list, from 1, thirty rows a page. For top, best, ask and show.Default 1
max_resultsinteger Optional
Return fewer than the page's thirty rows.Default 30

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.stories/runs?wait=60" \
  -H "Authorization: Bearer $ENRICHEDNOW_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"input":{"list":"top"}}'

# 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.stories", {"list": "top"})
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.stories", { list: "top" });
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.stories", map[string]any{"list": "top"})
	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.stories", Map.of("list", "top"));
        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.stories --input list=top

Install it with curl -fsSL https://raw.githubusercontent.com/enrichednow/enrichednow-cli/main/install.sh | sh

What comes back

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. A record has 13 fields. One we could not read is null, never an empty string or a zero.

A record hackernews.stories returned
{
  "rank": 1,
  "list": "top",
  "page": 1,
  "item_id": 50547374,
  "title": "Unauthenticated remote code execution in Nginx",
  "url": "https://www.wiz.io/blog/nginx-http2-rce-vulnerabilities",
  "site": "wiz.io",
  "hn_url": "https://news.ycombinator.com/item?id=50547374",
  "points": 930,
  "author": "speedping",
  "comments": 412,
  "created_at": "2026-11-18T15:19:55Z",
  "fetched_at": "2026-11-19T18:07:40.802492Z"
}

The scraper returned this record for the input above, reading a saved copy of the page, not the live site.

The fields of a record

rankinteger or null
The row's number on the list, as the page prints it: 1 to 30 on the first page, 31 to 60 on the second.
liststring
The list the row was on: top, new, best, ask, show or jobs.
pageinteger
The page of the list the row was on, from 1.
item_idinteger
Hacker News's id of the submission.
titlestring or null
The submission's title.
urlstring or null
The address the submission links to; null for a text post (an Ask HN), whose page is hn_url.
sitestring or null
The linked site as the page shows it beside the title, e.g. "github.com/pallets"; null for a text post.
hn_urlstring
The submission's own page on news.ycombinator.com, with its comments.
pointsinteger or null
The submission's score; null for a job advert, which has none.
authorstring or null
The username of the account that submitted it; null for a job advert.
commentsinteger or null
How many comments the submission has; 0 when the page says "discuss"; null for a job advert.
created_atdatetime or null
When it was submitted, in UTC.
fetched_atdatetime
When the list was read, in UTC.

The whole schema, in its reference

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

  • One run reads one page of a list: thirty rows. The new and jobs lists give their first page only.
  • A job advert has no points, submitter or comments: those fields are null for it.

The bounds its schema sets

list
top, new, best, ask, show, jobs; top unless you say otherwise
page
1 to 20; 1 unless you say otherwise
max_results
1 to 30; 30 unless you say otherwise

Scraper API pricing: how units workThe five ways a run ends

Questions

What does Hacker News stories return?

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. A record has 13 fields, among them rank, list, page, item_id, title and url. A value that could not be read is null, never an empty string or a zero.

What do I send?

A list: the front page, new, best, Ask HN, Show HN or jobs, and a page of it. Optional: list, page and max_results.

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: list top, new, best, ask, show, jobs (top unless you say otherwise); page 1 to 20 (1 unless you say otherwise); max_results 1 to 30 (30 unless you say otherwise). A run may take up to 5 minutes.

What does it not do?

One run reads one page of a list: thirty rows. The new and jobs lists give their first page only. A job advert has no points, submitter or comments: those fields are null for it.

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.stories 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 item

    hackernews.item

    An item's id, or its address on news.ycombinator.com: a story, an Ask HN, a job, a poll or a comment. 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.

  • Hacker News search

    hackernews.search

    Words 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.

Hacker News on the line-up

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.