Hacker News Tech Stories Scraper avatar

Hacker News Tech Stories Scraper

Pricing

from $2.99 / 1,000 technology stories

Go to Apify Store
Hacker News Tech Stories Scraper

Hacker News Tech Stories Scraper

Extracts public technology-focused Hacker News stories from Algolia with rich ranking, highlights and optional comments.

Pricing

from $2.99 / 1,000 technology stories

Rating

0.0

(0)

Developer

w3crawler

w3crawler

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

2 days ago

Last modified

Categories

Features

Limited permissions

Share

Search public Hacker News stories through the Algolia HN Search API and optionally enrich them with real top-level Firebase comments. Saved stories include stable IDs, titles, authors, timestamps, points, comment counts, canonical Hacker News links, external story links and domains, query and rank metadata, tags, highlights, child comment IDs, and optional top comments.

Get started

  1. Enter a technology query such as technology, AI, programming, or open source.
  2. Set maxItems to the number of stories you want. Keep includeComments enabled if you need public top comments.
  3. Start the Actor and open the dataset. Export the saved stories as JSON, CSV, or Excel.
  4. Open Run summary to see how many stories were saved and whether the result is complete or partial.

Input

All fields are optional; the defaults below are ready to use. Unsupported field names and out-of-range values are rejected before the run starts.

FieldTypeRequired?DefaultMeaning
querystringOptional"technology"Public Algolia search query, from 1 to 200 characters; cannot be blank.
maxItemsintegerOptional25Maximum unique stories to save, from 1 to 100.
sortByDatebooleanOptionalfalseUse Algolia's chronological search endpoint instead of relevance ranking.
includeCommentsbooleanOptionaltrueEnrich each saved story with a bounded set of real public Firebase comments.
maxCommentsPerStoryintegerOptional2Maximum comments fetched per story, from 1 to 4.

Full default input:

{
"query": "technology",
"maxItems": 25,
"sortByDate": false,
"includeComments": true,
"maxCommentsPerStory": 2
}

The Actor reads public Hacker News data through the Algolia HN Search API and the Firebase API. It does not log in, access private data, or fabricate missing stories or comments. Requests are bounded, retried, and delayed. Deleted or incomplete comments are omitted. Insecure story URLs are not followed or emitted. Search and comment failures are recorded only in the OUTPUT summary; they never create dataset rows. A comment-enrichment issue after stories are saved keeps the run successful and marks its data PARTIAL.

Output

The dataset contains one row per unique public Hacker News story. Each row describes the story as it appeared at collection time. Missing optional values are omitted rather than guessed, and no diagnostic or placeholder rows are written.

FieldTypeAvailabilityMeaning
recordIdstringAlwaysStable record identifier combining the story ID and search context.
recordTypestringAlwaysRecord type; always story.
storyIdstringAlwaysHacker News item identifier.
titleTextstringAlwaysPublic story title.
authorstringWhen publishedHacker News username of the submitter.
authorProfileUrlstringWhen publishedPublic Hacker News profile URL.
createdAtstringWhen publishedStory creation time in ISO UTC.
updatedAtstringWhen publishedLast source update time in ISO UTC.
pointsintegerWhen publishedStory score at collection time.
commentCountintegerWhen publishedTotal published comment count at collection time.
storyUrlstringWhen publishedPublic HTTPS story URL.
storyDomainstringWhen publishedDomain of the external story URL.
hackerNewsUrlstringAlwaysCanonical Hacker News discussion URL.
storyTextHtmlstringWhen the story has textPublished story text with its original HTML formatting.
storyTextstringWhen the story has textReadable plain-text version of the story text.
searchQuerystringAlwaysQuery used for the Algolia search.
searchRankintegerAlwaysOne-based position in the Algolia result set.
relevancyScorenumberOnly if a source supplies itReserved relevance score; the current Algolia HN API does not return this field, so it is normally omitted.
tagsstring arrayWhen returnedAlgolia tags for the story, submitter, and object.
isAskStorybooleanWhen returnedWhether the story is an Ask HN post.
isShowStorybooleanWhen returnedWhether the story is a Show HN post.
highlightTitleHtmlstringWhen returnedTitle with Algolia's search-term highlighting.
highlightUrlHtmlstringWhen returnedURL with Algolia's search-term highlighting.
matchLevelstring (none, partial, full)When returnedAlgolia's matchedWords/title match level for the query.
matchedWordsstring arrayWhen returnedQuery terms Algolia reported as matched in the title.
fullyHighlightedbooleanWhen returnedWhether Algolia marked the whole title as highlighted.
childIdsstring arrayWhen returnedDirect child comment identifiers reported by Algolia.
topCommentsobject arrayWhen includeComments is enabled and comments existBounded set of top-level public Firebase comments.
sourceUrlstringAlwaysExact Algolia API request URL used for the search.
scrapedAtstringAlwaysTime the story row was saved, in ISO UTC.

