Request a tool
All toolsAutomationsGuidesMCP serverRequest a toolPlatformsCategories
Hacker News Scraper icon

Hacker News Scraper

Search HN stories, Show HN, Ask HN and comments, or pull the front page. Get points, author, comment counts and links. $1 per 1,000 items.

140 runs on Apify $0.001 per item ($1 / 1,000)
Run this in the cloudRun on Apify →

Developer & Research Tools

How it works

  1. 1
    Open it on Apify

    Hit Run on Apify — it opens the tool in the cloud, no install.

  2. 2
    Set the inputs

    Adjust query, tags, sortBy (sensible defaults are pre-filled).

  3. 3
    Click Run

    The tool runs on Apify’s cloud and collects the data for you.

  4. 4
    Export the results

    Download as JSON, CSV or Excel, or pipe straight into your app, Google Sheets, or an AI agent.

Pricing

$0.001 per item = $1 per 1,000

You are charged forWhenPrice
Item returnedCharged per HN story/comment returned.$0.001

Pay-per-event pricing: you are billed per result, not per subscription. Billing is handled by Apify on your own account. These are the live Apify store prices, in effect since 2026-06-12, and they are what you are actually charged.

Inputs

FieldWhat it doesType
queryKeywords to search Hacker News for (e.g. "openai", "rust async"). Leave empty to get the newest/front-page items for the chosen tag.string
tagsWhich kind of Hacker News items to return: stories, Show HN, Ask HN, comments, or current front page.string
sortByOrder results by Algolia relevance (best match) or by date (newest first).string
minPointsOnly return items with at least this many points (upvotes). Leave empty for no minimum. Applies mainly to stories.integer
minCommentsOnly return items with at least this many comments. Leave empty for no minimum. Not for the Comments item type: a comment has no comment count of its own, so that pair is refused before anything is searched.integer
maxItemsMaximum number of items to return. The actor paginates the API until it has this many (or runs out).integer
notionConnectorOptional. Write each item as a page into your Notion when the run finishes. Authorize a Notion connector once in Settings → API & Integrations → MCP connectors, then pick it here. Leave empty to skip (default), results are always saved to the dataset regardless.string
notionParentIdOptional. The Notion data source ID of the database to write into (only used if a Notion connector is set). Leave empty to create the pages privately in your workspace instead.string

What you get

A structured dataset — each result includes fields like:

authorcreatedAthnUrlnumCommentsobjectIdpointstexttitletypeurl

Export every run as JSON, CSV or Excel, or send it to your app, a database, Google Sheets, or an AI agent.

3 ready-to-run use cases

Hacker News API Search by Keyword, No Key Needed

Search Hacker News for a keyword and get stories with points, author, comment count, date and both links. Runs on the public API, so there is no quota to mind.

Show HN Launches, Newest First

The latest Show HN posts as they land: product title, points, author, comment count, and links to both the launch and its thread. No API key needed.

Hacker News Front Page Right Now, as JSON

A snapshot of the hacker news front page: every story ranking today with points, author, comment count and links. Structured JSON, no key needed.

Related tools in Developer & Research Tools

Other ready-to-run tools in the same category — all pay-per-use on the Apify cloud.

Research MCP Server — 15 Tools for AI Agents iconDeveloper & Research Tools

Research MCP Server — 15 Tools for AI Agents

One MCP endpoint gives your AI agent fifteen live research tools. Papers, code, news, SEC filings, packages and crypto prices.

4 use cases

DEV.to Scraper iconDeveloper & Research Tools

DEV.to Scraper

Scrape DEV.to articles by tag, author or sort. Fields: title, URL, tags, reactions, comments, reading time, cover image, full body. $2.00 per 1,000 articles.

Ready to run — no setup

Wikidata Scraper iconDeveloper & Research Tools

Wikidata Scraper

Search Wikidata for people, companies, places, books or films. Get the ID, the name, other names, a description and the Wikipedia link. $0.20 per 1,000.

Ready to run — no setup

Domain Inspector iconDeveloper & Research Tools

Domain Inspector

