Hacker News (HN) Stories, Show HN & Jobs Scraper avatar

Hacker News (HN) Stories, Show HN & Jobs Scraper

Pricing

from $0.40 / 1,000 hacker_news_outputs

Go to Apify Store
Hacker News (HN) Stories, Show HN & Jobs Scraper

Hacker News (HN) Stories, Show HN & Jobs Scraper

Fast, structured extraction of Hacker News stories, Show HN launches, Ask HN discussions, scores, and comment counts via official Firebase API.

Pricing

from $0.40 / 1,000 hacker_news_outputs

Rating

0.0

(0)

Developer

Morgane Flamant

Morgane Flamant

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

4 days ago

Last modified

Share

πŸ“° Hacker News (HN) Stories, Show HN & Jobs Scraper

A high-performance Apify Actor built in Python to extract top stories, Show HN startup launches, Ask HN discussions, and job postings directly from the official Hacker News Firebase REST API.


🌟 Key Features

  • ⚑ Direct Firebase REST API: Hits official Hacker News API endpoints (hacker-news.firebaseio.com/v0) directly via httpx async requests. No headless browser overhead (~128MB RAM footprint).
  • 🎯 Multi-Category Support: Scrape Top Stories, Best Stories, Newest, Show HN (Launches), Ask HN (Discussions), or Job Board.
  • πŸ”₯ Minimum Score Filtering: Filter stories by minimum upvote score to extract high-impact tech discussions.
  • πŸš€ Concurrent Async Fetching: Retrieves items concurrently using asyncio.gather for high execution speed.
  • πŸ“Š Store-Ready Dataset: Pushes standardized Pydantic models to Apify's Dataset storage with tabular view support.

πŸ“₯ Input Parameters

The Actor accepts the following input settings in JSON format:

ParameterTypeDefaultDescription
categorystring"top"Select HN feed category: top, best, new, show, ask, or jobs.
minScoreinteger0Minimum upvotes (points) required to include a story.
maxItemsinteger100Maximum number of items to retrieve.

Example Input JSON

{
"category": "show",
"minScore": 20,
"maxItems": 50
}

πŸ“€ Output Format

Each item pushed to the output dataset follows a structured schema:

{
"id": 39821045,
"title": "Show HN: Fast AI Agent Framework in Rust",
"item_type": "story",
"url": "https://github.com/example/fast-agent",
"hn_url": "https://news.ycombinator.com/item?id=39821045",
"author": "techbuilder",
"score": 145,
"comments_count": 42,
"created_at": "2026-08-25T08:15:00+00:00",
"text_content": null
}

πŸš€ Running Locally

Step 1: Install Dependencies

$pip install -r requirements.txt

Step 2: Run the Actor

$python -m src.main

🐳 Docker Support

To build and run containerized:

docker build -t hn-scraper .
docker run -it hn-scraper