# Hacker News Keyword Story Search Export (`jpmarketdata/hacker-news-keyword-story-search-export`) Actor

Export recent Hacker News story matches for a keyword from the public Algolia HN Search API, with UTC date, points, comment count, story IDs and honest first-page limits.

- **URL**: https://apify.com/jpmarketdata/hacker-news-keyword-story-search-export.md
- **Developed by:** [h ichi](https://apify.com/jpmarketdata) (community)
- **Categories:** Developer tools, Automation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$1.00 / 1,000 hn story match 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

## Hacker News Keyword Story Search Export

Find recent Hacker News stories matching a product or technology phrase through the public Algolia-operated HN Search API. Export dated story IDs, score, discussion count and canonical HN links for repeated product-research or developer-relations checks. This independent Actor is not endorsed by HN, YC or Algolia.

### Input

`query` defaults to `Python` (1–60 characters, no contacts/URLs); `lookbackDays` defaults to 14 (1–30); `minPoints` defaults to 10 (0–1000); `maxItems` defaults to 50 (1–100). Nondefault example: `Rust`, 7 days, 10 points, 50 rows. The source may match indexed fields beyond the returned title; title inclusion of the exact phrase is not promised.

### Output

One row per validated unique story match: title after contact redaction, story ID, UTC publish time, observed points/comment count, HN item link, source rank, reported match count, whether that count was exhaustive, and whether newer-first output omitted additional pages. The public Algolia index may lag HN or report approximate counts. These are observed engagement values, not sentiment or market size. No authors, comments, story body, external-article scraping or complete HN history.

### Pricing

$0.001 per delivered `story-match-delivered` row on FREE. No start, request, duplicate, failed or zero-row charge. A 20-row run costs at most $0.02; 100-row hard maximum costs $0.10.

### Limits and failure

One fixed source search GET plus runtime robots GET, one newest-first page, 2 MiB source response cap, 256 MB, 120 seconds, no browser, proxy or paid API. A blocked, rate-limited, malformed or timed-out source fails before output and charge. Zero valid matches fail explicitly rather than succeeding empty.

### Privacy and source

Only public HN story identity and numeric engagement metadata are delivered. Search inputs containing contact-like identifiers are rejected; titles are capped and contact strings redacted. Source: public HN Search API operated by Algolia. YC terms restrict automated extraction and commercial copying; collection is bounded, with no bypass or authored text export.

# Actor input Schema

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

1–60 character technology/product topic; no email, phone, URL or personal identifier. Algolia may match indexed fields beyond the delivered title.

## `lookbackDays` (type: `integer`):

Include source stories created after now minus this many 24-hour days (UTC), 1–30.

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

Minimum observed story points, 0–1000.

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

Newest 1–100 matches from one Algolia page; outputLimited reveals more pages.

## Actor input object example

```json
{
  "query": "Python",
  "lookbackDays": 14,
  "minPoints": 10,
  "maxItems": 50
}
```

# 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 = {
    "query": "Python"
};

// Run the Actor and wait for it to finish
const run = await client.actor("jpmarketdata/hacker-news-keyword-story-search-export").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 = { "query": "Python" }

# Run the Actor and wait for it to finish
run = client.actor("jpmarketdata/hacker-news-keyword-story-search-export").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 '{
  "query": "Python"
}' |
apify call jpmarketdata/hacker-news-keyword-story-search-export --silent --output-dataset

```

## MCP server setup

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

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/mmRkBDmed4ad638s0/builds/4YDGIzcxOoRPZJBuV/openapi.json
