# Hacker News Topic Monitor — Stories & Engagement (`abdulwhab95/hacker-news-topic-change-monitor`) Actor

Enter a topic or brand keyword. Export matching Hacker News stories with links, points and comment counts. Filter engagement and dates, and return only new or updated stories on later runs.

- **URL**: https://apify.com/abdulwhab95/hacker-news-topic-change-monitor.md
- **Developed by:** [ABDULWAHAB NASER RASHED ALQARAWI](https://apify.com/abdulwhab95) (community)
- **Categories:** Social media
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.00 / 1,000 stories

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

## Hacker News Topic Monitor — Stories & Engagement

Enter a topic or brand keyword. Export matching Hacker News stories with links, points and comment counts. Filter engagement and dates, and return only new or updated stories on later runs.

No source API key or external AI subscription is required. Export results as JSON, CSV or Excel; JSON keeps nested fields intact.

### Start with a working example

```json
{
  "query": "automation",
  "sortBy": "relevance",
  "maxResults": 3,
  "maxPages": 1
}
```

### Supported scope

Uses the public Algolia Hacker News search API, not profiles or comment bodies. Search matching and indexing are controlled by Algolia; results are not exhaustive. Search caps can restrict deep results. Up to 10 pages, 50 stories per page. Points/comment-count changes emit UPDATED. Date filters are UTC. No external linked pages are fetched.

Source documentation: https://hn.algolia.com/api

### Real output example

The following values came from a real test run; values may change.

| title | domain | points | comments | publishedAt | discussionUrl |
| --- | --- | --- | --- | --- | --- |
| Open-Source Home Automation | home-assistant.io | 869 | 231 | 2019-11-29T16:06:31Z | https://news.ycombinator.com/item?id=21665125 |
| Do-nothing scripting: the key to gradual automation (2019) | blog.danslimmon.com | 804 | 230 | 2021-11-02T16:15:25Z | https://news.ycombinator.com/item?id=29083367 |

### Pricing

**$1 per 1,000 delivered story records**, plus **$0.001 per run start** at 512 MB–1 GB. Native Apify pay-per-event; one result event per successfully delivered row, with no separate automatic dataset-row event. Empty runs still have a start charge. Platform terms and the pricing tab apply. Set Maximum cost per run as well as maxResults. Failed sources do not produce billed error rows.

### Monitoring and limits

Set `onlyChanges: true` and a `stateStoreName` such as `hn-monitor-state`. First run emits NEW; later runs skip unchanged records and emit UPDATED for changes. Use a distinct store for each monitor, and do not overlap runs sharing the same state. State retains up to 10,000 recent fingerprints; evicted records can appear NEW again. No deletions are inferred from incomplete pages. Only successfully delivered results update state.

`maxResults` caps delivered rows; unchanged rows can still require source requests. `maxPages`, source list limits, `maxRequests` (up to 300), a 240-second processing deadline, and a 40 MB download budget bound work. `RUN_REPORT` shows counts, errors, unchanged skips and truncation warnings. PARTIAL means some sources failed; successful empty searches and unchanged monitors can return zero rows. Access restrictions and rate limits are reported, not bypassed.

This Actor only reads public data. It does not install packages, execute external code, send customer messages or create schedules. You can save an Apify Task and schedule it yourself. Not affiliated with or endorsed by the source platform.

### عربي

أدخل المصادر أو الكلمات المطلوبة، وحدد عدد النتائج وحد الصرف. تحصل على بيانات فعلية قابلة للتصدير. خيار «التغييرات فقط» يقارن بالتشغيل السابق ضمن سجل تسميه أنت. المعلومات غير المتاحة تبقى فارغة؛ ما نختلق بيانات. لا يوجد ضمان دخل أو نتائج بحث شاملة.

# Actor input Schema

## `query` (type: `string`):

Topic or keyword. See the README for source coverage and limits.

## `sortBy` (type: `string`):

Sort stories. See the README for source coverage and limits.

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

Minimum points. See the README for source coverage and limits.

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

Minimum comments. See the README for source coverage and limits.

## `fromDate` (type: `string`):

From date (YYYY-MM-DD, optional). See the README for source coverage and limits.

## `maxResults` (type: `integer`):

Maximum delivered results. See the README for source coverage and limits.

## `maxRequests` (type: `integer`):

Maximum HTTP requests. See the README for source coverage and limits.

## `maxPages` (type: `integer`):

Maximum pages per source. See the README for source coverage and limits.

## `onlyChanges` (type: `boolean`):

First run returns NEW. Later runs with the same named store skip unchanged rows. Keep separate store names for separate monitors; do not overlap runs.

## `stateStoreName` (type: `string`):

Optional named key-value store, required with onlyChanges. Use 3–61 letters, digits or hyphens, starting with a letter or digit. Keep separate monitors in separate stores.

## Actor input object example

```json
{
  "query": "automation",
  "sortBy": "relevance",
  "minPoints": 0,
  "minComments": 0,
  "maxResults": 100,
  "maxRequests": 100,
  "maxPages": 2,
  "onlyChanges": false
}
```

# Actor output Schema

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

No description

## `runReport` (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 = {};

// Run the Actor and wait for it to finish
const run = await client.actor("abdulwhab95/hacker-news-topic-change-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 = {}

# Run the Actor and wait for it to finish
run = client.actor("abdulwhab95/hacker-news-topic-change-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 '{}' |
apify call abdulwhab95/hacker-news-topic-change-monitor --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,abdulwhab95/hacker-news-topic-change-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/Bk5LDXIgPDXF0qmn8/builds/8kWFSlzR3KOOMnayW/openapi.json
