Hacker News Scraper avatar

Hacker News Scraper

Pricing

from $0.10 / 1,000 dataset items

Go to Apify Store
Hacker News Scraper

Hacker News Scraper

Scrape Hacker News stories and users via the HN Firebase API and Algolia search API. Supports search, top, new, best, and user modes.

Pricing

from $0.10 / 1,000 dataset items

Rating

0.0

(0)

Developer

Moeeze Hassan

Moeeze Hassan

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

2 days ago

Last modified

Share

Scrape Hacker News stories and users via the HN Firebase API and the Algolia HN search API. The actor supports five modes — search, top, new, best, and user — and returns structured story records ready for downstream analysis.

Features

  • Search mode — keyword search via the Algolia HN search API
  • Top / New / Best modes — fetch front-page story lists from the Firebase API
  • User mode — retrieve a user's submitted stories
  • Point and story-type filtering applied to all Firebase modes

Input Fields

FieldTypeRequiredDefaultDescription
modestring (enum)topScraping mode: search, top, new, best, or user.
querystring""Search query (for search mode) or username (for user mode).
numResultsinteger30Maximum number of results to return (1–500).
minPointsinteger0Only return stories with at least this many points (applied to story modes).
storiesOnlybooleantrueIf true, only return story items (excludes comments, polls, etc.). Applies to Firebase modes.

Output Fields

Each pushed dataset item is a story record with the following fields:

FieldTypeDescription
idstringHN item ID.
titlestringStory title.
urlstringExternal story URL (empty for text/self posts).
pointsintegerStory score.
authorstringUsername of the submitter.
datestringSubmission date (ISO-8601).
commentsCountintegerNumber of comments.
hnUrlstringDirect link to the HN thread.
typestringItem type (typically story).

Usage Example

Fetch the top 50 stories with at least 100 points

{
"mode": "top",
"numResults": 50,
"minPoints": 100,
"storiesOnly": true
}

Search Hacker News for "rust async"

{
"mode": "search",
"query": "rust async",
"numResults": 30
}

Get stories submitted by a specific user

{
"mode": "user",
"query": "pg",
"numResults": 20
}

Run via the Apify CLI

$apify run hacker-news-scraper --input '{"mode":"top","numResults":50,"minPoints":100}'

Data Sources

  • Firebase API (hacker-news.firebaseio.com) — used for top, new, best, and user modes.
  • Algolia Search API (hn.algolia.com) — used for search mode.