# Hacker News Scraper: Front Page, Search & Mentions — Frontpeek (`cybermax/hacker-news`) Actor

Hacker News scraper on the official HN API: front page (top), new, best, Ask HN, Show HN and jobs with rank, points, comments and age; keyword search; alerts when your domain or a competitor's is posted. Monitor mode returns only new stories. $0.30 per 1,000 stories, no start fee.

- **URL**: https://apify.com/cybermax/hacker-news.md
- **Developed by:** [CyberMax](https://apify.com/cybermax) (community)
- **Categories:** News, SEO tools, AI
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$0.30 / 1,000 story delivereds

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Frontpeek: Hacker News Scraper — Front Page, Search & Domain Mentions

#### Know what's on Hacker News, and the moment your site is posted

Get the Hacker News front page, New, Best, Ask HN, Show HN and job lists with rank, points, comments and age; search stories by keyword; and catch every story that links to your domain (or a competitor's). Built on the official Hacker News API and the Algolia HN Search API. $0.30 per 1,000 stories, no start fee.

**[▶ Try it now with a prefilled input](https://apify.com/cybermax/hacker-news)** · $0.0003 per story (the full front page = $0.009) · no start fee · Apify's free plan includes $5 of credit a month

**Built for:** founders and marketers watching for mentions of their product · developer-relations and PR teams · trend and content researchers · newsletter writers · AI agents that need "what's trending in tech right now"

**Real output** (real run on Apify, 25 Oct 2026, the prefilled input: front page top 10 in 2.9 s, $0.003; two rows shown):

| Rank | Title | Domain | Points | Comments | Age |
|---|---|---|---|---|---|
| 3 | We should be more ambitious with the software we build | danluu.com | 499 | 429 | 15 h |
| 4 | Cerebras Deploys Trillion-Parameter AI Models | cerebras.ai | 216 | 67 | 11.2 h |

```json
{"lists": ["top"], "maxItems": 10}
```

### Ready-made inputs (one click)

| Job | Input | Result |
|---|---|---|
| **Front page now** | `{"lists": ["top"], "maxItems": 30}` | All 30 front-page stories, ranked ($0.009). |
| **Mentions of your site** | `{"domains": ["yourproduct.com"], "since": "30d"}` | Every story linking to your domain in 30 days. |
| **Keyword research** | `{"searches": ["AI agents"], "minPoints": 50, "sort": "relevance"}` | The most-upvoted stories on the topic. |
| **Show HN launches this week** | `{"lists": ["show"], "maxItems": 50}` or `{"searches": ["developer tools"], "kind": "show", "since": "7d"}` | New launches. |
| **Mention alerts** | `{"domains": ["yourproduct.com", "competitor.com"], "monitor": true}` | On a schedule: only stories not seen before. |

### Use cases

- **Brand and competitor mention alerts:** a daily (or hourly) monitor on your domains, with a Slack or email ping only when something new appears.
- **Launch tracking:** follow your Show HN post's rank, points and comments over the day.
- **Trend research:** what the tech crowd is upvoting about a topic, with points and comment counts to rank by.
- **Newsletters and dashboards:** a clean daily feed of the best stories.
- **AI agents:** a fast, cheap tool for "what's on Hacker News about X?".

### Why Frontpeek

| | Frontpeek | Typical Hacker News scraper on the Store |
|---|---|---|
| Sources | All 6 live lists with rank + keyword search + domain mentions | Often lists only or search only |
| Domain mention alerts | Subdomain-aware, monitor mode, nothing new = free | Rare |
| Filters | Since (24h/7d/date), min points, min comments, story type | Varies |
| Data source | Official HN API + Algolia HN Search API, no HTML scraping | Varies |
| Price | $0.30 per 1,000 stories, no start fee | $0.20 to $5 per 1,000 (median about $0.40) (Store prices on 25 Oct 2026) |

### Input

| Field | What it does |
|---|---|
| `lists` | Any of `top`, `new`, `best`, `ask`, `show`, `job`. Default `top` when nothing else is set. |
| `searches` | Keywords to search (newest first, or `sort: relevance`). |
| `domains` | Domains whose links you want to catch. |
| `maxItems` | Per list or search (default 30). In monitor mode: how deep each list is watched. |
| `since`, `minPoints`, `minComments`, `kind` | Filters. |
| `monitor`, `monitorKey` | Only stories not returned in earlier monitor runs. |

### Output

One row per story: `id`, `title`, `url`, `domain`, `points`, `comments`, `createdAt`, `ageHours`, `kind` (story, ask, show, launch, job, poll), `hnUrl` (the discussion), `hasText`, `rank` (list position), `source` (list:top, search:…, domain:…), `matchedQuery`, and `change` in monitor mode. Story-level data only: no user profiles or comment text.

### Pricing

- **$0.0003 per story delivered** ($0.30 per 1,000). No start fee.
- Free: filtered-out stories, duplicates, stories already returned in earlier monitor runs.

### Run it on a schedule

Apify Console → **Schedules** → **Create new** → cron `0 * * * *` (hourly) → **Add Actor** → Frontpeek with your domains and `"monitor": true`. Through the API:

```json
POST https://api.apify.com/v2/schedules?token=YOUR_TOKEN
{
  "name": "frontpeek-mentions",
  "cronExpression": "0 * * * *",
  "timezone": "America/New_York",
  "isEnabled": true,
  "actions": [{
    "type": "RUN_ACTOR",
    "actorId": "cybermax/hacker-news",
    "runInput": {
      "body": "{\"domains\":[\"yourproduct.com\"],\"searches\":[\"Your Product\"],\"monitor\":true,\"monitorKey\":\"mentions\"}",
      "contentType": "application/json"
    }
  }]
}
```

Add a Slack or email notification on "Run succeeded" under the Actor's **Integrations** tab, or send only non-empty runs with Make/Zapier below.

### Integrations

**API (synchronous):** `POST https://api.apify.com/v2/acts/cybermax~hacker-news/run-sync-get-dataset-items?token=YOUR_TOKEN` with the input JSON returns the stories.

**Make / Zapier:** Apify app → "Run an Actor" (`cybermax/hacker-news`, run synchronously, `"monitor": true`) → "Get dataset items" → for each item post `title`, `points` and `hnUrl` to Slack.

**n8n:** Apify node, or HTTP Request:

```
POST https://api.apify.com/v2/acts/cybermax~hacker-news/run-sync-get-dataset-items?token=YOUR_TOKEN
{"lists": ["top"], "maxItems": 30}
```

**Google Sheets:**

```
=IMPORTDATA("https://api.apify.com/v2/acts/cybermax~hacker-news/runs/last/dataset/items?format=csv&fields=rank,title,domain,points,comments,hnUrl&token=YOUR_TOKEN")
```

**Python** (`pip install apify-client`):

```python
from apify_client import ApifyClient
client = ApifyClient("YOUR_TOKEN")
run = client.actor("cybermax/hacker-news").call(run_input={"domains": ["yourproduct.com"], "since": "30d"})
for s in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(s["points"], s["title"], s["hnUrl"])
```

**AI agents (MCP):** `https://mcp.apify.com/?tools=cybermax/hacker-news` (Authorization: `Bearer YOUR_TOKEN`). Typical prompts: "What's on the Hacker News front page right now?", "Has anyone posted our site on HN this month?".

### When NOT to use it

- **Comment threads and user profiles:** Frontpeek returns story-level data. Open `hnUrl` for the discussion.
- **Posting or voting:** read-only.

### FAQ

**Why not call the HN API myself?** You can. Frontpeek joins the official lists API (which returns only ids) with item details and the Algolia search API, adds rank, domain and age, filters, de-duplicates and remembers what you've seen, and an AI agent can call it.

**How fresh is it?** Lists come straight from the official API at run time; search results are usually indexed within minutes.

**Can an AI agent use it (MCP)?** Yes. Add `https://mcp.apify.com/?tools=cybermax/hacker-news` as an MCP server in Claude, Cursor, VS Code or any MCP client.

**Is Frontpeek affiliated with Hacker News or Y Combinator?** No. It's an independent tool that reads their public APIs.

**Is it legal to use?** Frontpeek uses the public Hacker News API and the Algolia HN Search API, both offered for programmatic access. This is general information, not legal advice.

### Start now

**[▶ Try Frontpeek with a prefilled input](https://apify.com/cybermax/hacker-news)** · $0.30 per 1,000 stories. Questions? Open an issue on the Store page and it gets answered the same day.

### Also from CyberMax

- [Swellmeter — Google Trends API](https://apify.com/cybermax/google-trends): rising queries and interest over time for the topics you find here.
- [Keyfern — long-tail keyword ideas](https://apify.com/cybermax/keyword-ideas): what people type into Google about them.
- [Inkpluck — article extractor](https://apify.com/cybermax/article-extract): the full text of the linked articles as Markdown.
- [Unfurlwren — meta tags & Open Graph extractor](https://apify.com/cybermax/meta-tags-extractor): title, description and image of any linked page.

### Changelog

- 2026-10-25: First release: top/new/best/ask/show/job lists with rank, keyword search, domain mentions, filters, monitor mode.

© 2026 CyberMax. All rights reserved.

# Actor input Schema

## `lists` (type: `array`):

Live lists from the official HN API, in their current order (rank = position).

## `searches` (type: `array`):

Optional. Stories whose title or text match, newest first (or by relevance, below). E.g. web scraping, AI agents, your product name.

## `domains` (type: `array`):

Optional. Every story that links to this domain or its subdomains (your site, a competitor, a publication), newest first.

## `maxItems` (type: `integer`):

Front page = top 30. In monitor mode this is how deep each list is watched.

## `since` (type: `string`):

Optional: 24h, 7d, 2w or a date (2026-10-01).

## `minPoints` (type: `integer`):

Optional: skip stories with fewer points.

## `minComments` (type: `integer`):

Optional: skip stories with fewer comments.

## `sort` (type: `string`):

For keyword searches.

## `kind` (type: `string`):

Narrow keyword and domain searches.

## `monitor` (type: `boolean`):

For scheduled runs. Remembers every story id it returned and returns only stories not seen in earlier monitor runs (e.g. new front-page entries, new mentions of your domain). Nothing new = nothing charged.

## `monitorKey` (type: `string`):

Optional name for this watchlist's saved state.

## Actor input object example

```json
{
  "lists": [
    "top"
  ],
  "maxItems": 10,
  "sort": "date",
  "kind": "all",
  "monitor": false
}
```

# Actor output Schema

## `results` (type: `string`):

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "lists": [
        "top"
    ],
    "maxItems": 10
};

// Run the Actor and wait for it to finish
const run = await client.actor("cybermax/hacker-news").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "lists": ["top"],
    "maxItems": 10,
}

# Run the Actor and wait for it to finish
run = client.actor("cybermax/hacker-news").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "lists": [
    "top"
  ],
  "maxItems": 10
}' |
apify call cybermax/hacker-news --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,cybermax/hacker-news"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/8z4C47L9bQWsnBDBS/builds/0c65ofo6dAdPChR6o/openapi.json