Check many domains at once. Get DNS, WHOIS registrar and expiry, TLS dates, redirects, security headers, robots and tech. $1.50 per 1,000.

Ready to run — no setup

GitHub Scraper iconDeveloper & Research Tools

GitHub Scraper

Search GitHub repos and users: stars, forks, language, topics, licence, plus user bio, company and followers. No token needed. $0.90 per 1,000 rows.

18 use cases

Stack Overflow / Stack Exchange Scraper iconDeveloper & Research Tools

Stack Overflow / Stack Exchange Scraper

Search Stack Overflow and Stack Exchange by keyword or tag. Score, answer count, views, reputation and body text. $2 per 1,000 questions.

2 use cases

See all Developer & Research Tools →

Hacker News Scraper: search stories, Show HN, Ask HN and comments, no API key

Type a query, pick what kind of item you want, and the matches come back as rows: points, author, comment count, the story's own link and the HN thread link. Stories, Show HN, Ask HN, comments, or whatever is sitting on the front page right now.

One thing to know before the first run. The search box on the input form starts out filled in with openai, and the query is applied to the front page as well. Leave it there with Front page selected and you get the few front-page items that mention OpenAI, not the front page.

InputA search query and an item type
OutputOne row per story, post or comment
Ceiling1,000 items per run
Account neededNone, and no API key
Price$1.00 per 1,000 items, flat on every plan

🔎 What Hacker News Scraper does

It searches the same index that the search box at the foot of every Hacker News page uses. That index is public and needs no key, so there is nothing to sign up for and no quota to watch.

Pick the item type and you get stories, Show HN posts, Ask HN posts, comments, or the current front page. Leave the query empty and you get the newest items of that type instead of a keyword search. Sort by relevance or by date. Set a minimum score, or a minimum number of comments, to drop the quiet stories before they reach your dataset.

It pages through results 50 at a time until it has what you asked for or the index runs out. Items that appear on two pages are dropped once, so the same story cannot land twice in one run.

📥 What you give it

{
  "query": "rust async",
  "tags": "story",
  "sortBy": "date",
  "minPoints": 50,
  "maxItems": 200
}
FieldDefaultWhat it is
querynoneKeywords. The form starts with openai in the box so it runs out of the box, but the API sends nothing unless you set it. Empty means the newest items for the type you picked.
tagsstorystory, show_hn, ask_hn, comment or front_page.
sortByrelevancerelevance for best match, date for newest first.
minPointsnoneOnly items with at least this many points. Applied before the row reaches you, so filtered items are not billed.
minCommentsnoneOnly items with at least this many comments, applied the same way. Refused with the comment type, because a comment has no comment count of its own.
maxItems501 to 1,000 per run. This is the dial that sets what a run costs.
notionConnectornoneOptional. Write every item into Notion as a page when the run finishes. Authorize the connector once under Settings, API and Integrations, MCP connectors, then pick it here.
notionParentIdnoneOptional. The Notion data source to write into. Empty creates the pages privately in your workspace.
proxyConfigurationoffOptional and not needed for a normal run. Only worth switching on if a very large run starts hitting rate limits.

📤 What you get back

A real row from a recent run:

{
  "ok": true,
  "objectId": "38309611",
  "type": "story",
  "title": "OpenAI's board has fired Sam Altman",
  "url": "https://openai.com/blog/openai-announces-leadership-transition",
  "author": "davidbarker",
  "points": 5710,
  "numComments": 2530,
  "createdAt": "2023-11-17T20:28:50Z",
  "text": "",
  "hnUrl": "https://news.ycombinator.com/item?id=38309611"
}
FieldWhat it is
objectIdThe item's Hacker News id, as a string. Stable, so use it as your dedupe key across runs.
typestory, show_hn, ask_hn, poll or comment.
title, urlThe item's own on a story. On a comment row both belong to the parent story. url is null on a text post that links nowhere.
textThe post or comment body with the HTML stripped out. Empty string on a plain link story, the post body on an Ask HN.
points, numCommentsOften null on comment rows. The index does not carry a score for comments.
createdAtWhen the item was posted, in UTC.
hnUrlThe thread on news.ycombinator.com, built from objectId.

