# HN Opportunity Finder - Warm Developer Leads (`datarummage/hn-opportunity-finder`) Actor

Find warm Hacker News opportunity signals where developers/founders mention pain points, tool needs, recommendations, or buying intent.

- **URL**: https://apify.com/datarummage/hn-opportunity-finder.md
- **Developed by:** [Data Rummage](https://apify.com/datarummage) (community)
- **Categories:** Developer tools, Marketing, Lead generation
- **Stats:** 2 total users, 1 monthly users, 66.7% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $5.00 / 1,000 opportunities

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/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js/docs.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python/docs.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/integrations/mcp.md).

If your project is in a different language, use the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).


# README

## HN Opportunity Finder

Find warm developer-tool opportunity signals hiding in Hacker News conversations.

This Actor searches recent Hacker News stories and comments, scores them for pain/buying-intent signals, and outputs explainable opportunity records you can review, filter, export, or pipe into your own research workflow.

Why it stands out:

- Free public data source: Hacker News Algolia API. No proxy. No scraping account. No API key.
- Honest lead tiers: separates research chatter from warm leads and rare direct buyer asks.
- Explainable output: every row includes score, matched keywords, pain signals, lead quality, reason, suggested offer, and contact angle.
- Built for action: the run `SUMMARY` tells you what happened at a glance, including zero-result hints.
- Small useful first run: starts with sane defaults instead of dumping thousands of noisy rows.

### Best first run

Use this input first. It keeps the run small and returns the useful middle tier: warm + direct opportunities.