Each topComments entry contains commentId, author, publishedAt, textHtml, textText, and childCount when published.

Full JSON output

The example below is based on a real saved row from the 2026-10-25 run, updated to show the three source-backed match-evidence fields added in v1.2. childIds is shortened to five entries for readability; every other field is complete.

{
"recordId": "hn_tech_story_20985875_44e58fb9eb99",
"recordType": "story",
"storyId": "20985875",
"titleText": "The boring technology behind a one-person Internet company (2018)",
"author": "mxschumacher",
"authorProfileUrl": "https://news.ycombinator.com/user?id=mxschumacher",
"createdAt": "2019-09-16T16:40:08.000Z",
"updatedAt": "2025-12-21T23:26:13.000Z",
"points": 2010,
"commentCount": 451,
"storyUrl": "https://broadcast.listennotes.com/the-boring-technology-behind-listen-notes-56697c2e347b",
"storyDomain": "broadcast.listennotes.com",
"hackerNewsUrl": "https://news.ycombinator.com/item?id=20985875",
"searchQuery": "technology",
"searchRank": 1,
"tags": ["story", "author_mxschumacher", "story_20985875"],
"isAskStory": false,
"isShowStory": false,
"highlightTitleHtml": "The boring <em>technology</em> behind a one-person Internet company (2018)",
"highlightUrlHtml": "https://broadcast.listennotes.com/the-boring-<em>technology</em>-behind-listen-notes-56697c2e347b",
"matchLevel": "partial",
"matchedWords": ["technology"],
"fullyHighlighted": false,
"childIds": ["20986417", "20986541", "20986694", "20986697", "20986712"],
"topComments": [
{
"commentId": "20986417",
"author": "tyingq",
"publishedAt": "2019-09-16T17:23:57.000Z",
"textHtml": "Was interesting to read all the sort of &quot;boring&quot; back end pieces, then see that he went with half-server and half-client rendered React for the front end. Was expecting Angular or similar, given the pattern of the other picks.",
"textText": "Was interesting to read all the sort of \"boring\" back end pieces, then see that he went with half-server and half-client rendered React for the front end. Was expecting Angular or similar, given the pattern of the other picks.",
"childCount": 1
},
{
"commentId": "20986541",
"author": "neutogouln",
"publishedAt": "2019-09-16T17:33:50.000Z",
"textHtml": "This definitely deserves to be on the front page more than any discussion involving Snowden.<p>/s<p>#HNPropaganda",
"textText": "This definitely deserves to be on the front page more than any discussion involving Snowden. /s #HNPropaganda",
"childCount": 0
}
],
"sourceUrl": "https://hn.algolia.com/api/v1/search?tags=story&query=technology&hitsPerPage=3&page=0",
"scrapedAt": "2026-10-25T21:03:59.448Z"
}

Run summary

Run summary is stored separately from the dataset in the run's key-value store under OUTPUT. It reports the run outcome and the counts for the saved stories and comment requests.

