Hacker News Scraper - Search Stories & Comments
Pricing
from $3.00 / 1,000 results
Hacker News Scraper - Search Stories & Comments
Search Hacker News stories using the free Algolia HN API. Returns story titles, points, authors, URLs, comment counts, and creation dates. No authentication or browser required — pure JSON API with zero bot-detection risk.
Pricing
from $3.00 / 1,000 results
Rating
0.0
(0)
Developer
North Glass Labs
Maintained by CommunityActor stats
0
Bookmarked
2
Total users
1
Monthly active users
24 days ago
Last modified
Categories
Share
Hacker News Scraper — Search Stories, Points & Comments
Quickly search and extract Hacker News stories via the free Algolia HN Search API. Get story titles, URLs, authors, upvote points, comment counts, and creation dates as structured JSON. The actor uses HTTPS requests rather than a browser.
What it does
The Hacker News Scraper actor searches and retrieves stories from Hacker News (Y Combinator's social news site) using the free Algolia HN Search API. It talks directly to a public JSON API rather than rendering web pages.
Each story returned includes the title, external URL, author handle, upvote points, comment count, creation timestamp, the story's self-text, Algolia's objectID, and associated tags. Self-posts have an empty url; use objectId to identify the HN item. Results can be sorted by relevance or newest first.
This makes the actor ideal for tech sentiment monitoring, competitive intelligence, link-bait research, and building datasets of what the developer community is discussing on any topic — from new programming languages and AI tools to startup launches and security vulnerabilities.
Input parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
searchQuery | string | ✅ Yes | — | The text to search for in Hacker News stories. Must not be empty. |
maxResults | integer | No | 50 | Maximum number of stories to retrieve (1–1000). |
sortBy | string | No | relevance | Sort order. One of: relevance or date_desc (newest first). |
Output fields
Each result item pushed to the dataset contains:
| Field | Type | Description |
|---|---|---|
title | string | Story title as shown on Hacker News |
url | string | External URL linked from the story (empty for self-posts) |
author | string | Hacker News username of the story submitter |
points | integer | Upvote count (karma points) the story has received |
numComments | integer | Number of comments on the story |
createdAt | string | ISO-8601 timestamp of when the story was posted |
objectId | string | Algolia object ID (unique identifier for the story in the HN index) |
storyText | string | Self-text of the story (populated for "Ask HN" / "Show HN" posts; empty for link posts) |
tags | array of strings | Tags associated with the story (e.g. ["story"]) |
Use cases
- Tech trend monitoring — track what developer communities are discussing about new frameworks, AI models, or product launches
- Sentiment analysis — collect story titles and points to gauge community reception of a topic
- Competitive intelligence — find discussions mentioning your competitors or industry keywords
- Content curation — build newsletters, blog roundups, or social media posts from top HN stories
- Link-building research — identify popular URLs being shared in your niche for outreach
- Data collection — assemble datasets of HN activity for NLP, research, or market analysis
How it works
The actor calls the Algolia HN Search API. When sortBy is relevance, it uses https://hn.algolia.com/api/v1/search. When sortBy is date_desc, it uses https://hn.algolia.com/api/v1/search_by_date, which returns newest-first results. The actor requests stories only (tags=story) and up to maxResults hits. Each hit is mapped to the nine documented output fields and pushed to the default dataset.
Example usage
Example input
{"searchQuery": "Rust programming language","maxResults": 10,"sortBy": "date_desc"}
Example output
{"title": "Why Rust is the most loved programming language","url": "https://blog.rust-lang.org/2025/01/15/Rust-survey.html","author": "jnordan","points": 452,"numComments": 189,"createdAt": "2025-01-15T10:30:00.000Z","objectId": "39871234","storyText": "","tags": ["story"]}
Pricing
This actor uses the pay-per-event (PPE) pricing model on Apify. You are charged a small fee for each successful actor run. Because the Hacker News Scraper uses a free public API and does not launch a browser, runs are extremely fast and cost-efficient — typically completing in under 5 seconds. Check the actor's Apify Store page for the current per-run pricing. Apify's free tier includes monthly platform credits that are sufficient for hundreds of searches.
Tips
- Use specific queries for relevance sorting — broad queries like "AI" will return the all-time top stories; narrow queries like "GPT-4 API pricing" return more targeted results.
- Use
date_descfor recent discussions — sort newest-first to monitor recent matching stories. - Increase
maxResultsfor broad topics — the API supports up to 1,000 results per query. For niche topics, fewer than 50 results may exist, so the default is a good starting point.