Hacker News Scraper: Stories, Comments & Search API avatar

Hacker News Scraper: Stories, Comments & Search API

Pricing

from $4.00 / 1,000 item scrapeds

Go to Apify Store
Hacker News Scraper: Stories, Comments & Search API

Hacker News Scraper: Stories, Comments & Search API

Search and scrape Hacker News stories and comments via the official API. Filter by keyword, type, points, comments, and date. Clean structured output for research, monitoring, and LLM datasets.

Pricing

from $4.00 / 1,000 item scrapeds

Rating

0.0

(0)

Developer

Michael Yousrie

Michael Yousrie

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

12 days ago

Last modified

Share

Hacker News Scraper — Stories, Comments & Search API

Search and scrape Hacker News — stories and comments — into clean structured data. Powered by the official Hacker News (Algolia) search API, this scraper lets you filter by keyword, item type, points, comment count, and date, and returns tidy records ready for research, monitoring, trend analysis, or LLM datasets.

What it does

  • Full-text search across all of Hacker News, or browse the newest / front-page items.
  • Types — stories, comments, Ask HN, Show HN, polls, or the current front page.
  • Filters — minimum points, minimum comments, and a start date.
  • Clean output — one record per item with title/text, url, author, points, comments, and date; comment HTML is stripped to plain text.

Use cases

  • Trend & topic monitoring — track what HN is discussing about a keyword or company.
  • Market/competitor research — find top stories and community sentiment.
  • LLM/RAG datasets — high-signal tech discussion text.
  • Lead/PR signals — catch Show HN launches and front-page moments.

Input

FieldDescription
queryFull-text search (empty = newest/front-page of the chosen type).
typestory, comment, ask_hn, show_hn, poll, or front_page.
sortBydate (newest first) or relevance.
minPointsOnly items with at least this many points.
minCommentsOnly stories with at least this many comments.
startDateOnly items on/after this date (YYYY-MM-DD).
maxItemsCap on items returned (main cost lever; API returns up to ~1000).

Output

Each item becomes one dataset record:

{
"type": "story",
"objectId": "45712345",
"title": "Uv is the best thing to happen to the Python ecosystem",
"text": null,
"url": "https://example.com/article",
"author": "pg",
"points": 2214,
"numComments": 1324,
"createdAt": "2025-10-29T13:05:00.000Z",
"tags": ["story"],
"storyId": null,
"parentId": null,
"hnUrl": "https://news.ycombinator.com/item?id=45712345"
}

Comments carry their text in text and a parentId/storyId.

Pricing

Pay-per-result: charged per item returned — no monthly fee.

Notes

  • Uses the official Hacker News Algolia API — reliable and keyless.
  • The API returns up to ~1000 results per query; narrow with filters for precise sets.

FAQ

Can I get comments, not just stories? Yes — set type to comment (optionally with a query).

How do I get the top stories of the week? Set minPoints, a recent startDate, and sortBy: date.

What formats can I export? JSON, JSONL, CSV, or Excel, or via the Apify API.