Hacker News Scraper – Top, New & Keyword Stories avatar

Hacker News Scraper – Top, New & Keyword Stories

Pricing

from $2.00 / 1,000 result rows

Go to Apify Store
Hacker News Scraper – Top, New & Keyword Stories

Hacker News Scraper – Top, New & Keyword Stories

Collect Hacker News stories via the official Algolia API with three modes: keyword search, top stories by points, or newest stories by time. Outputs title, external URL, author, points, comment count and timestamp. No key, no browser.

Pricing

from $2.00 / 1,000 result rows

Rating

0.0

(0)

Developer

QIQI

QIQI

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

8 days ago

Last modified

Features

Limited permissions

Share

Hacker News stories with points and comment counts — keyword search, top stories or newest posts, straight from the official Algolia API, no key and no browser.

Hacker News is the front page of the tech internet: new tools, papers, launches and debates surface there first, and points plus comment counts tell you what the community actually cares about.

Scraping the HTML pages is brittle and slow. This Actor uses the official HN Algolia search API, which is public, anonymous and returns clean JSON, and turns each story into one flat row with its external link, submitter, points, comment count and timestamp.

Why this Actor

Typical scrapersThis Actor
Data sourceHTML listing pages, fragile to layout changesOfficial hn.algolia.com/api/v1 JSON API
Keyword, top, newestThree different scrapers or fragile filtersOne Actor, three modes
Points & commentsManual counting or separate parsingIncluded in every row
API keyOften required or hiddenNone needed
Output shapeMixed snippets and nested markupOne flat row per story, fixed schema

What you get

One dataset item per Hacker News story.

FieldTypeDescription
story_idstringHacker News story id (the Algolia objectID). Stable key for de-duplication.
titlestringStory title with whitespace collapsed.
urlstringExternal article URL, or the Hacker News discussion page when the story has no external link.
authorstringSubmitter's public nickname on Hacker News. No profile links, emails or personal data.
pointsintegerStory score (points) at collection time.
num_commentsintegerNumber of comments on the story at collection time.
created_atstringSubmission timestamp in ISO 8601, e.g. 2026-11-12T08:44:13.000Z.
modestringMode the row was collected with: search / top / new.
  • story_id -- The Algolia objectID, which is the Hacker News story id — use it to de-duplicate across runs.
  • url -- Points to the external article when the story has one; otherwise it falls back to the Hacker News discussion page (news.ycombinator.com/item?id=<story_id>).
  • author -- Only the public submitter nickname is kept. This Actor does not collect comment bodies or any personal information from them.
  • points -- The score at the moment of collection. Stories gain and lose points continuously, so re-running the same mode later can return slightly different values.

Input

ParameterTypeDefaultDescription
modestring (enum)topRequired. search = keyword search (relevance + popularity ranked); top = popular stories ranked by points; new = newest stories ranked by time.
querystring(empty)Search keyword. Required for meaningful results in search mode; an empty string in search mode returns all stories ranked by popularity. Ignored in practice by top/new, which already rank by points or time.
maxResultsinteger50Maximum number of stories to save, drawn from one or more API pages.
pageinteger1Which Algolia page to start from (1 = first page). Useful for paging through results of a previous run.

A note on mode

search ranks by relevance and popularity for a keyword; top returns popular stories ranked by points; new returns the newest stories by time. All three share the same output schema.

A note on query

For search, pass a keyword or phrase such as ai agent. An empty query in search mode returns all stories ranked by popularity, which behaves like top.

A note on page

Start from a later Algolia page to page through results of an earlier run, e.g. page: 2 with the same keyword.

Usage examples

1. Top stories right now

{
"mode": "top",
"maxResults": 50
}

2. Newest stories about ai agents

{
"mode": "new",
"query": "ai agent",
"maxResults": 25
}

Schedule a daily top run and keep an eye on which stories gain points, or a daily new run with a topic keyword to catch a topic the moment it appears on Hacker News. De-duplicate on story_id to build an incremental feed.

Data notes

  • The Actor talks to the public HN Algolia API only. It never renders Hacker News pages and never handles CAPTCHA, logins or anti-bot challenges.
  • Points and comment counts change over time; a top run reflects the snapshot taken during that run, not a historical record.
  • Comment text is deliberately not collected — this Actor keeps to story metadata (title, link, submitter nickname, points, comment count, timestamp).
  • For stories without an external link, url points to the Hacker News discussion page itself.

Pricing

This Actor uses pay-per-event pricing. You only pay for what you actually get.

EventPriceWhen it is charged
Actor start$0.002Once per run
Result row$0.002 per rowFor every row saved to the dataset

That works out to $2 per 1,000 rows. A typical run returning 50 rows costs about $0.10 in total.

No subscription is required. You can cap your spend with the max cost per run setting in Apify Console, and an empty or invalid input charges only the start event.

FAQ

Do I need an API key?

No. The HN Algolia search API is public and anonymous, and this Actor needs nothing else to run.

Is scraping Hacker News allowed?

Yes. This Actor only reads public story metadata through the official Algolia search API provided for programmatic access. It does not collect comment bodies or personal data.

Why are the points different from what I see on the website?

Points move as users upvote and age the stories. Each run captures the score at collection time, and the API's ranking can also shift between requests.

More data tools from the same publisher:

Disclaimer

All data is retrieved in real time from Hacker News (news.ycombinator.com) via its official Algolia search API. This Actor is an independent tool and is not affiliated with, endorsed by, or sponsored by Y Combinator or the Hacker News community.

The Actor collects only public story metadata: title, external link, submitter nickname, points, comment count and submission time. It deliberately does not collect comment bodies or personal information. Submitter nicknames are public handles chosen by the users themselves.