Hacker News Scraper – Top, New & Keyword Stories
Pricing
from $2.00 / 1,000 result rows
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
Maintained by CommunityActor stats
0
Bookmarked
2
Total users
1
Monthly active users
8 days ago
Last modified
Categories
Features
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 scrapers | This Actor | |
|---|---|---|
| Data source | HTML listing pages, fragile to layout changes | Official hn.algolia.com/api/v1 JSON API |
| Keyword, top, newest | Three different scrapers or fragile filters | One Actor, three modes |
| Points & comments | Manual counting or separate parsing | Included in every row |
| API key | Often required or hidden | None needed |
| Output shape | Mixed snippets and nested markup | One flat row per story, fixed schema |
What you get
One dataset item per Hacker News story.
| Field | Type | Description |
|---|---|---|
story_id | string | Hacker News story id (the Algolia objectID). Stable key for de-duplication. |
title | string | Story title with whitespace collapsed. |
url | string | External article URL, or the Hacker News discussion page when the story has no external link. |
author | string | Submitter's public nickname on Hacker News. No profile links, emails or personal data. |
points | integer | Story score (points) at collection time. |
num_comments | integer | Number of comments on the story at collection time. |
created_at | string | Submission timestamp in ISO 8601, e.g. 2026-11-12T08:44:13.000Z. |
mode | string | Mode 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
| Parameter | Type | Default | Description |
|---|---|---|---|
mode | string (enum) | top | Required. search = keyword search (relevance + popularity ranked); top = popular stories ranked by points; new = newest stories ranked by time. |
query | string | (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. |
maxResults | integer | 50 | Maximum number of stories to save, drawn from one or more API pages. |
page | integer | 1 | Which 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
toprun 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,
urlpoints to the Hacker News discussion page itself.
Pricing
This Actor uses pay-per-event pricing. You only pay for what you actually get.
| Event | Price | When it is charged |
|---|---|---|
| Actor start | $0.002 | Once per run |
| Result row | $0.002 per row | For 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.
Related Actors
More data tools from the same publisher:
- App Store Reviews Scraper - App Store and Steam user reviews with ratings, versions and dates.
- EU Tenders Scraper - EU public procurement notices from the official TED API.
- ClinicalTrials.gov Scraper - Clinical trial records with phase, status and sponsor.
- Federal Register Scraper - US Federal Register documents, rules and notices.
- arXiv Scraper - arXiv papers with authors, abstracts and PDF links.
- Weather Scraper - Weather forecast and history for any city worldwide.
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.