Hacker News Stories, Comments & Users Scraper avatar

Hacker News Stories, Comments & Users Scraper

Pricing

from $3.00 / 1,000 results

Go to Apify Store
Hacker News Stories, Comments & Users Scraper

Hacker News Stories, Comments & Users Scraper

Scrape Hacker News - search stories and comments, fetch top/new/best stories, get user profiles and submission history. Uses the official Algolia HN Search API and Hacker News Firebase API.

Pricing

from $3.00 / 1,000 results

Rating

0.0

(0)

Developer

Crawler Bros

Crawler Bros

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

a day ago

Last modified

Share

Extract stories, comments, and user data from Hacker News using the official Algolia HN Search API and Hacker News Firebase API. No authentication or proxy required — 100% reliable.

Features

  • Search stories by keyword with relevance or date sorting
  • Search comments by keyword across all HN discussions
  • Top / New / Best stories — real-time front page and trending feeds
  • User submissions — all stories and comments by any HN user
  • Item lookup — fetch any item by ID or URL
  • Filter by date range, minimum points, and story type (Ask HN, Show HN, Job)

Input

FieldTypeDescription
modeselectWhat to scrape (see modes below)
searchQuerystringKeyword to search (modes: searchStories, searchComments)
usernamestringHN username (mode: byUser)
startUrlsarrayItem IDs or URLs (mode: getItem)
storyTypeselectstory, ask_hn, show_hn, job, all
sortByselectrelevance or date
dateFromstringFilter from date (YYYY-MM-DD)
dateTostringFilter to date (YYYY-MM-DD)
minPointsintegerMinimum points filter
maxItemsintegerMaximum records to return (default 50)

Modes

ModeDescription
searchStoriesFull-text search across all HN stories
searchCommentsFull-text search across all HN comments
topStoriesCurrent front page top stories
newStoriesLatest submitted stories
bestStoriesAll-time best stories
byUserAll submissions (stories + comments) by a username
getItemFetch specific items by ID or URL

Output

Story record

{
"storyId": 39876543,
"type": "story",
"title": "Show HN: I built a faster way to index large codebases",
"url": "https://example.com/faster-indexing",
"hnUrl": "https://news.ycombinator.com/item?id=39876543",
"author": "johndoe",
"points": 312,
"commentsCount": 87,
"createdAt": "2024-03-15T14:22:00+00:00",
"recordType": "story",
"scrapedAt": "2024-03-15T15:00:00+00:00"
}

Comment record

{
"commentId": 39876999,
"type": "comment",
"text": "This is really impressive. How does it handle...",
"hnUrl": "https://news.ycombinator.com/item?id=39876999",
"author": "janedoe",
"points": 42,
"storyId": 39876543,
"storyTitle": "Show HN: I built a faster way to index large codebases",
"storyUrl": "https://example.com/faster-indexing",
"storyHnUrl": "https://news.ycombinator.com/item?id=39876543",
"createdAt": "2024-03-15T14:45:00+00:00",
"recordType": "comment",
"scrapedAt": "2024-03-15T15:00:00+00:00"
}

Use Cases

  • Market research — track mentions of products, technologies, or companies
  • Trend analysis — monitor top stories over time by category
  • Competitor intelligence — search for mentions of competitors or alternatives
  • Content research — find highly-upvoted discussions on specific topics
  • Lead generation — identify users active in your target domain

FAQ

Does this require authentication?
No. Both the Algolia HN API and Firebase API are fully public. No API key needed.

Is there a rate limit?
The Algolia API allows generous usage for non-commercial use. This actor respects rate limits with automatic retries.

How far back does the search history go?
The Algolia HN Search API indexes all HN content since the site's founding in 2006.

Can I search for Ask HN or Show HN posts specifically?
Yes — set storyType to ask_hn or show_hn in searchStories mode.

How many results can I fetch?
Up to 5,000 records per run. The Algolia API paginates results automatically.