Hacker News Scraper avatar

Hacker News Scraper

Pricing

from $10.00 / 1,000 results

Go to Apify Store
Hacker News Scraper

Hacker News Scraper

A production-ready Apify Actor that scrapes Hacker News stories, comments, user profiles, and search results using the official Firebase API and Algolia HN Search API.

Pricing

from $10.00 / 1,000 results

Rating

0.0

(0)

Developer

Jamshaid Arif

Jamshaid Arif

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

4 days ago

Last modified

Share

🟧 Hacker News Scraper — Apify Actor (Python)

A production-ready Apify Actor that scrapes Hacker News stories, comments, user profiles, and search results using the official Firebase API and Algolia HN Search API.

Features

ModeDescription
Top / New / BestScrape front-page, newest, or highest-voted stories
Ask HN / Show HNScrape community questions and project showcases
JobsScrape HN job postings
User ProfileScrape any user's karma, bio, and recent submissions
SearchFull-text search via Algolia (by relevance or date)
CommentsOptionally fetch top-level comments for each story

Input Parameters

ParameterTypeDefaultDescription
scrape_typestring"top"One of: top, new, best, ask, show, job, user, search
max_itemsinteger30Max stories to scrape (1–500)
include_commentsbooleanfalseFetch comments for each story
max_comments_per_storyinteger10Max top-level comments per story
min_scoreinteger0Only include stories with ≥ this score
usernamestring""HN username (required for user mode)
search_querystring""Search query (required for search mode)
search_sortstring"relevance"relevance or date

Example Input

{
"scrape_type": "top",
"max_items": 30,
"include_comments": true,
"max_comments_per_story": 5,
"min_score": 50
}

Output Format

Each story item in the dataset looks like:

{
"id": 12345678,
"rank": 1,
"type": "story",
"title": "Show HN: My Cool Project",
"url": "https://example.com",
"hn_url": "https://news.ycombinator.com/item?id=12345678",
"score": 342,
"author": "username",
"comments_count": 87,
"created_at": "2026-04-04T10:30:00+00:00",
"time_ago": "3h ago",
"text": "",
"dead": false,
"deleted": false,
"scraped_at": "2026-04-04T14:00:00+00:00",
"comments": [
{
"id": 12345679,
"story_id": 12345678,
"type": "comment",
"author": "commenter",
"text": "Great project!",
"created_at": "2026-04-04T11:00:00+00:00",
"time_ago": "2h ago",
"parent": 12345678,
"children": [12345680, 12345681],
"dead": false,
"deleted": false
}
]
}

APIs Used

  • HN Firebase API: https://hacker-news.firebaseio.com/v0/ — Official, no auth needed
  • Algolia HN Search: https://hn.algolia.com/api/v1/ — Full-text search, no auth needed

License

ISC