Hacker News Enhanced Scraper - Stories, Comments & Search avatar

Hacker News Enhanced Scraper - Stories, Comments & Search

Pricing

from $0.50 / 1,000 results

Go to Apify Store
Hacker News Enhanced Scraper - Stories, Comments & Search

Hacker News Enhanced Scraper - Stories, Comments & Search

Scrape Hacker News stories, comments, and search results via official Firebase and Algolia APIs. No proxy needed. Supports top, best, new, Ask HN, Show HN, job stories, full-text search, comment extraction, and advanced filtering by points, date, and domain.

Pricing

from $0.50 / 1,000 results

Rating

0.0

(0)

Developer

Moris Chao

Moris Chao

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

8 days ago

Last modified

Share

Hacker News Enhanced Scraper

Scrape Hacker News stories, comments, and search results using the official Firebase and Algolia APIs. No proxy needed — fast, reliable, and free.

Features

  • Multiple modes: Top, Best, New, Ask HN, Show HN, Job stories
  • Full-text search: Keyword search via Algolia API
  • Recursive comments: Fetch comment trees with configurable depth (1-5 levels)
  • Advanced filters: min points, min comments, date range, domain filter
  • Fast: Concurrent batch fetching (20 parallel requests)
  • No proxy required: Uses official public APIs

Input

FieldTypeDefaultDescription
modestringtopOne of: top, best, new, ask, show, job, search
searchQuerystringKeyword for search mode (Algolia)
maxItemsinteger100Max stories to return (1-1000)
minPointsinteger0Minimum points threshold
minCommentsinteger0Minimum comments threshold
dateFromstringStart date filter (YYYY-MM-DD)
dateTostringEnd date filter (YYYY-MM-DD)
domainFilterstring[][]Only include stories from these domains
includeCommentsbooleanfalseFetch comments for each story
commentDepthinteger2Max comment tree depth (1-5)
flattenCommentsbooleantrueFlat array vs nested tree output

Output

Each story is output as a JSON object:

{
"id": 47301085,
"title": "Example Title",
"url": "https://example.com/article",
"domain": "example.com",
"author": "username",
"points": 300,
"commentsCount": 67,
"createdAt": "2026-03-06T12:30:18.000Z",
"type": "story",
"comments": []
}

Comment structure (flat)

{
"id": 47301100,
"author": "commenter",
"text": "This is a comment with <i>HTML</i> formatting.",
"createdAt": "2026-03-06T13:00:00.000Z",
"depth": 1
}

Examples

Get top 50 stories with 100+ points

{
"mode": "top",
"maxItems": 50,
"minPoints": 100
}

Search for AI stories from GitHub

{
"mode": "search",
"searchQuery": "artificial intelligence",
"maxItems": 30,
"domainFilter": ["github.com"]
}

Get Ask HN posts with comments

{
"mode": "ask",
"maxItems": 20,
"includeComments": true,
"commentDepth": 3,
"flattenComments": false
}

Data Sources

  • Firebase API (hacker-news.firebaseio.com/v0/) — Official HN API for story lists and item details
  • Algolia API (hn.algolia.com/api/v1/) — Full-text search with numeric filters

Both APIs are public and free. No authentication or proxy required.

Local Development

npm install
apify run --purge

Deploy to Apify

apify login
apify push