```json
{
  "keywords": ["webhooks", "api"],
  "days": 45,
  "maxResults": 100,
  "outputLimit": 10,
  "minScore": 50,
  "includeWeakSignals": false,
  "requireKeywordMatch": true,
  "excludeHiringPosts": true,
  "excludeShowHN": true,
  "leadQualityMode": "qualified"
}
````

Expected shape from a live smoke run:

```text
Scanned: 100 HN items
Output: 4 qualified opportunities
Lead quality: 3 warm_lead, 1 direct_lead
Top matched keywords: webhooks, api
```

### The important difference

Most “lead finder” tools blur together three very different things:

1. Someone explicitly asking for a tool.
2. Someone describing a painful workflow.
3. A general market discussion.

This Actor keeps those separate.

| Mode | Output | Use when |
|---|---|---|
| `qualified` | `warm_lead` + `direct_lead` | You want useful opportunities without research-only chatter. Recommended. |
| `direct_only` | `direct_lead` only | You only want rare explicit asks like “what do you use?” or “I need a tool.” Expect fewer results. |
| `all` | `research`, `warm_lead`, `direct_lead` | You want broad market research, topic clustering, and trend discovery. |

`directLeadOnly=true` still works as a legacy alias for `leadQualityMode=direct_only`.

### Good starter niches

Copy one set into `keywords`:

- `postgres`, `backups`, `monitoring`
- `webhooks`, `api`
- `kubernetes`, `deployment`, `logs`
- `customer support`, `zendesk`, `tickets`
- `openai`, `api`, `costs`
- `email`, `deliverability`, `transactional`
- `stripe`, `billing`, `invoices`
- `llm`, `rag`, `evals`
- `scraping`, `data`, `api`

### Dataset output

Each dataset item is one opportunity signal.

```json
{
  "id": "example-hn-id",
  "source": "hackernews",
  "type": "story",
  "title": "Ask HN: What's your go-to queue system?",
  "text": "Example HN discussion text...",
  "author": "hn_user",
  "url": "https://news.ycombinator.com/item?id=example-hn-id",
  "externalUrl": "",
  "points": 3,
  "commentsCount": 2,
  "createdAt": "2026-06-21T14:32:35Z",
  "opportunityScore": 73,
  "painSignals": ["keyword_match", "need", "tool", "service", "api", "queue"],
  "matchedKeywords": ["webhooks", "api"],
  "opportunityType": "developer_platform_need",
  "buyerIntentReason": "States an active need or production pressure.",
  "suggestedOffer": "A small API, integration, or hosted developer utility for webhooks, api.",
  "contactAngle": "Ask a narrow follow-up about the pain behind webhooks, api; validate before building.",
  "estimatedValue": "medium",
  "whyNow": "Recent HN discussion; best used as a lead or research signal while context is fresh.",
  "difficulty": "medium",
  "leadQuality": "direct_lead",
  "leadQualityReason": "Direct ask plus buying, operational, or high-score pain signal.",
  "directLead": true,
  "opportunity": "Research this pain point around webhooks, api",
  "suggestedAction": "Save for market research; cluster with similar items before building.",
  "searchKeywords": ["webhooks", "api"],
  "lookbackDays": 45
}
```

### Run summary

The Actor also writes a `SUMMARY` key-value record for quick review:

```json
{
  "query": {
    "keywords": ["webhooks", "api"],
    "leadQualityMode": "qualified"
  },
  "count": 4,
  "summary": {
    "scannedCount": 100,
    "candidateCount": 4,
    "outputCount": 4,
    "leadQuality": {"warm_lead": 3, "direct_lead": 1},
    "opportunityTypes": {
      "operational_reliability": 1,
      "developer_platform_need": 2,
      "paid_alternative": 1
    },
    "topMatchedKeywords": ["webhooks", "api"],
    "directLeads": 1,
    "warmLeads": 3,
    "researchSignals": 0,
    "zeroResultHint": ""
  }
}
```

If a run returns zero items, `zeroResultHint` tells you the next useful move: broaden keywords, lower `minScore`, switch from `direct_only` to `qualified`, or use `all` for market research.

### Practical workflows

Use this Actor to:

- find developer pain points worth validating
- monitor a niche before building a SaaS/productized service
- collect raw market language for landing pages
- discover “what do you use?” recommendation threads
- compare warm opportunity volume across niches
- feed lead/opportunity rows into Sheets, Airtable, Notion, or your CRM

### Input tips

- Start with 2-3 specific keywords.
- Prefer product/pain terms over generic words.
- Good: `webhooks`, `api`, `queue`.
- Weak alone: `software`, `startup`, `data`.
- Keep `excludeHiringPosts=true` unless researching hiring demand.
- Keep `excludeShowHN=true` unless doing competitor/product-discovery.

### Local API mode

The same logic can run as a FastAPI app for local or hosted HTTP access.

```bash
cd hn-opportunity-api
python -m venv .venv
. .venv/bin/activate
pip install -e '.[test]'
uvicorn hn_opportunity_api.app:app --app-dir src --host 0.0.0.0 --port 8000
```

Example:

```text
http://localhost:8000/v1/opportunities?keywords=webhooks,api&days=45&maxResults=100&outputLimit=10&minScore=50&leadQualityMode=qualified
```

### Privacy and data source notes

- No secrets are required.
- No Apify Proxy is required.
- No paid data source is required.
- Results are generated from public Hacker News data returned by the HN Algolia API.
- Runtime output can include public HN usernames and post/comment text because those are part of the source data.
- Treat results as opportunity signals to validate, not guaranteed buyers.

### Development

```bash
python -m venv .venv
. .venv/bin/activate
pip install -e '.[test]'
pytest -q
uvx ruff check .
```

# Actor input Schema

## `keywords` (type: `array`):

Topics/products/pains to search for. Starter examples: postgres/backups/monitoring, webhooks/api, kubernetes/deployment/logs, customer support/zendesk/tickets, openai/api/costs.

## `days` (type: `integer`):

Only include HN items from the last N days.

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

Maximum number of Hacker News search hits to scan before scoring and filtering.

## `outputLimit` (type: `integer`):

Maximum number of ranked opportunities to push to the dataset after scoring and filtering. This is capped by maxResults.

## `minScore` (type: `integer`):

Only output items with an opportunity score at or above this value unless weak signals are included.

## `includeWeakSignals` (type: `boolean`):

Output all scored items, including results below minScore.

## `requireKeywordMatch` (type: `boolean`):

Filter out items that do not actually contain any requested keyword after normalization.

## `excludeHiringPosts` (type: `boolean`):

Remove Ask HN hiring / wants-to-be-hired posts, which are usually job ads rather than product opportunities.

## `excludeShowHN` (type: `boolean`):

Remove maker showcase posts by default. Turn off for competitor-discovery mode.

## `leadQualityMode` (type: `string`):

Choose all signals, qualified leads (warm + direct), or only rare high-confidence direct leads. Recommended: qualified.

## `directLeadOnly` (type: `boolean`):

Legacy strict filter. If true, overrides leadQualityMode and only outputs rare high-confidence direct leads.

## Actor input object example

```json
{
  "keywords": [
    "postgres",
    "backups",
    "monitoring"
  ],
  "days": 30,
  "maxResults": 100,
  "outputLimit": 25,
  "minScore": 55,
  "includeWeakSignals": false,
  "requireKeywordMatch": true,
  "excludeHiringPosts": true,
  "excludeShowHN": true,
  "leadQualityMode": "qualified",
  "directLeadOnly": false
}
```

# Actor output Schema

## `opportunities` (type: `string`):

Ranked Hacker News posts/comments with pain signals, buyer-intent reasoning, suggested offers, and outreach angles.

## `summary` (type: `string`):

Run metadata including query, scanned count, output count, lead-quality counts, direct-lead count, and zero-result hints when applicable.

# 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 = {
    "keywords": [
        "postgres",
        "backups",
        "monitoring"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("datarummage/hn-opportunity-finder").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 = { "keywords": [
        "postgres",
        "backups",
        "monitoring",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("datarummage/hn-opportunity-finder").call(run_input=run_input)

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

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

```

