Hacker News Scraper: Stories, Comments & Search
Pricing
from $0.14 / 1,000 stories
Hacker News Scraper: Stories, Comments & Search
Scrape Hacker News front page, new, best, Ask HN, Show HN and jobs, search stories and comments by keyword, date and points, and get full comment trees. Official APIs, no key.
Pricing
from $0.14 / 1,000 stories
Rating
0.0
(0)
Developer
Mivah
Maintained by CommunityActor stats
0
Bookmarked
2
Total users
1
Monthly active users
a day ago
Last modified
Categories
Features
Share
Hacker News Scraper: stories, comments, search and comment trees
Scrape Hacker News in one cheap run: the front page (top), new, best, Ask HN, Show HN and job lists, a keyword search across all of HN's history with date range, minimum points and minimum comments, or specific stories by ID or URL with their full comment tree. You get clean rows with the title, link, domain, points, comment count, author, time and text, plus one row per comment with its depth, parent and thread position.
Built for developer-tool founders and marketers tracking mentions of their product or competitors, VCs and analysts watching launches (Show HN, Launch HN), recruiters reading job posts, researchers and data scientists building tech-sentiment datasets, newsletter writers, and AI agents that need "what is HN saying about X?". It uses Hacker News' official Firebase API and the Algolia HN Search API: no API key, no login, no browser.