🧾 Reading the output

Data rows carry ok: true. When something goes wrong, or a search matches nothing, you get one row with ok: false and an errorCode instead of an empty dataset, and that row is not charged.

CodeWhat it means
NO_RESULTSThe search matched nothing. Check the spelling, or widen it by clearing minPoints or minComments.
BAD_INPUTThe input asks for something the search cannot do, like a comment minimum on comments. Nothing was searched; the row's note says what to change.
RATE_LIMITEDToo many requests in a short window. Wait a little and run it again.
BLOCKEDThe search index refused the request. Re-run it.
NOT_FOUNDThe address the run asked for came back missing.
SERVER_ERRORThe index answered with an error of its own.
NETWORKThe index was unreachable or answered badly. Re-run it.

One more thing about the Console's overview table: it shows title, author, points, comments and the two links, and it has no column for text. So a comments run looks odd there, every row showing its parent story's title with no comment body. Switch to all fields, or export the JSON, and the text is there.

▶️ How to run it

1. Open Hacker News Scraper and click Try for free. 2. Type your keywords into Search query, or clear the box to get the newest items instead. 3. Pick an Item type. Stories is the default, comments is the one you want for mention tracking. 4. Set Max items. Start around 20 to see the shape of the output, then click Start. 5. Download the dataset as JSON, CSV or Excel, or read it from the Apify API.

💰 How much does it cost?

$1.00 per 1,000 items. Flat on every Apify plan, no volume tiers.

You pay per row delivered, so maxItems is your budget dial and the default of 50 is deliberately small. Items dropped by minPoints or minComments, duplicates removed inside a run, and diagnostic rows are not charged. A query that matches nothing writes one diagnostic row and costs you nothing.

💡 What people use it for

  • Mention tracking. Put your product name in the query, set the type to comments, sort by date and

run it every few hours. Threads move fast and hearing about yours from a customer is worse.

  • A feed of new launches: Show HN, sorted by date, no query needed.
  • The monthly "Who is hiring" lists. Those are comments under a post rather than the post itself, so

search hiring with the type set to comments.

  • A front-page digest on a schedule, with the query box cleared.
  • Checking how a topic has been received over the years, sorted by points.

🚧 What it does not do

  • 1,000 rows per run. Split a bigger job across several queries or date ranges.
  • No full threads. You get the comments that match your search, not every reply under a story.
  • No user profiles, no karma totals, no submission history for a person.
  • The front page is filtered by your query too. For a plain digest, clear the query.
  • A minimum score does nothing useful on comments. Comment rows carry no score, so a run with

both usually comes back with nothing at all. A minimum number of comments is refused on comments outright, for the same reason.

  • Scores are a snapshot. A story read an hour after it was posted has the points it had then.
  • No comment counts on comments. Those fields are for stories.
  • Relevance ordering is the index's own, and it is not something this actor can change.

🧭 Which news scraper do you need?

If you wantUse
Hacker News stories, comments and the front pageThis one
Mainstream news by keyword or topic, with the publisher's real linkGoogle News Scraper
World news across 65+ languages, no API keyGDELT News Scraper
Every post from a Substack publicationSubstack Publication Scraper

❓ Questions people ask

Do I need a Hacker News account or an API key? Neither. Nothing to apply for.

What happens when my search matches nothing? You get one row with ok: false and errorCode: NO_RESULTS, and you are not charged for it.

Can I watch for mentions on a schedule? Yes. Schedule it, sort by date, and dedupe on objectId so you only act on what is new since the last run.

Why did my front-page run come back nearly empty? The query is applied to the front page as well, and the form starts with openai in the box. Clear it.

Can I pull a whole comment thread? No. Search returns matching comments, not the tree under a story. The hnUrl on each row opens the thread if you want to read it.

Is this legal? These are public posts on a public site, and the search index behind them is public too. Apify's write-up on scraping and the law is a good starting point, and we are not lawyers.

🆘 If something breaks

Open the Issues tab on the actor page. Send the query you used and the run ID. The errorCode on the diagnostic row usually names the problem on its own.