Hacker News Data (unofficial) avatar

Hacker News Data (unofficial)

Pricing

from $0.50 / 1,000 items

Go to Apify Store
Hacker News Data (unofficial)

Hacker News Data (unofficial)

Unofficial Hacker News lists, keyword search, comment trees, profiles, and new-item alerts from the public Firebase and Algolia APIs. Not affiliated with Y Combinator.

Pricing

from $0.50 / 1,000 items

Rating

0.0

(0)

Developer

Olalekan Johnson

Olalekan Johnson

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

2 days ago

Last modified

Share

Read public Hacker News stories, jobs, comments, profiles, and keyword hits from the official Firebase API and the public Algolia search API. No API key, no login, and no scraping of the website HTML.

This Actor is not affiliated with, endorsed by, or maintained by Y Combinator or Hacker News. "Hacker News" is used only to name the public source.

Founders, recruiters, and dev-tool marketers use it to export a front page, pull an Ask or Show list, search a phrase over a date range, or run a keyword alert that skips stories they have already seen.

What you can do with it

  • Export the current top, new, best, Ask HN, Show HN, or jobs list.
  • Search stories by keyword, with an optional since and until date. Search uses Algolia. Lists, items, comments, and profiles use the Firebase API described at https://github.com/HackerNews/API.
  • Load one item and its comment tree. Deleted and dead comments are omitted.
  • Load a public profile: karma, about text, and a short list of recent submission ids.
  • Schedule monitor mode with a query. It searches newest-first and skips ids already saved for that state namespace.

The default input reads five current top stories. That is what the Apify daily test runs. It stays well inside five minutes.

How a run behaves

Firebase list endpoints return ids. This Actor then fetches each item. Algolia search returns the story fields directly. The client waits briefly between calls to the same host, retries 429 and 5xx responses, and sends a descriptive user agent. It does not use proxies or browser impersonation. The Firebase API documents no rate limit; the wait is still there so a large comment walk does not stampede.

Each saved row is one item event: a story, a job, a comment, a poll, or a user profile. Deleted (deleted: true) and dead (dead: true) items are not saved and are not charged.

Seen ids live in the named key-value store hacker-news-data-seen. Only ids are stored.

Input

Top stories:

{
"mode": "list",
"list": "top",
"maxItems": 5,
"includeComments": false
}

Keyword alert:

{
"mode": "monitor",
"query": "sqlite",
"since": "2026-10-01",
"newItemsOnly": true,
"stateNamespace": "sqlite-watch",
"maxItems": 20
}

One story and a shallow comment tree:

{
"mode": "item",
"itemId": 8863,
"includeComments": true,
"maxComments": 15,
"maxCommentDepth": 2
}
FieldWhen it matters
Modelist, search, item, user, or monitor
Listtop, new, best, ask, show, jobs for list mode
Search queryRequired for monitor. Used by search
Item idRequired for item mode
UsernameRequired for user mode
Since / UntilISO date or datetime. Applied to lists and search
Include commentsList and item modes. Each comment is its own charged row
Maximum comments / depthCaps the thread walk. Depth 1 is direct replies
New items onlySkip ids already saved. Monitor mode always does this
State namespaceSeparate alerts in one account
Maximum storiesCap on stories, search hits, or recent submission ids on a profile
Maximum charge (USD)Extra cap, together with the run maximum from Apify

A monitor run that finds nothing new succeeds with an empty dataset. A list, search, item, or user run that saves nothing fails, so a bad username or a dead API does not look like success.

List mode stops after it has enough stories, and it will not scan more than five times the item cap (at least 25 ids) looking for them.

Output

{
"id": 8863,
"type": "story",
"title": "My YC app: Dropbox - Throw away your USB drive",
"url": "http://www.getdropbox.com/u/2/screencast.html",
"author": "dhouston",
"text": null,
"published": "2007-04-05T16:20:51Z",
"score": 104,
"commentCount": 71,
"parent": null,
"rootId": 8863,
"depth": 0,
"hnUrl": "https://news.ycombinator.com/item?id=8863",
"source": "firebase"
}

Comments use depth of 1 or more, parent, and the same rootId as the story, so a table can be rebuilt into a thread. Profiles use type: "user", karma, submittedCount, and recentSubmissionIds. HTML in comments and about fields is converted to plain text.

SUMMARY in the default key-value store has the item count, event counts, estimated charge, and errors.

Pricing

Pay per event. Charge the custom item event only. Do not put a price on apify-default-dataset-item, or every row would be billed twice. Set item as the primary event.

EventPriceWhen it fires
apify-actor-start$0.005Once per run, by the platform (memory is capped at 1 GB, so once). The Actor does not call Actor.charge for it.
item$0.0005One story, job, comment, poll, or profile was saved

One hundred stories cost $0.005 + 100 × $0.0005 = $0.055. Platform usage is not billed to you. A story plus 20 comments costs 21 × $0.0005. The Actor stops before the next charge when it would pass the run's maximum charge or maxChargeUsd, whichever is lower.

Ids filtered out as deleted, dead, already seen, or outside the date window are not charged.

FAQ

Is this the official Hacker News Actor? No. It is an independent client of two public APIs: https://hacker-news.firebaseio.com/v0 and https://hn.algolia.com/api/v1.

Which mode should a keyword alert use? monitor. It calls Algolia search_by_date and skips ids already delivered. Use search when you want the relevance-ranked results every time, including ones you have seen.

Are comments included in the story row? No. Each comment is its own dataset item so you can filter and so the charge matches one item. Turn on Include comments or you only get the parent rows.

What about deleted comments? They are dropped. The seen store does not keep comment text.

Why did list mode return fewer stories than max items? Some ids are deleted or dead, the date window removed them, or the scan cap was hit. The scan cap keeps a narrow date window from walking the entire 500-id list.

Limits

  • Public APIs only. There is no access to private or dead-item text beyond what those APIs return (they return a tombstone, which we skip).
  • Comment walks are capped by count and depth so a popular thread cannot run away.
  • User mode does not download every submission, only the ids the profile already lists, sliced to the max-items cap.
  • Search reads at most five Algolia pages per run.
  • Seen ids are capped at 10,000 per namespace.
  • Platform usage is not billed to you; you pay only the events above.

Run it locally

From this directory, with monitor_core vendored beside the package:

mkdir -p storage/key_value_stores/default
printf '%s\n' '{"mode":"list","list":"top","maxItems":3}' > storage/key_value_stores/default/INPUT.json
python -m hacker_news_data

Publish notes

Limited permissions are enough: default storages, plus the named seen-id store this Actor creates. Copy .actor/pay_per_event.json into monetization. Leave apify-default-dataset-item at $0 or remove it. The Store title should stay "unofficial" so the listing does not imply a Y Combinator affiliation.