What you get
- 📰 Lists: top (front page order, with
rank), new, best, Ask HN, Show HN, jobs - 🔎 Search: keywords in stories, comments, Ask HN, Show HN, Launch HN, jobs, polls or stories that reached the front page; sort by relevance or date
- 📅 Filters: posted after / before (ISO dates or
7 days,24 hours), minimum points, minimum comments. They work on lists too - 💬 Comment trees: one row per comment with
depth,parentIdand thread order, max comments per story and max depth, deleted and flagged comments skipped - 🏷️ Post kind: every story is tagged
story,ask,show,launch,tell,joborpoll - 🔁 Monitoring:
searchSort: "date"+dateFrom: "24 hours"on a daily schedule returns only new mentions, and it isn't stuck at Algolia's 1,000-result limit - 🧹 Clean text: HN's HTML is turned into plain text, with links written out in full
Input examples
Today's front page with the top of each discussion:
{"mode": "top","maxItems": 30,"includeComments": true,"maxCommentsPerStory": 20,"maxCommentDepth": 2}
Every story about Postgres with 50+ points in the last 3 months:
{"mode": "search","searchQuery": "postgres","searchType": "story","searchSort": "date","dateFrom": "3 months","minPoints": 50,"maxItems": 500}
A story and its whole thread:
{"mode": "items","storyIds": ["https://news.ycombinator.com/item?id=8863"],"maxCommentsPerStory": 500}
Output example
One row per story:
{"type": "story","id": 8863,"itemType": "story","postKind": "story","title": "My YC app: Dropbox - Throw away your USB drive","url": "http://www.getdropbox.com/u/2/screencast.html","domain": "getdropbox.com","hnUrl": "https://news.ycombinator.com/item?id=8863","author": "dhouston","points": 104,"commentsCount": 71,"createdAt": "2007-04-04T19:16:40+00:00","text": null,"source": "item","rank": null}
And one row per comment:
{"type": "comment","id": 9224,"storyId": 8863,"parentId": 8863,"depth": 1,"author": "BrandonM","text": "I have a few qualms with this app: ...","createdAt": "2007-04-05T15:16:54+00:00","replies": 1,"storyTitle": "My YC app: Dropbox - Throw away your USB drive","hnUrl": "https://news.ycombinator.com/item?id=9224"}
Filter on type (story / comment) or use the Stories only and Comments only dataset views. List rows have rank (position on the list); search rows have source: "search:<query>". A run summary is saved as SUMMARY in the key-value store.
Pricing
Pay only for results:
| Event | Price |
|---|---|
| Actor start | $0.00005 |
| Story (row) | $0.0002 ($0.20 per 1,000) |
| Comment (row) | $0.0001 ($0.10 per 1,000) |
Example: the front page (30 stories) costs $0.006; with 20 comments each, about $0.07. A daily "new mentions of my product" search usually costs well under a cent. Errors (an unknown or unreadable item ID, a list or search that can't be fetched) are logged as error rows and never charged. Invalid input (e.g. dateFrom after dateTo) ends the run before anything is fetched, with one free error row and the reason in the run's status message.
Notes and limits
- Data comes from Hacker News' public APIs, the same data anyone sees on news.ycombinator.com. No login and no cookies. The Actor doesn't open news.ycombinator.com pages.
- HN's own lists hold up to 500 stories (top, new, best) or 200 (Ask, Show, jobs). Use search for more, or for older stories.
- Relevance search returns at most 1,000 results per query (Algolia's limit). Date-sorted search has no such limit: the Actor walks back in time automatically.
- Comments are fetched level by level, so with a small Max comments per story you get the top-level discussion first. HN's ranking order is kept within each thread.
- Points and comment counts in search results come from the search index and can lag the live site by a few minutes.
- Author usernames are public HN pseudonyms and are included. The Actor doesn't scrape user profiles, karma or "about" texts.
- On lists, the date/points/comments filters are applied to the stories on that list only, so
maxItemscan return fewer rows than asked (e.g.minPoints: 500onnew). Use search to filter across all of HN. - A single comment fetched by ID (mode = items) has
storyId,depthandstoryTitleempty; comment search hits havedepthandrepliesempty. - When you set a max charge per run, the Actor stops as soon as it is reached and never pushes rows it can't charge.
- Poll options aren't fetched (the poll row itself is).
Changelog
- 2026-11-20: Public on the Apify Store.
- 2026-11-10: Invalid input now ends as a successful run with one free error row that says what to fix, instead of a failed run.
- 2026-11-08: Reliability review before the wave-2 launch, with more tests.
How to use Hacker News Scraper
- Pick what to scrape: top (front page), new, best, Ask HN, Show HN, jobs, a search, or specific item IDs/URLs.
- For search, enter keywords and optionally a date range, minimum points and the type (stories, comments, Show HN...).
- Turn on Include comments to get each story's comment tree, with a cap per story and an optional depth limit.
- Click Start, then export stories and comments as JSON, CSV or Excel, or schedule it to monitor mentions.
Use it from code (API)
Run it from Python with the official client (pip install apify-client):
from apify_client import ApifyClientclient = ApifyClient("<YOUR_APIFY_TOKEN>")run = client.actor("fjordlabs/hacker-news").call(run_input={'mode': 'search', 'searchQuery': 'postgres', 'searchSort': 'date', 'dateFrom': '7 days', 'maxItems': 100})for item in client.dataset(run["defaultDatasetId"]).iterate_items():print(item)
Or with one HTTP call that returns the results directly:
curl -X POST "https://api.apify.com/v2/acts/fjordlabs~hacker-news/run-sync-get-dataset-items?token=<YOUR_APIFY_TOKEN>" \-H "Content-Type: application/json" -d '{"mode": "search", "searchQuery": "postgres", "searchSort": "date", "dateFrom": "7 days", "maxItems": 100}'
It also works with Make, Zapier, n8n, Google Sheets and webhooks through Apify's integrations.
Use with AI agents (MCP)
Agents can call this Actor as a tool through Apify's MCP server (mcp.apify.com). Add fjordlabs/hacker-news to the server's Actors. Results are clean JSON with a small default size, so they fit well in an agent's context.
FAQ
Do I need an API key? No. The Actor uses Hacker News' official Firebase API and the public Algolia HN Search API.
How many results can I get? HN's lists hold up to 500 stories. Search by date has no 1,000-result cap: the Actor walks back in time, so you can export years of stories.
Can I monitor mentions of my product?
Yes. Use mode = search, searchSort = date and dateFrom = 24 hours on a daily schedule; you only pay for new matches.
How are comments structured? One row per comment with depth, parentId and storyId, in HN's thread order. Deleted and flagged comments are skipped.
Is personal data collected? Only public HN usernames on posts and comments. User profiles, karma and about texts are not scraped.
Am I charged for errors? No. Rows that fail are never charged; you only pay for results.
More from fjordlabs
- Google Trends Scraper
- Google Trends Trending Now
- Google News Scraper
- Google Play Reviews & App Data Scraper
- App Store Reviews & App Data Scraper (iOS)
- Bulk PageSpeed & Core Web Vitals Audit
- Google Autocomplete Keyword Expander
- App Store & Google Play Search Rank + Top Charts (ASO)
- SEO & AI-Search Readiness Audit
- Website Tech Stack Detector
- Steam Reviews & Game Data Scraper
- Chrome Web Store Extension Details Scraper
- Google Ads Transparency Center Scraper
- Shopify Store Products Scraper
- Sitemap URL Extractor
- EU Public Tenders Scraper (TED)
- Domain Intel: WHOIS/RDAP, DNS, SSL, SPF/DMARC
- App Store & Google Play App Details + Developer Portfolio
- Website Screenshot API: Full Page, Mobile, PDF
- Wayback Machine Site History