Hacker News Stories & Comments Scraper avatar

Hacker News Stories & Comments Scraper

Pricing

$2.00 / 1,000 results

Go to Apify Store
Hacker News Stories & Comments Scraper

Hacker News Stories & Comments Scraper

Extracts Hacker News stories, comments and search results by keyword, date range or author into structured JSON using HN's public Algolia API.

Pricing

$2.00 / 1,000 results

Rating

0.0

(0)

Developer

James Barnes

James Barnes

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

2 days ago

Last modified

Categories

Security

Limited permissions

Share

Track what Hacker News says about your product, competitors or topic. Search stories and comments by keyword, date range, author or story ID and get clean structured JSON, ready for monitoring, research or sentiment analysis.

Sample output

{
"id": "8863",
"type": "story",
"title": "My YC app: Dropbox - Throw away your USB drive",
"url": "http://www.getdropbox.com/u/2/screencast.html",
"text": null,
"author": "dhouston",
"points": 104,
"numComments": 71,
"createdAt": "2007-04-04T19:16:40Z",
"storyId": null,
"storyTitle": null,
"parentId": null,
"hnUrl": "https://news.ycombinator.com/item?id=8863"
}

What it does

Uses Hacker News's public Algolia search API (no login, no key). Only publicly visible data is read.

  • Search stories, comments, polls, Show HN and Ask HN
  • Filter by date range, author, minimum points, or a specific story (get an entire comment thread)
  • Sort by relevance or newest first
  • Grab the current front page

Input

  • query: keywords
  • contentType: story, comment, poll, show_hn, ask_hn, front_page
  • sortBy: relevance or date
  • author, storyId: filters
  • dateFrom / dateTo: YYYY-MM-DD (UTC)
  • minPoints: stories only
  • maxItems: up to 1000

At least one of query, author, storyId, a date, or the front_page type is required.

Output fields

id, type, title, url, text, author, points, numComments, createdAt, storyId, storyTitle, parentId, hnUrl.

Author is the public HN username; no emails or phone numbers are collected.

Pricing

$0.002 per result (charged per dataset item, so $2 per 1,000 results).

Limits

  • The Algolia API returns at most 1,000 results per query. To go deeper, split your search into date ranges.
  • Comment search returns comments with their story context; to fetch a full thread use contentType comment with storyId.
  • Requests are rate-limited politely and retried with backoff on 429 errors.