# Hacker News Monitor: Keyword, Domain & Show HN Alerts (`datacrate/hacker-news-monitor`) Actor

Watch Hacker News for your keywords, brand or domains, or pull the newest stories, front page, Show HN, Ask HN and jobs. Points, comments, domain and a new-since-last-run flag. Titles and links only.

- **URL**: https://apify.com/datacrate/hacker-news-monitor.md
- **Developed by:** [Data Crate](https://apify.com/datacrate) (community)
- **Categories:** News
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.20 / 1,000 story returneds

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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

## Hacker News Monitor – keyword, brand and domain alerts, Show HN and Ask HN feeds

Watch Hacker News for the words, brands and domains you care about, or pull the newest stories, front page, **Show HN**, **Ask HN** and job posts. Every row has the title, link, domain, **points**, **comment count**, post time, the HN discussion link and a **new-since-last-run flag**, so a scheduled run only tells you what is new. Built for founders watching for launches and mentions, marketers, recruiters, investors and anyone who wants a Hacker News feed in Slack, email or a spreadsheet.

**First run:** press Start. The prefill searches the last week for "web scraping", "open source" and "ai" and returns up to 50 stories in a few seconds, about **$0.075 at $0.0015 per story**. Leave the input empty and you get the newest stories from the official feed.

**Titles, links and counts only.** No comment text, no story body text. The author handle is **off by default** (`includeAuthor`).

### What you can do with it

- **Brand and competitor alerts:** schedule it with `sinceLastRun` on and a list of keywords; every run returns only stories you have not seen.
- **Domain watch:** `domains: ["yourcompany.com"]` returns every story linking to your site; subdomains match too.
- **Launch tracking:** `tags: ["show_hn"]` with `minPoints: 50` shows which launches gained traction.
- **Ask HN research:** `tags: ["ask_hn"]` for questions your audience is asking.
- **Hiring signal:** `tags: ["job"]` for job posts.
- **Front page snapshot:** `tags: ["front_page"]` with no keywords returns the current front page in rank order (`feedRank`).

### Input

| Field | What it does |
|---|---|
| `queries` | Keywords, brands or phrases matched against titles and URLs. Each is searched separately; `matchedQueries` shows which hit |
| `domains` | Only stories linking to these domains (subdomains match). Combine with keywords or use alone |
| `tags` | `story`, `show_hn`, `ask_hn`, `job`, `front_page` (default `story`) |
| `minPoints` | Points threshold, e.g. 50 |
| `postedWithinHours` | Time window for searches and feeds (default 168 = one week; 0 = no limit for keyword searches) |
| `sinceLastRun`, `stateKey` | Return only stories not returned before under the same State name |
| `maxItems` | Cap on rows (default 50); you pay per row |
| `includeAuthor` | Add the public HN username (default off) |

Example: `{ "queries": ["apify", "web scraping"], "tags": ["story", "show_hn"], "minPoints": 10, "postedWithinHours": 72, "sinceLastRun": true }`

With no keywords and no domains the actor reads the Hacker News feed for each chosen type (newest stories, front page, Show HN, Ask HN, jobs) and applies your points and time filters.

### Output

```json
{
  "hnId": 50535885,
  "title": "MAI Code 2 and Code 2 Flash",
  "url": "https://microsoft.ai/news/introducing-mai-code-2-and-mai-code-2-flash/",
  "domain": "microsoft.ai",
  "type": "story",
  "points": 86,
  "commentCount": 28,
  "postedAt": "2026-11-17T18:25:13.000Z",
  "ageHours": 1.3,
  "hnUrl": "https://news.ycombinator.com/item?id=50535885",
  "matchedQueries": ["ai"],
  "isNew": true,
  "source": "algolia",
  "checkedAt": "2026-11-17T19:45:21.896Z"
}
```

`type` is `story`, `show_hn`, `ask_hn`, `job` or `poll`. Feed rows also have `feed` and `feedRank`. Dataset views: **Stories** and **Story details**.

### Pricing

Pay per event: **$0.0015 per story returned** ($1.50 per 1,000). Platform usage is included, and higher Apify plans get lower per-story prices automatically. Cap spend with `maxItems` or the run's maximum charge.

### FAQ

**How fresh is it?** Search results come from the Hacker News search index, which updates within minutes. Feeds come from the official API in near real time. Schedule it every 15 to 60 minutes with `sinceLastRun` on for alerts.

**Does it return comments?** No. Comment text is never read or returned.

**Why is the author missing?** Handles are public pseudonyms, but the actor leaves them out unless you set `includeAuthor`.

**Will it return the same story twice in one run?** No. A story matched by several keywords is one row and `matchedQueries` lists them all.

**How do I send alerts?** Use Apify Schedules plus a webhook, Zapier/Make/n8n integration or the Apify MCP server to push new rows to Slack, email or an AI agent.

### Data sources & legal

- **Keyword and domain search** uses the public HN Search API operated by Algolia at `hn.algolia.com/api/v1`. Its documentation states that it "enables developers to access HN data programmatically using a REST API" and sets a rate limit of 10,000 requests per hour per IP ([source of the docs page](https://github.com/algolia/hn-search/blob/master/app/javascript/views/Api.tsx), [hn.algolia.com/api](https://hn.algolia.com/api)). It needs no key. The actor never sends more than **1 request per second** to it and searches only titles and URLs.
- **Feeds and fallback** use the official Hacker News API at `hacker-news.firebaseio.com/v0`, published by Y Combinator ("we're making the public Hacker News data available in near real time", [github.com/HackerNews/API](https://github.com/HackerNews/API)). The actor uses at most 10 concurrent requests. If the search service is unavailable, a keyword run falls back to filtering the newest 500 stories from this API.
- Requests identify themselves as `DataCrate-Apify-Actor/1.0 (hacker-news-monitor)`. The actor does not crawl news.ycombinator.com pages.
- Only titles, links and counts are returned. Hacker News and Y Combinator are not affiliated with this actor.

### Related actors by DataCrate

- SEC 8-K Filings Feed (material events and earnings)
- SEC Form D funding feed (private raises)

### Changelog

- **1.0** First release: keyword and domain alerts, story-type feeds, points and time filters, new-since-last-run delta.

# Actor input Schema

## `queries` (type: `array`):

Words or phrases to watch in story titles and URLs, e.g. your brand, a competitor, a technology. Each is searched separately and rows list which ones matched. Leave empty (with no domains) to pull the Hacker News feeds chosen under 'Story types' instead.

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

Only stories linking to these domains, e.g. github.com, techcrunch.com. Subdomains match (blog.example.com matches example.com). Works alone or together with keywords.

## `tags` (type: `array`):

Which kinds of posts to include: story (any link or text post), show_hn (Show HN launches), ask_hn (Ask HN questions), job (job posts), front_page (what is on the front page right now).

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

Only stories with at least this many points (upvotes). 0 = no threshold.

## `postedWithinHours` (type: `integer`):

Only stories posted in this window. 168 = one week. 0 = no time limit for keyword searches (feeds are always current).

## `sinceLastRun` (type: `boolean`):

Skip stories already returned by earlier runs that use the same State name. Turn this on for scheduled alerts. Every row also carries isNew either way.

## `stateKey` (type: `string`):

Name of the 'already seen' list. Use different names for different watchlists.

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

Stop after this many stories. You are charged per story returned.

## `includeAuthor` (type: `boolean`):

Adds the poster's public Hacker News username. Off by default; the actor returns titles, links and counts only and never comment text.

## Actor input object example

```json
{
  "queries": [
    "web scraping",
    "open source",
    "ai"
  ],
  "domains": [],
  "tags": [
    "story"
  ],
  "minPoints": 0,
  "postedWithinHours": 168,
  "sinceLastRun": false,
  "stateKey": "default",
  "maxItems": 20,
  "includeAuthor": false
}
```

# Actor output Schema

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

One row per Hacker News story, Show HN, Ask HN or job (default dataset items).

# 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 = {
    "queries": [
        "web scraping",
        "open source",
        "ai"
    ],
    "tags": [
        "story"
    ],
    "postedWithinHours": 168,
    "maxItems": 20
};

// Run the Actor and wait for it to finish
const run = await client.actor("datacrate/hacker-news-monitor").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 = {
    "queries": [
        "web scraping",
        "open source",
        "ai",
    ],
    "tags": ["story"],
    "postedWithinHours": 168,
    "maxItems": 20,
}

# Run the Actor and wait for it to finish
run = client.actor("datacrate/hacker-news-monitor").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 '{
  "queries": [
    "web scraping",
    "open source",
    "ai"
  ],
  "tags": [
    "story"
  ],
  "postedWithinHours": 168,
  "maxItems": 20
}' |
apify call datacrate/hacker-news-monitor --silent --output-dataset

```

## MCP server setup

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

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/sgEfYVJdbSfNVSfho/builds/tMRNhF6UB3j9hztX9/openapi.json
