Skip to the content

Scraper API

Hacker News

hackernews.searchAvailable

Hacker News search

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.

Give it Words to search for, and filters: the kind of item, an author, points, comments and a time range.

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

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

POST/v1/scrapers/hackernews.search/runs

{
"input": {
"query": "web scraping",
"type": "story",
"max_results": 5
}
}

sent, and answered

a record of the run19 fields

{
position: 1
page: 1
item_id: 22180559
type: "story"
hn_url: "https://news.ycombinator.com/item?id=22180559"
title: "Congrats! Web scraping is legal! (US precedent)"
url: "https://parsers.me/us-court-fully-legalized-website-scraping-and-techn…
author: "ehurynovich"
points: 1057
… 10 more fields

ok1 unit a run

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

hn.algolia.com
The page Hacker News search 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

Watch for mentions
Search your company's or product's name by date on a schedule, and pass on the stories and comments you have not seen.
Research what developers say
Find the discussions of a tool or a subject, filtered by points and comments, and read each comment with the story it was made under.
Find the launches in a field
Search Show HN posts by subject and read the titles, points, links and comment counts of what people have built.

What you send

Words to search for, and filters: the kind of item, an author, points, comments and a time range. These are its 10 inputs, as its schema has them.

querystring Optional
The words to search for. May be left out when author or type narrows the search.
sortstring Optional
relevance or date. relevance unless you say otherwise.Default relevance
typestring Optional
story, comment, ask_hn, show_hn, poll or job; all for stories and comments alike.Default all
authorstring Optional
Only items posted by this username.
min_pointsinteger Optional
Only stories with at least this many points.
min_commentsinteger Optional
Only stories with at least this many comments.
sincestring Optional
Only items posted at or after this date or time, such as 2026-11-01.
untilstring Optional
Only items posted before this date or time.
max_resultsinteger Optional
Hits a page: 1 to 100, 30 unless you say otherwise.Default 30
pageinteger Optional
The results page, from 1.Default 1

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.search/runs?wait=60" \
  -H "Authorization: Bearer $ENRICHEDNOW_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"input":{"query":"web scraping","type":"story","max_results":5}}'

# 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.search", {
    "query": "web scraping",
    "type": "story",
    "max_results": 5,
})
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.search", {
  query: "web scraping",
  type: "story",
  max_results: 5,
});
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.search", map[string]any{"query": "web scraping", "type": "story", "max_results": 5})
	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.search", Map.of("query", "web scraping", "type", "story", "max_results", 5));
        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.search --input 'query=web scraping' --input type=story --input max_results=5

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

What comes back

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

A record hackernews.search returned
{
  "position": 1,
  "page": 1,
  "item_id": 22180559,
  "type": "story",
  "hn_url": "https://news.ycombinator.com/item?id=22180559",
  "title": "Congrats! Web scraping is legal! (US precedent)",
  "url": "https://parsers.me/us-court-fully-legalized-website-scraping-and-technically-prohibited-it/",
  "author": "ehurynovich",
  "points": 1057,
  "comments": 388,
  "text": null,
  "created_at": "2020-01-29T14:06:37Z",
  "story_id": 22180559,
  "story_title": null,
  "story_url": null,
  "parent_id": null,
  "is_ask_hn": false,
  "is_show_hn": false,
  "fetched_at": "2026-11-19T18:07:40.800319Z"
}

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

positioninteger
The hit's place in the whole result list, from 1.
pageinteger
The results page the hit was on.
item_idinteger
Hacker News's id of the story or comment.
typestring or null
story, comment, poll, pollopt or job.
hn_urlstring
The item's page on news.ycombinator.com.
titlestring or null
A story's title; null for a comment (see story_title).
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
A story's score; null for a comment.
commentsinteger or null
How many comments a story has; null for a comment.
textstring or null
The body as plain text: a comment's, or a text post's; null for a story that is only a link.
created_atdatetime or null
When it was posted, in UTC.
story_idinteger or null
The id of the story the hit belongs to: its own for a story.
story_titlestring or null
For a comment, the title of the story it was made under.
story_urlstring or null
For a comment, the address that story links to.
parent_idinteger or null
For a comment, the id of what it replies to.
is_ask_hnboolean
True for an Ask HN post.
is_show_hnboolean
True for a Show HN post.
fetched_atdatetime
When the results were 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 hits. The search serves the first 1,000 hits of a query, so page x max_results stops at 1,000: narrow a search by time instead of paging further.
  • The total it reports for a large search is an estimate.

The bounds its schema sets

sort
relevance, date; relevance unless you say otherwise
type
all, story, comment, ask_hn, show_hn, poll, job; all unless you say otherwise
min_points
0 to 100,000
min_comments
0 to 100,000
max_results
1 to 100; 30 unless you say otherwise
page
1 to 1,000; 1 unless you say otherwise

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

Questions

What does Hacker News search return?

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

What do I send?

Words to search for, and filters: the kind of item, an author, points, comments and a time range. Optional: query, sort, type, author, min_points, min_comments, since, until, max_results and page.

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: sort relevance, date (relevance unless you say otherwise); type all, story, comment, ask_hn, show_hn, poll, job (all unless you say otherwise); min_points 0 to 100,000; min_comments 0 to 100,000; max_results 1 to 100 (30 unless you say otherwise); page 1 to 1,000 (1 unless you say otherwise). A run may take up to 5 minutes.

What does it not do?

One run reads one page of hits. The search serves the first 1,000 hits of a query, so page x max_results stops at 1,000: narrow a search by time instead of paging further. The total it reports for a large search is an estimate.

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.search and the same input. It costs what the same API call costs.

Used in these playbooks

A playbook runs Hacker News search as one of its steps and hands back the finished list. Its runs of this scraper cost what they cost here, and the playbook adds nothing.

  • Finance

    Social Sentiment

    How often the tickers and brands you follow are mentioned on social sources, in what tone, and how both moved since the last run.

  • Recruiting

    Talent Sourcing

    People who posted that they want to be hired, or show their work, in your role and place, scored on the skills you need.

  • Finance

    VC Deal Sourcing

    Young startups gaining traction on GitHub, Hacker News and Y Combinator, one row each with its signals and website.

Hacker News

Hacker News as anyone sees it: its lists, an item with its comment thread, and its search.

  • Hacker News stories

    hackernews.stories

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