# Hacker News Search & Monitor - Stories, Comments, Show HN, Jobs (`zhucl1006/hacker-news-search-monitor`) Actor

Search Hacker News stories, comments, Ask HN, Show HN and job posts by keyword, author, points or date via the official HN Algolia API. Brand mentions, launch tracking, lead and hiring signals as clean JSON. $1 per 1,000 items.

- **URL**: https://apify.com/zhucl1006/hacker-news-search-monitor.md
- **Developed by:** [leo zhu](https://apify.com/zhucl1006) (community)
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.00 / 1,000 result items

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 Search & Monitor - Stories, Comments, Show HN, Jobs

Search **Hacker News** by keyword, author, points, comments or date and get clean JSON/CSV/Excel. Uses the **official Hacker News search API (Algolia)** - no login, no browser, no proxies, so runs are fast (100 items in ~1 second) and cheap.

### What you can do with it

- **Brand & competitor monitoring**: schedule daily with `onlyNewerThanDays: 1` and get every new story or comment that mentions your product, domain or competitor.
- **Launch tracking**: follow *Show HN* launches in your niche, with points and comment counts.
- **Lead generation & market research**: find people asking for tools in *Ask HN* threads and comments ("looking for", "alternative to ...").
- **Hiring signals**: search job posts (`itemType: job`) or comments in "Who is hiring" threads.
- **Content & LLM pipelines**: feed top discussions to n8n, Make, Zapier or an LLM for summaries.

### Input

| Field | Description |
|---|---|
| `queries` | List of keywords / brands / domains. Each one is searched separately. |
| `itemType` | `story`, `comment`, `ask_hn`, `show_hn`, `job`, `poll`, `front_page` (current front page, no query needed) or `all`. |
| `sortBy` | `date` (newest first - monitoring) or `relevance`. |
| `maxItemsPerQuery` | 1-1000 (default 50). |
| `onlyNewerThanDays`, `minPoints`, `minComments`, `author` | Optional filters. |
| `includeText` | Comment / Ask HN / job text, HTML stripped. |

Example:

```json
{ "queries": ["n8n", "zapier alternative"], "itemType": "all", "sortBy": "date", "onlyNewerThanDays": 7, "maxItemsPerQuery": 200 }
```

### Output (one row per item)

```json
{
  "query": "AI agents",
  "type": "story",
  "id": "50190034",
  "title": "Personal Agent Protocol",
  "url": "https://sierra.ai/blog/introducing-personal-agent-protocol",
  "domain": "sierra.ai",
  "author": "gmays",
  "points": 1,
  "numComments": 0,
  "createdAt": "2026-10-22T01:35:11Z",
  "hnUrl": "https://news.ycombinator.com/item?id=50190034",
  "storyId": 50190034,
  "storyTitle": null,
  "text": null
}
```

For comments, `storyTitle` / `storyUrl` tell you which thread the comment belongs to. A `RUN_SUMMARY` record with counts is saved in the key-value store.

### Pricing (pay per event)

- **$0.001 per Hacker News item saved** (`hn-item`) - $1 per 1,000 items.
- Tiny start fee per run (`apify-actor-start`).
- Failed queries are not charged. Set "Maximum cost per run" to cap spend - the run stops gracefully and keeps the results already saved.

### Limits & notes

- The HN search API returns at most 1,000 results per query; use date / points filters or several narrower queries for more.
- Items are deduplicated across queries in the same run.
- Data comes from the public Hacker News API. Not affiliated with Y Combinator.

### FAQ

**Can I get only new mentions every day?** Yes: `sortBy: date`, `onlyNewerThanDays: 1`, and add a daily schedule in Apify.
**Does it need an API key or proxy?** No.

# Actor input Schema

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

Keywords, brand names, domains or phrases. Each query is searched separately.

## `itemType` (type: `string`):

What to search. 'Current front page' works without a query.

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

Newest first is best for daily monitoring.

## `maxItemsPerQuery` (type: `integer`):

The HN API returns at most 1,000 results per query - narrow with date/points filters for more.

## `onlyNewerThanDays` (type: `integer`):

0 = no date filter. Use 1 for a daily scheduled monitor.

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

Only stories with at least this many points (comments have no points).

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

Only stories with at least this many comments.

## `author` (type: `string`):

Optional: only items by this HN user (works with or without a query).

## `includeText` (type: `boolean`):

Comment text, Ask/Show HN text and job descriptions (HTML stripped).

## Actor input object example

```json
{
  "queries": [
    "AI agents",
    "web scraping"
  ],
  "itemType": "story",
  "sortBy": "date",
  "maxItemsPerQuery": 50,
  "onlyNewerThanDays": 0,
  "minPoints": 0,
  "minComments": 0,
  "includeText": true
}
```

# Actor output Schema

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

No description

## `runSummary` (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 = {
    "queries": [
        "AI agents",
        "web scraping"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("zhucl1006/hacker-news-search-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": [
        "AI agents",
        "web scraping",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("zhucl1006/hacker-news-search-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": [
    "AI agents",
    "web scraping"
  ]
}' |
apify call zhucl1006/hacker-news-search-monitor --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,zhucl1006/hacker-news-search-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/o89DyPf2lSuw47D8p/builds/k8zgqHXIESLVgRq1M/openapi.json
