Hacker News Scraper avatar

Hacker News Scraper

Pricing

Pay per usage

Go to Apify Store
Hacker News Scraper

Hacker News Scraper

Scrape Hacker News stories, comments, and user data. Supports top/new/best/ask/show/job story feeds and full-text keyword search via the Algolia API. Extract titles, URLs, scores, authors, comment counts, and timestamps.

Pricing

Pay per usage

Rating

0.0

(0)

Developer

Monkey Coder

Monkey Coder

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

a day ago

Last modified

Share

πŸ“° Hacker News Scraper

Scrape stories, comments, and user data from Hacker News β€” the tech community's most popular link aggregator.

✨ Features

  • Multiple feed modes: Top, New, Best, Ask HN, Show HN, and Job stories
  • Full-text search: Search stories by keyword via the Algolia HN Search API
  • User submissions: Fetch all stories submitted by a specific user
  • Optional comments: Include top-level comments for each story
  • No authentication required: Uses the official HN Firebase API and Algolia HN Search API

πŸ”§ How It Works

  1. Select a mode (top, new, best, ask, show, job, search, or user)
  2. For search mode, provide a keyword query
  3. For user mode, provide a HN username
  4. Set the max results limit
  5. Optionally enable top comments fetching (slower but richer data)

πŸ“‹ Input Parameters

ParameterTypeDescription
modeSelectFeed type: top, new, best, ask, show, job, search, or user
queryStringSearch keyword (search mode only)
usernameStringHN username (user mode only)
search_sortSelectSort by relevance or date (search mode only)
max_resultsIntegerMaximum stories to return (1–500)
include_commentsBooleanFetch top-level comments per story
request_timeoutIntegerHTTP timeout in seconds

πŸ“¦ Sample Output

{
"id": 12345678,
"title": "Show HN: I built an open-source AI tool",
"url": "https://github.com/example/project",
"score": 342,
"author": "johndoe",
"num_comments": 87,
"created_at": "2026-03-23T10:30:00+00:00",
"type": "story",
"text": "",
"hn_url": "https://news.ycombinator.com/item?id=12345678",
"top_comments": [
{
"id": 12345679,
"author": "janedoe",
"text": "This is amazing! I've been looking for something like this.",
"created_at": "2026-03-23T10:45:00+00:00"
}
],
"fetched_at": "2026-03-23T12:00:00+00:00"
}

πŸ“Š Modes

ModeDescriptionSource
topCurrent front-page stories ranked by scoreFirebase API
newMost recently submitted storiesFirebase API
bestHighest-voted stories of all timeFirebase API
ask"Ask HN" discussion threadsFirebase API
show"Show HN" project showcasesFirebase API
jobYC startup job postingsFirebase API
searchFull-text keyword search across all storiesAlgolia API
userAll stories submitted by a specific userFirebase API

⚑ Performance Notes

  • Feed modes (top/new/best/ask/show/job): Each story requires a separate API call. 100 stories β‰ˆ 15–30 seconds.
  • Search mode: Uses Algolia's batch API, much faster. 100 results β‰ˆ 2–5 seconds.
  • With comments enabled: Adds ~5 extra API calls per story. Expect 2–3Γ— longer run times.
  • Rate limits: Both APIs are generous but the Actor includes retry logic for 429 responses.

πŸ”— Data Sources