FieldMeaning
sourcePublic source description.
statusActor process outcome: SUCCEEDED or FAILED.
runStatusCanonical run status; matches status.
dataStatusCompleteness of saved stories: COMPLETE, PARTIAL, NO_RESULTS, or FAILED.
queryQuery used for the search.
totalHitsAvailableAlgolia's reported (approximate) matching-hit count for the query; omitted when the source does not report it.
totalPagesAvailableNumber of result pages at the requested page size; omitted when the source does not report it.
pageFetchedZero-based page index actually requested. Only page 0 is fetched.
exhaustiveWhether Algolia reported the hit count as exhaustive (false means the count is approximate). Normalized from Algolia's object form to a boolean.
requestedItemCountRequested story limit.
itemCountStories actually saved.
diagnosticItemsDiagnostic dataset rows; the Actor does not write diagnostic rows.
diagnosticCountNumber of operational issues recorded in the summary.
failedCountFailed story searches or extractions.
duplicateCountDuplicate stories removed from the result set.
skippedCountStories skipped because required public data was unavailable.
commentRequestedWhether comment enrichment was enabled.
commentRequestCountFirebase comment requests attempted.
commentFetchedComments successfully fetched.
commentFailureCountComment requests that failed.
finishedAtTime the summary was written, in ISO UTC.
StatusData statusMeaning
SUCCEEDEDCOMPLETEStories were saved without an extraction problem.
SUCCEEDEDPARTIALStories were saved, but a later comment request failed. Saved rows remain available.
SUCCEEDEDNO_RESULTSThe search completed cleanly and returned no matching stories.
FAILEDFAILEDA fatal error occurred before any story was saved.

Example OUTPUT from the 2026-11-16 verification run (query: "AI", maxItems: 3):

{
"source": "Hacker News public Algolia API and Firebase",
"status": "SUCCEEDED",
"runStatus": "SUCCEEDED",
"dataStatus": "COMPLETE",
"query": "AI",
"totalHitsAvailable": 2036938,
"totalPagesAvailable": 334,
"pageFetched": 0,
"exhaustive": false,
"requestedItemCount": 3,
"itemCount": 3,
"diagnosticItems": 0,
"diagnosticCount": 0,
"failedCount": 0,
"duplicateCount": 0,
"skippedCount": 0,
"commentRequested": true,
"commentRequestCount": 6,
"commentFetched": 5,
"commentFailureCount": 0,
"finishedAt": "2026-11-16T08:03:17.556Z"
}

Coverage and limitations

Algolia's public search index determines which Hacker News stories are discoverable. The Actor requests only page 0 with hitsPerPage equal to maxItems, so it cannot return more than maxItems unique stories in one run; totalPagesAvailable and pageFetched in the summary report whether a broader result set exists. Algolia reports nbHits/nbPages as approximate for broad queries (exhaustive: false), so treat totalHitsAvailable as an estimate. The Actor does not crawl all of Hacker News, does not follow external story links, and cannot recover stories or comments that Algolia or Firebase no longer exposes. Points and comment counts are point-in-time values and can change after the run. matchLevel, matchedWords, and fullyHighlighted are copied verbatim from Algolia's _highlightResult.title and are omitted when Algolia does not supply them.

Deleted, removed, or incomplete comments are omitted. Insecure external URLs are not followed or emitted. A search or comment failure is recorded in OUTPUT and logs rather than represented as a fabricated story. A comment failure after stories have been saved leaves the saved rows available and reports dataStatus: "PARTIAL".

Usage and support

The main cost is one Algolia search request plus up to four bounded Firebase comment requests per saved story. Keep maxItems and maxCommentsPerStory modest while testing. Set includeComments to false for a faster story-only snapshot. Increasing the story limit increases both request volume and run time.

Use the Actor Issues page to report a problem. Include the run ID, the input used, and the OUTPUT summary; do not include tokens, cookies, or private data.

This Actor is not affiliated with, endorsed by, or sponsored by Hacker News, Y Combinator, or Algolia. Use it only for public data and in accordance with the applicable terms, robots guidance, and law. Public posts can contain personal information; do not use the data for unauthorized profiling or contact.