Hacker News Scraper - Search Stories, Comments and Show HN avatar

Hacker News Scraper - Search Stories, Comments and Show HN

Pricing

$3.00 / 1,000 story or comment delivereds

Go to Apify Store
Hacker News Scraper - Search Stories, Comments and Show HN

Hacker News Scraper - Search Stories, Comments and Show HN

Hacker News stories, comments, Show HN, Ask HN and front page posts by keyword, author, points, comment count and date: title, link, domain, points, comments, author, text and HN link. Uses the official Hacker News search API. Fast, no login.

Pricing

$3.00 / 1,000 story or comment delivereds

Rating

0.0

(0)

Developer

Moses Ndambuki

Moses Ndambuki

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

3 days ago

Last modified

Categories

Features

Limited permissions

Share

Hacker News Scraper: Search Stories, Comments and Show HN

Search Hacker News stories, comments, Show HN, Ask HN, jobs and the live front page by keyword, author, points, comment count and date. Each row has the title, link, domain, points, comments, author, text and HN link. Uses the official Hacker News search API, so runs are fast and there is no login.

In one test, the actor returned 250 recent stories about web scraping, 19 comments mentioning a product from the past 60 days, and the 30 most-voted Show HN scraping launches.


Who this is for

  • Founders and marketers tracking mentions of their product and competitors
  • Developer relations teams finding discussions to join
  • Investors and analysts spotting launches with traction on Show HN
  • Researchers studying developer sentiment and trends
  • AI and data teams collecting high-quality technical discussion

What you get

{
"type": "story",
"id": 7066479,
"title": "Show HN: Kimono – Never write a web scraper again",
"url": "http://kimonify.kimonolabs.com/...",
"domain": "kimonify.kimonolabs.com",
"hnUrl": "https://news.ycombinator.com/item?id=7066479",
"author": "username",
"points": 717,
"comments": 230,
"createdAt": "2014-01-15T21:59:50Z",
"text": null,
"query": "scraper"
}

Comment rows also carry storyId, storyTitle, storyUrl and parentId.


How it works

flowchart LR
A[Search queries] --> C[Official HN search API]
B[Type, author, points, date] --> C
C --> D[Newest first or most relevant]
D --> E[Story and comment rows]

Quick start

  1. Click Try for free.
  2. Add Search queries, like web scraping or your product name.
  3. Pick a Type: stories, comments, Show HN, Ask HN, jobs, polls or the front page.
  4. Optional: set Minimum points, Authors or Posted within (days).
  5. Click Start, then export to CSV, JSON or Google Sheets.

API

curl -X POST "https://api.apify.com/v2/acts/Turboextract~hacker-news-search/run-sync-get-dataset-items?token=YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"searchQueries": ["your product"],
"contentType": "comment",
"postedWithinDays": 1
}'

Python

from apify_client import ApifyClient
client = ApifyClient("YOUR_TOKEN")
run = client.actor("Turboextract/hacker-news-search").call(run_input={
"searchQueries": ["open source"],
"contentType": "show_hn",
"minPoints": 100,
"sort": "relevance",
})
for s in client.dataset(run["defaultDatasetId"]).iterate_items():
print(s["points"], s["title"], s["hnUrl"])

Input

FieldDefaultWhat it does
searchQueries–Keywords. Empty lists the newest items of the type
contentTypestoryStories, comments, Show HN, Ask HN, front page, jobs or polls
sortdateNewest first or most relevant
authors–Only these HN usernames
minPoints0Stories only
minComments0Stories only
postedWithinDays0 (all)Only recent items
maxResultsPerQuery100Per query
maxResults500Total cap per run

Pricing

$0.003 per story or comment delivered. 1,000 items cost $3.

Option1,000 items
Hacker News Scraper$3, stories, comments and front page in one actor
Other Hacker News actors on Apify$0.20 to $2.35
Social listening tools$50+ a month

Use cases

  • Mention alerts: your product and competitors in comments, every hour
  • Launch research: top Show HN posts in your category
  • Content ideas: Ask HN questions about your topic
  • Trend tracking: story counts and points for a keyword over time
  • Community outreach: authors who comment often on your topic

Tips

  • Newest-first search can page past 1,000 results, so large backfills work.
  • Use quotes for exact phrases, like "web scraping".
  • Dedupe on id across scheduled runs.
  • For HN "Who is hiring" job posts, use HN Hiring Leads.

Pairs well with


FAQ

Do I need a Hacker News account? No. The actor uses the official public search API.

How far back does it go? To the start of Hacker News in 2007.

Does it return full comment threads? It returns each matching comment with its story and parent IDs. Search by type comment with a query to find the ones you need.

How fast is it? A few hundred items take seconds.

Is it legal? It uses Hacker News' public search API for public posts.


Support

Built and maintained by Turboextract on the Apify platform.