Hacker News Scraper — Posts, Comments & Search
Pricing
from $1.00 / 1,000 results
Hacker News Scraper — Posts, Comments & Search
Search public Hacker News posts and comments by keyword, date, author or discussion. Export text, scores, reply counts and links. No account required.
Pricing
from $1.00 / 1,000 results
Rating
0.0
(0)
Developer
Felix GoldWin
Maintained by CommunityActor stats
0
Bookmarked
2
Total users
1
Monthly active users
10 days ago
Last modified
Categories
Features
Share
What does Hacker News Scraper do?
Search and export public Hacker News stories and comments for topic research, product feedback, and discussion monitoring. Find posts by keyword, author, date, minimum points, or comment count. Export Ask HN and Show HN stories, or collect indexed comments belonging to specific story IDs.
No Hacker News account, cookies, or private API token are required. This Actor reads the public Hacker News search index and saves structured rows to an Apify dataset. Download JSON, CSV, or Excel, or connect the Actor to your application through the Apify API.
Price: $1 per 1,000 delivered items, plus $0.005 per run. Platform usage is included.
What data can you extract?
Each dataset row is one story or comment. Missing source fields are returned as null or an empty array.
| Fields | Description |
|---|---|
itemId, itemType | Source identifier and story or comment type |
title, text | Source story title and available story or comment content; HTML is removed from the content |
author | Public Hacker News username when available |
url, hnUrl | Linked page and Hacker News item URL |
points, commentCount | Source-provided score and comment count when available |
createdAt, createdAtTimestamp | Creation time in UTC and Unix seconds |
storyId, storyTitle, storyUrl | Related story metadata when available |
parentId | Parent item ID for comments when available |
tags | Source search-index tags |
scrapedAt | UTC timestamp when the item was collected |
The Actor exports indexed content. It does not reconstruct deleted comments, private data, or the entire live comment tree. The public search index can lag behind Hacker News, omit items, and report estimated totals. It is not a complete official archive. This is an independent tool, not an official Hacker News or Y Combinator product.
How to scrape Hacker News
- Choose stories, comments, or both.
- Enter an optional search query and filters.
- Set the maximum items and search requests for the run.
- Start the Actor and inspect the dataset.
- Check the
SUMMARYrecord for coverage, errors, and reasons pagination stopped, then export your results.
The default input collects up to 1,000 latest indexed stories. It does not represent Hacker News's ranked front page.
Input examples
Search for AI stories with discussion and engagement:
{"query": "AI","itemType": "story","sortBy": "date","minPoints": 10,"minComments": 5,"maxItems": 1000,"maxPages": 150}
Collect indexed comments from a specific story:
{"itemType": "comment","storyIds": ["https://news.ycombinator.com/item?id=8863"],"sortBy": "date","maxItems": 500,"maxPages": 30}
Export a larger date range:
{"itemType": "story","sortBy": "date","fromDate": "2025-01-01","toDate": "2026-01-01","maxItems": 3000,"maxPages": 150}
The last example includes items created on or after January 1, 2025, and before January 1, 2026, in UTC. It requests a maximum, not a guaranteed number of items.
Input fields
| Input | Default | Details |
|---|---|---|
query | "" | Search text, up to 200 characters; empty browses matching items |
itemType | "story" | story, comment, or all |
sortBy | "date" | date for newest first, or source relevance ranking |
storyIds | [] | Up to 100 unique story IDs or official HTTPS HN item URLs; requires itemType: "comment" |
author | "" | Exact public username, using letters, numbers, underscores, or hyphens |
storyType | "all" | all, ask_hn, or show_hn; Ask/Show filters require stories |
minPoints | 0 | Minimum source-reported points; positive values require stories |
minComments | 0 | Minimum source-reported comment count; positive values require stories |
fromDate | "" | Inclusive creation-time lower bound |
toDate | "" | Exclusive creation-time upper bound |
maxItems | 1000 | Global maximum unique output items; 1–10,000 |
maxPages | 150 | Global maximum logical search requests; 1–500 |
Dates accept YYYY-MM-DD or an RFC3339 timestamp with Z or an explicit offset, such as 2025-01-01T08:00:00+08:00. Date-only values mean midnight UTC. Invalid calendar dates and timestamps without a timezone are rejected. If both bounds are set, fromDate must be earlier than toDate. To include an entire final day, set toDate to the next day's midnight.
Story IDs can be positive integer numbers, numeric strings, or URLs such as https://news.ycombinator.com/item?id=8863. They are normalized and deduplicated; at most 1,000 entries are allowed before deduplication. Multiple story IDs match comments associated with any selected story, while other filters are combined with them.
minPoints and minComments accept integers from 0 through 1,000,000. Input field names and enum values are case-sensitive. Unknown fields are rejected so configuration mistakes are visible.
Can it return more than 1,000 results?
Yes, with date sorting, when enough matching items are indexed and accessible. The search source has a 1,000-result window for an individual search. When a date-sorted export needs more, the Actor continues through older creation-time windows. It overlaps the boundary timestamp and deduplicates item IDs to reduce gaps between windows.
For sortBy: "relevance", the Actor exports only the first available search window, up to 1,000 results. It reports the source limit in SUMMARY if a larger matching export was requested. Splitting a relevance search into date ranges would change the global ranking, so the Actor preserves the source's available relevance window.
maxItems is a limit, not a promise. A run may return fewer items because of your filters, the available search index, a dense timestamp boundary, the search-request limit, source errors, or your spending limit. Index changes during a run can also affect coverage. Always inspect SUMMARY when completeness matters.
maxPages counts logical search requests across the entire run, including continuation windows. Retrying the same request does not consume another logical page. Results are deduplicated within the run, including resumed runs, but separate scheduled runs may export and charge for the same item again.
Output and coverage
The default dataset contains the collected stories and comments. The default key-value store contains SUMMARY, which reports saved items, search requests, input duplicates removed, estimated source totals, whether date continuation was used, per-window coverage, errors, and stop reasons.
Source totals are estimates from the search index. They do not guarantee that the same number of unique records can be retrieved. A partial export can still contain useful results; the summary distinguishes it from an exhaustive traversal of the available search window.
Pricing
The Actor charges $0.001 per item delivered to the dataset, plus $0.005 for starting a run. Platform usage is included.
- 100 delivered items: $0.105.
- 1,000 delivered items: $1.005.
- Empty results: the $0.005 start charge still applies, with no result charge.
Duplicates removed during the run, failed requests, and the SUMMARY record do not incur a result charge. Set a spending limit in Apify to control the maximum charge. Each new scheduled run is charged for the items it delivers, even if an earlier run delivered them.
FAQ and support
Why is a comment missing?
The search index can lag or omit content. A comment may have been deleted, may not match the selected filters, or may fall beyond a source or run limit. Story comment counts are not a guarantee of accessible indexed comments.
Does it fetch the Hacker News front page or rank by points?
No. The default exports latest indexed stories. Relevance uses the search source's ranking; it is not equivalent to the live front page or a strict points sort.
Can I schedule exports and use the API?
Yes. Use Apify schedules for recurring exports and the Actor's API tab for integration examples. Download the dataset or connect it to downstream tools with Apify integrations.
How do I report a problem?
Open the Actor's Issues tab and include the run URL, relevant filters, and what you expected. Do not include account tokens or private credentials.