## CLI example

```bash
echo '{
  "keywords": [
    "postgres",
    "backups",
    "monitoring"
  ]
}' |
apify call datarummage/hn-opportunity-finder --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=datarummage/hn-opportunity-finder",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "HN Opportunity Finder - Warm Developer Leads",
        "description": "Find warm Hacker News opportunity signals where developers/founders mention pain points, tool needs, recommendations, or buying intent.",
        "version": "0.1",
        "x-build-id": "T3Py6cmG7hfxRK12t"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/datarummage~hn-opportunity-finder/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-datarummage-hn-opportunity-finder",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/datarummage~hn-opportunity-finder/runs": {
            "post": {
                "operationId": "runs-sync-datarummage-hn-opportunity-finder",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/datarummage~hn-opportunity-finder/run-sync": {
            "post": {
                "operationId": "run-sync-datarummage-hn-opportunity-finder",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "required": [
                    "keywords"
                ],
                "properties": {
                    "keywords": {
                        "title": "Keywords",
                        "type": "array",
                        "description": "Topics/products/pains to search for. Starter examples: postgres/backups/monitoring, webhooks/api, kubernetes/deployment/logs, customer support/zendesk/tickets, openai/api/costs.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "days": {
                        "title": "Lookback days",
                        "minimum": 1,
                        "maximum": 365,
                        "type": "integer",
                        "description": "Only include HN items from the last N days.",
                        "default": 30
                    },
                    "maxResults": {
                        "title": "Maximum HN items to scan",
                        "minimum": 1,
                        "maximum": 1000,
                        "type": "integer",
                        "description": "Maximum number of Hacker News search hits to scan before scoring and filtering.",
                        "default": 100
                    },
                    "outputLimit": {
                        "title": "Maximum opportunities to output",
                        "minimum": 1,
                        "maximum": 1000,
                        "type": "integer",
                        "description": "Maximum number of ranked opportunities to push to the dataset after scoring and filtering. This is capped by maxResults.",
                        "default": 25
                    },
                    "minScore": {
                        "title": "Minimum opportunity score",
                        "minimum": 0,
                        "maximum": 100,
                        "type": "integer",
                        "description": "Only output items with an opportunity score at or above this value unless weak signals are included.",
                        "default": 55
                    },
                    "includeWeakSignals": {
                        "title": "Include weak signals",
                        "type": "boolean",
                        "description": "Output all scored items, including results below minScore.",
                        "default": false
                    },
                    "requireKeywordMatch": {
                        "title": "Require keyword match",
                        "type": "boolean",
                        "description": "Filter out items that do not actually contain any requested keyword after normalization.",
                        "default": true
                    },
                    "excludeHiringPosts": {
                        "title": "Exclude hiring posts",
                        "type": "boolean",
                        "description": "Remove Ask HN hiring / wants-to-be-hired posts, which are usually job ads rather than product opportunities.",
                        "default": true
                    },
                    "excludeShowHN": {
                        "title": "Exclude Show HN / launch posts",
                        "type": "boolean",
                        "description": "Remove maker showcase posts by default. Turn off for competitor-discovery mode.",
                        "default": true
                    },
                    "leadQualityMode": {
                        "title": "Lead quality filter",
                        "enum": [
                            "all",
                            "qualified",
                            "direct_only"
                        ],
                        "type": "string",
                        "description": "Choose all signals, qualified leads (warm + direct), or only rare high-confidence direct leads. Recommended: qualified.",
                        "default": "qualified"
                    },
                    "directLeadOnly": {
                        "title": "Legacy: only direct leads",
                        "type": "boolean",
                        "description": "Legacy strict filter. If true, overrides leadQualityMode and only outputs rare high-confidence direct leads.",
                        "default": false
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
