# HN Buyer Intent Signals (`skootle/social-comment-buyer-intent-intelligence`) Actor

Find purchase intent, product questions, objections, complaints, feature requests, support needs, praise, spam, and brand risk in public Hacker News discussions through the official API.

- **URL**: https://apify.com/skootle/social-comment-buyer-intent-intelligence.md
- **Developed by:** [Skootle](https://apify.com/skootle) (community)
- **Categories:** Social media, Lead generation, AI
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.00 / 1,000 buyer intent intelligence records

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

<!-- skootle:growth-loop-hook -->
## HN Buyer Intent Signals

**Turn public Hacker News discussion comments into an explainable queue of purchase intent, product questions, objections, complaints, feature requests, support needs, praise, spam, and brand risk.** Run a discussion from the Apify Console, call the Actor through the API, schedule recurring checks, or analyze an existing comment dataset.

![Public comment buyer intent analytics](https://raw.githubusercontent.com/kesjam/skootle-actors-assets/main/heroes/social-comment-buyer-intent-intelligence.png)

### TL;DR

Give the Actor one or more public Hacker News discussion URLs. It retrieves public comments through the official Hacker News Firebase API, strips HTML formatting, preserves source links, deduplicates comment IDs, and applies a deterministic classification contract.

Every successful run returns:

- One `SUMMARY` row with comment count, classification counts, buyer-intent rate, top objections, confidence, source list, and an agent-ready briefing.
- One `comment_intelligence` row per useful comment with source URL, author, publication time, classification, confidence, urgency, theme, product or feature mentions, and a suggested response action.
- `AGENT_BRIEFING` in the default key-value store for a fast downstream review.
- Explicit failures when the source is unsupported, malformed, unavailable, or unexpectedly empty.

The default input is a real public Hacker News discussion URL, so a first run demonstrates independent acquisition without requiring a separate scraper, account, browser, cookie, proxy, or API key.

<!-- skootle:review-cta -->
If this Actor turns a long discussion into a useful sales or product queue, leave a short review and mention the workflow you used.

### What does HN Buyer Intent Signals do?

Hacker News discussions often contain more decision evidence than a simple vote count or sentiment score. Buyers ask about pricing, availability, integrations, limitations, and migration. Existing users report defects and support needs. Technical evaluators raise objections. Product teams request features. Security-minded readers flag risk. The hard part is turning that mixed conversation into a bounded, reproducible queue without reading every thread manually.

This Actor performs that work in a transparent sequence:

1. Validate every input URL as public HTTP or HTTPS.
2. Accept only supported Hacker News discussion item URLs for direct acquisition.
3. Extract the numeric item ID and generate fixed official Firebase API requests.
4. Retrieve the root discussion and traverse public comment descendants in bounded batches.
5. Stop at the requested comment limit or the hard traversal ceiling.
6. Skip deleted, dead, missing, or empty comments.
7. Decode basic HTML entities and remove display markup.
8. Preserve the public comment URL and author when available.
9. Remove duplicate comment IDs before classification.
10. Apply optional keyword filters.
11. Apply deterministic taxonomy rules with an explicit confidence value.
12. Emit one run summary before detailed comment rows.
13. Fail closed when the direct source cannot produce useful public comments.

No LLM is required for the baseline classification. The same input and comment text produce the same taxonomy decision. That makes results easier to test, audit, route, and compare over time.

### Which sources are supported?

#### Direct public acquisition

Direct `postUrls` currently support public Hacker News discussion items such as:

```text
https://news.ycombinator.com/item?id=8863
````

The Actor uses the official Hacker News Firebase API documented at:

https://github.com/HackerNews/API

It does not scrape Hacker News HTML for comment content. It does not require authentication. It does not accept arbitrary API hosts, cookies, credentials, private endpoints, local network addresses, or user-provided headers.

#### Existing Apify datasets

Use `datasetIds` when you already have comment records from another authorized source. The Actor recognizes common text fields such as `text`, `comment`, `body`, or `message`, plus common author, timestamp, and engagement fields.

Dataset mode is useful when:

- Another approved Actor already collects the source.
- Your organization has a licensed export.
- A platform provides an account-owned data export.
- You want one deterministic taxonomy across several comment producers.

The source and permissions for a supplied dataset remain the buyer's responsibility. This Actor analyzes provided rows and does not expand collection rights.

#### Inline comments

Use `comments` for small tests, support exports, fixtures, or application-provided records. Inline mode is bounded to 2,000 records and uses the same normalization, deduplication, filtering, classification, and summary contract.

### Input

A direct Hacker News run can be as small as:

```json
{
  "postUrls": [
    "https://news.ycombinator.com/item?id=8863"
  ],
  "maxCommentsPerTarget": 100,
  "keywords": [],
  "enabledTaxonomies": [
    "purchase_intent",
    "product_question",
    "objection",
    "complaint",
    "feature_request",
    "support_issue",
    "spam",
    "praise",
    "risk"
  ],
  "timeoutSecs": 120,
  "maxTotalChargeUsd": 0.3
}
```

#### Input fields

| Field | Purpose | Default and limit |
|---|---|---|
| `postUrls` | Public Hacker News discussion URLs for independent acquisition | Prefilled with one public example, maximum 20 |
| `datasetIds` | Existing Apify datasets containing comment-like rows | Empty, maximum 20 |
| `comments` | Inline normalized or common comment records | Empty, maximum 2,000 |
| `maxCommentsPerTarget` | Maximum useful comments analyzed for each target | 100, range 1 to 1,000 |
| `maxPages` | Reserved cap for paginated dataset sources | 5, range 1 to 20 |
| `timeoutSecs` | Bounded runtime and source-request context | 120, range 10 to 600 |
| `language` | Language context recorded for deterministic analysis | `en` |
| `keywords` | Optional case-insensitive filters | Empty, maximum 50 |
| `enabledTaxonomies` | Taxonomy labels eligible for output | All nine labels |
| `maxTotalChargeUsd` | Buyer-controlled requested charge ceiling | 0.30, range 0.01 to 100 |

At least one of `postUrls`, `datasetIds`, or `comments` must contain a value. An empty input is rejected instead of producing a misleading empty success.

### Output contract

#### `SUMMARY`

The first row is designed for dashboards, alerts, and agent context:

```json
{
  "schemaVersion": 1,
  "recordType": "SUMMARY",
  "id": "summary_stable_id",
  "platform": "dataset",
  "sourceUrl": "https://news.ycombinator.com/item?id=8863",
  "retrievedAt": "2026-07-24T13:00:00.000Z",
  "fieldCompletenessScore": 1,
  "confidence": 0.82,
  "agentMarkdown": "# Buyer intent briefing\n\nAnalyzed 12 unique comments; 2 show purchase intent.",
  "totalComments": 12,
  "classificationCounts": {
    "purchase_intent": 2,
    "product_question": 4,
    "objection": 2,
    "complaint": 0,
    "feature_request": 2,
    "support_issue": 0,
    "spam": 0,
    "praise": 2,
    "risk": 0
  },
  "buyerIntentRate": 0.1667,
  "topObjections": [],
  "errors": []
}
```

The example demonstrates the schema, not a claim about the current contents of item 8863. A bounded live verification on 2026-07-24 independently retrieved 12 useful public comment rows from the official API and produced `SUMMARY` plus `comment_intelligence` record types.

#### `comment_intelligence`

Each detailed row preserves evidence and an actionable classification:

```json
{
  "schemaVersion": 1,
  "recordType": "comment_intelligence",
  "id": "public-comment-id",
  "platform": "hacker_news",
  "sourceUrl": "https://news.ycombinator.com/item?id=public-comment-id",
  "retrievedAt": "2026-07-24T13:00:00.000Z",
  "fieldCompletenessScore": 0.75,
  "confidence": 0.9,
  "text": "Example purchase question from a public discussion.",
  "author": "public-author",
  "publishedAt": "2026-07-24T12:00:00.000Z",
  "likes": 0,
  "classification": "purchase_intent",
  "urgency": "low",
  "theme": "purchase intent",
  "productFeatureMentions": [],
  "suggestedResponseAction": "Answer price/availability and provide a direct purchase path."
}
```

The output keeps source evidence beside the decision. Downstream systems should not separate a classification from its public comment URL, retrieval time, and confidence.

### How are comments classified?

The baseline taxonomy is deterministic and explainable:

- `purchase_intent`: price, ordering, buying, availability, or direct purchase language.
- `product_question`: questions about capability, compatibility, size, model, or availability.
- `objection`: price resistance, uncertainty, shipping concerns, or explicit reservations.
- `complaint`: disappointment, poor quality, non-delivery, or strongly negative experience.
- `feature_request`: requests to add, change, or improve a capability.
- `support_issue`: broken behavior, access trouble, errors, refunds, or direct help requests.
- `spam`: common solicitation, giveaway, messaging-app, and irrelevant promotion patterns.
- `praise`: clear positive product or experience language.
- `risk`: scam, fraud, counterfeit, unsafe, lawsuit, or related brand-safety terms.

When more than one rule matches, the current deterministic rule order decides the label. Confidence describes the matched rule, not the truth of the underlying claim. The Actor does not make legal, safety, fraud, or reputation findings.

Urgency is separately classified as high, medium, or low from explicit time language. Suggested actions are bounded templates, not automated replies. The Actor never posts to Hacker News or sends a message.

### Worked example 1: scan one launch discussion

Start with one public discussion URL and a small limit:

```json
{
  "postUrls": ["https://news.ycombinator.com/item?id=8863"],
  "maxCommentsPerTarget": 50,
  "timeoutSecs": 120,
  "maxTotalChargeUsd": 0.3
}
```

Review the `SUMMARY` first. If buyer intent or objections are present, sort detailed rows by classification and confidence, then open the public source URL before taking action. This is appropriate for product research, launch retrospectives, and response planning.

### Worked example 2: find pricing and buying questions

Apply a focused keyword set:

```json
{
  "postUrls": ["https://news.ycombinator.com/item?id=8863"],
  "maxCommentsPerTarget": 200,
  "keywords": ["price", "cost", "buy", "pricing", "subscription"],
  "enabledTaxonomies": ["purchase_intent", "product_question", "objection"],
  "maxTotalChargeUsd": 0.3
}
```

A valid filter with no matches returns a zero-count `SUMMARY`. That is different from a source failure. Unsupported URLs, failed API requests, malformed JSON, and unexpectedly empty source discussions fail instead of masquerading as zero demand.

### Worked example 3: build a feature-request backlog

Use a wider keyword set and retain feature questions:

```json
{
  "postUrls": ["https://news.ycombinator.com/item?id=8863"],
  "maxCommentsPerTarget": 300,
  "keywords": ["add", "support", "integration", "export", "api", "feature"],
  "enabledTaxonomies": ["feature_request", "product_question", "support_issue"],
  "maxTotalChargeUsd": 0.3
}
```

Store comment IDs as deduplication keys. Keep the public source URL. A product manager can group rows by `theme`, inspect the exact comment, and decide whether the request belongs in discovery, validation, or delivery.

### Worked example 4: monitor several discussions

```json
{
  "postUrls": [
    "https://news.ycombinator.com/item?id=8863",
    "https://news.ycombinator.com/item?id=2921983"
  ],
  "maxCommentsPerTarget": 100,
  "timeoutSecs": 180,
  "maxTotalChargeUsd": 0.6
}
```

Schedule the same input through Apify. Compare stable comment IDs between runs. Route only newly observed rows. Do not treat a different comment count as a business event until source health and input equality are confirmed.

### Worked example 5: analyze an existing Apify dataset

```json
{
  "datasetIds": ["YOUR_AUTHORIZED_COMMENT_DATASET_ID"],
  "maxCommentsPerTarget": 500,
  "keywords": ["shipping", "price", "refund"],
  "maxTotalChargeUsd": 1
}
```

The dataset may use `text`, `comment`, `body`, or `message`. Common author, timestamp, and engagement fields are normalized when available. Missing comment text is a malformed source error. The Actor does not silently discard every malformed row and claim success.

### Worked example 6: test an application integration inline

```json
{
  "comments": [
    {
      "id": "local-1",
      "text": "How much does the team plan cost?",
      "author": "example-user",
      "sourceUrl": "https://example.invalid/internal-reference"
    },
    {
      "id": "local-2",
      "text": "Please add a CSV export.",
      "author": "example-user-2",
      "sourceUrl": "https://example.invalid/internal-reference-2"
    }
  ],
  "maxCommentsPerTarget": 100,
  "maxTotalChargeUsd": 0.3
}
```

Inline mode is ideal for unit tests and controlled application payloads. The example URLs are placeholders stored as evidence fields only. Direct acquisition is performed only for supported `postUrls`.

### How do I run it through the Apify API?

Use the standard Actor run endpoint after the Actor is available:

```bash
curl -X POST \
  "https://api.apify.com/v2/acts/skootle~social-comment-buyer-intent-intelligence/runs?token=$APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "postUrls": ["https://news.ycombinator.com/item?id=8863"],
    "maxCommentsPerTarget": 100,
    "maxTotalChargeUsd": 0.3
  }'
```

Keep tokens in a secret manager or environment variable. Never place an Apify token in Actor input, source URLs, datasets, screenshots, support messages, or README examples.

### How can I integrate the output?

Common integrations include:

- Send newly detected purchase-intent rows to a sales-review queue.
- Add feature requests to a product-discovery database after human review.
- Compare objection themes across launch discussions.
- Send high-confidence support needs to an internal triage board.
- Store weekly summaries in a warehouse for trend analysis.
- Export CSV or JSON from the default dataset.
- Trigger a webhook only after a successful Actor run.
- Let an agent read `AGENT_BRIEFING` before retrieving detailed rows.

A safe integration should preserve `id`, `sourceUrl`, `retrievedAt`, `classification`, and `confidence`. It should deduplicate by source plus comment ID. It should never auto-reply based only on a classification label.

### How much does it cost?

Launch pricing is pay per result:

- Actor start: **$0.01**.
- Dataset item: **$0.003** per saved summary or comment-intelligence row.
- Default Actor-level maximum total charge: **$5**.
- The input also exposes a smaller buyer-requested `maxTotalChargeUsd` value for bounded workflows.

The live Apify pricing panel is the source of truth. Start with one discussion and a small comment limit. Cost depends mainly on the number of useful output rows. The direct Hacker News source requires no browser, residential proxy, paid unblocker, or upstream API key, which keeps variable compute cost low.

### Is it legal to analyze public Hacker News comments?

The Actor uses a public official API and preserves public source URLs, but public availability does not remove every legal, privacy, contractual, attribution, or ethical obligation. Review Hacker News rules, the official API documentation, applicable law, and your organization's policies for the intended use.

This Actor:

- Does not bypass authentication, CAPTCHAs, paywalls, rate limits, or access controls.
- Does not collect private messages, email addresses, cookies, credentials, or hidden account data.
- Does not post, vote, reply, contact authors, or modify Hacker News.
- Does not claim that a public comment is accurate, representative, or authorized for every downstream use.
- Does not provide legal advice.

Use classifications as research and routing signals. Review the original public comment before making a consequential decision about a person, customer, employee, applicant, account, or company.

### Privacy and responsible use

Public usernames and comment text can still be personal data in context. Use the smallest collection needed for the stated workflow.

Recommended controls:

1. Limit comment counts and discussion targets.
2. Retain source URLs and retrieval time.
3. Avoid enriching public usernames with unrelated personal data.
4. Do not infer protected traits.
5. Do not use a taxonomy label as an eligibility decision.
6. Apply retention and access-control policies to exported datasets.
7. Review high-risk, complaint, and support rows before sharing.
8. Remove data when your policy or applicable law requires it.
9. Keep automated outreach disabled unless separately authorized.

The Actor emits suggested response actions as text only. It does not send them.

### Reliability and failure semantics

A useful monitoring product must distinguish healthy zero from unavailable evidence.

The Actor allows one healthy zero case: a valid source was retrieved, useful comments existed before filtering, and an explicit keyword filter matched none. In that case the `SUMMARY` reports zero comments and no source errors.

The Actor fails when:

- A direct URL is not a supported Hacker News item.
- A URL is private, local, malformed, or resolves to a non-public address.
- The official API returns a non-success status.
- The root item is missing or is not a discussion item.
- The response shape is malformed.
- No useful public comments can be retrieved from the requested discussion.
- A dataset row lacks comment text.
- A required dataset or direct adapter is unavailable.
- Input exceeds bounded target, record, taxonomy, timeout, or charge limits.

The production wrapper calls `Actor.fail()` on fatal errors. It does not call `Actor.exit()` from an unconditional `finally` block, so a source failure cannot be converted into a misleading successful run.

### Security design

- Direct URLs are checked for public HTTP or HTTPS.
- Localhost, link-local, metadata, private IPv4, private IPv6, and local hostnames are rejected.
- Redirect targets are revalidated by the shared safe-fetch boundary.
- The direct HN adapter accepts only a numeric discussion ID from fixed public hosts.
- Generated API calls use the fixed `hacker-news.firebaseio.com` host.
- No buyer-provided headers, cookies, proxy URLs, credentials, or arbitrary API endpoints are accepted.
- Input and traversal limits prevent unbounded collection.
- Source failures stop the run instead of falling through to billable empty output.

### Limitations

- Direct acquisition currently supports Hacker News only.
- Dataset and inline modes can normalize other authorized comment exports, but this Actor does not acquire those platforms directly.
- Classification is keyword and pattern based. It does not understand every form of sarcasm, slang, multilingual context, or indirect intent.
- One comment can match several ideas, but the current contract emits one primary classification.
- Confidence belongs to the matched rule, not to the truth of the comment.
- Hacker News comments can be edited, deleted, nested, or unavailable after a prior run.
- Public discussions are not representative samples of all customers or market demand.
- Comment counts, votes, and classification counts are not revenue forecasts.
- The Actor does not compute sentiment, identity, demographics, reputation, legal risk, or fraud scores.
- Keyword filters can hide relevant comments when the vocabulary differs.
- A bounded run may stop before every descendant comment is traversed.

### FAQ

#### Does this require an LLM?

No. The baseline taxonomy is deterministic. This keeps costs low and makes decisions reproducible. You can add your own downstream model after reviewing the normalized evidence.

#### Does it scrape Hacker News HTML?

No. Direct acquisition uses the official Hacker News Firebase API. Public comment source links point back to Hacker News.

#### Can I analyze Reddit, YouTube, TikTok, Instagram, or Facebook comments?

You can analyze an authorized existing dataset or inline export when its rows fit the supported comment fields. Direct URL acquisition for those platforms is not included in the current release.

#### What happens when a discussion has no usable comments?

The run fails closed. An unexpectedly empty direct source is not reported as healthy zero demand.

#### Can a keyword filter return zero rows successfully?

Yes. When the direct or supplied source first produced useful comments and the explicit filter matched none, the `SUMMARY` reports zero. That is a valid no-match query.

#### Are duplicate comments billed twice?

Duplicate comment IDs are removed within a run before detailed output. Stable source IDs are preserved when available.

#### Can I schedule the Actor?

Yes. Use a stable input and compare comment IDs between runs. Route only new rows, and preserve prior successful evidence when a later source run fails.

#### Can I export CSV, JSON, or Excel-compatible data?

Yes. The default Apify dataset supports standard exports. Nested summary fields may need flattening for some spreadsheet workflows.

#### Does the Actor send replies?

No. Suggested actions are review text only. The Actor never posts, messages, votes, or contacts authors.

#### Is a `risk` label proof of fraud or danger?

No. It means a bounded text rule matched risk-related language. Review the original public comment and supporting facts before any decision.

#### Can I change the enabled labels?

Yes. Use `enabledTaxonomies` to restrict output decisions to the categories relevant to your workflow.

#### How should I report a problem?

Include the Actor run ID, a redacted input shape, the public discussion URL, expected record type, and observed failure. Never send tokens, cookies, private datasets, or unrelated personal information.

### Support and feedback

Useful feature requests include additional official or clearly authorized comment APIs, multilingual deterministic rule packs, configurable taxonomy precedence, richer summary views, and more export recipes.

When filing an issue, provide:

- Actor run ID.
- Public source URL or redacted dataset shape.
- Whether the run used direct, dataset, or inline mode.
- Expected and observed record types.
- Whether keyword filters were enabled.
- Any error message without credentials or private data.

### Other Skootle Actors you may find useful

Browse the current Skootle portfolio at https://apify.com/skootle for official-data intelligence, website audits, market research, safety monitoring, and agent-ready exports. Choose the Actor whose source contract matches the evidence you need.

### Source and non-affiliation notice

This Actor is independently operated by Skootle. It is not affiliated with, endorsed by, or sponsored by Hacker News, Y Combinator, Firebase, Google, or Apify. Source names identify the public service queried. Hacker News and the official API remain authoritative for source behavior and public content.

### Final buyer checklist

Before using output in a production workflow:

1. Confirm the run succeeded and the `SUMMARY` source matches your input.
2. Check comment limits and keyword filters.
3. Preserve comment IDs, source URLs, and retrieval time.
4. Open the original public comment before outreach or escalation.
5. Treat classifications as signals, not facts or legal conclusions.
6. Keep automated replies disabled unless separately reviewed and authorized.
7. Apply retention, access-control, and deletion policies.
8. Recheck source health before interpreting a zero-count filtered result.
9. Start with a small bounded run before scaling.
10. Use the live Apify pricing panel as the current cost source.

// skootle:review-prompt

# Actor input Schema

## `postUrls` (type: `array`):

Public Hacker News item URLs. The Actor acquires comments through the official Hacker News Firebase API.

## `datasetIds` (type: `array`):

Optional Apify datasets containing comment-like records from other platforms.

## `comments` (type: `array`):

Optional normalized or common scraper comment records.

## `maxCommentsPerTarget` (type: `integer`):

Maximum comment records analyzed for each discussion or dataset.

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

Reserved hard cap for paginated dataset sources.

## `timeoutSecs` (type: `integer`):

Maximum run time before the Actor fails closed.

## `language` (type: `string`):

Language context used by deterministic comment classification.

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

Optional keyword filters applied before classification.

## `enabledTaxonomies` (type: `array`):

Deterministic buyer-intent and risk categories enabled for output.

## `maxTotalChargeUsd` (type: `number`):

Buyer-controlled hard maximum charge for one Actor run.

## Actor input object example

```json
{
  "postUrls": [
    "https://news.ycombinator.com/item?id=8863"
  ],
  "datasetIds": [],
  "comments": [],
  "maxCommentsPerTarget": 100,
  "maxPages": 5,
  "timeoutSecs": 120,
  "language": "en",
  "keywords": [],
  "enabledTaxonomies": [
    "purchase_intent",
    "product_question",
    "objection",
    "complaint",
    "feature_request",
    "support_issue",
    "spam",
    "praise",
    "risk"
  ],
  "maxTotalChargeUsd": 0.3
}
```

# Actor output Schema

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

No description

## `briefing` (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("skootle/social-comment-buyer-intent-intelligence").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("skootle/social-comment-buyer-intent-intelligence").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 '{}' |
apify call skootle/social-comment-buyer-intent-intelligence --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=skootle/social-comment-buyer-intent-intelligence",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "HN Buyer Intent Signals",
        "description": "Find purchase intent, product questions, objections, complaints, feature requests, support needs, praise, spam, and brand risk in public Hacker News discussions through the official API.",
        "version": "1.0",
        "x-build-id": "96uVivQ2o9VRxbnYr"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/skootle~social-comment-buyer-intent-intelligence/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-skootle-social-comment-buyer-intent-intelligence",
                "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/skootle~social-comment-buyer-intent-intelligence/runs": {
            "post": {
                "operationId": "runs-sync-skootle-social-comment-buyer-intent-intelligence",
                "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/skootle~social-comment-buyer-intent-intelligence/run-sync": {
            "post": {
                "operationId": "run-sync-skootle-social-comment-buyer-intent-intelligence",
                "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",
                "properties": {
                    "postUrls": {
                        "title": "Hacker News discussion URLs",
                        "type": "array",
                        "description": "Public Hacker News item URLs. The Actor acquires comments through the official Hacker News Firebase API.",
                        "default": [
                            "https://news.ycombinator.com/item?id=8863"
                        ],
                        "items": {
                            "type": "string"
                        }
                    },
                    "datasetIds": {
                        "title": "Comment dataset IDs",
                        "type": "array",
                        "description": "Optional Apify datasets containing comment-like records from other platforms.",
                        "default": [],
                        "items": {
                            "type": "string"
                        }
                    },
                    "comments": {
                        "title": "Inline comments",
                        "type": "array",
                        "description": "Optional normalized or common scraper comment records.",
                        "default": []
                    },
                    "maxCommentsPerTarget": {
                        "title": "Maximum comments per target",
                        "minimum": 1,
                        "maximum": 1000,
                        "type": "integer",
                        "description": "Maximum comment records analyzed for each discussion or dataset.",
                        "default": 100
                    },
                    "maxPages": {
                        "title": "Maximum pages",
                        "minimum": 1,
                        "maximum": 20,
                        "type": "integer",
                        "description": "Reserved hard cap for paginated dataset sources.",
                        "default": 5
                    },
                    "timeoutSecs": {
                        "title": "Timeout seconds",
                        "minimum": 10,
                        "maximum": 600,
                        "type": "integer",
                        "description": "Maximum run time before the Actor fails closed.",
                        "default": 120
                    },
                    "language": {
                        "title": "Language",
                        "type": "string",
                        "description": "Language context used by deterministic comment classification.",
                        "default": "en"
                    },
                    "keywords": {
                        "title": "Keyword filters",
                        "type": "array",
                        "description": "Optional keyword filters applied before classification.",
                        "default": [],
                        "items": {
                            "type": "string"
                        }
                    },
                    "enabledTaxonomies": {
                        "title": "Enabled classifications",
                        "type": "array",
                        "description": "Deterministic buyer-intent and risk categories enabled for output.",
                        "items": {
                            "type": "string",
                            "enum": [
                                "purchase_intent",
                                "product_question",
                                "objection",
                                "complaint",
                                "feature_request",
                                "support_issue",
                                "spam",
                                "praise",
                                "risk"
                            ]
                        },
                        "default": [
                            "purchase_intent",
                            "product_question",
                            "objection",
                            "complaint",
                            "feature_request",
                            "support_issue",
                            "spam",
                            "praise",
                            "risk"
                        ]
                    },
                    "maxTotalChargeUsd": {
                        "title": "Maximum total charge (USD)",
                        "minimum": 0.01,
                        "maximum": 100,
                        "type": "number",
                        "description": "Buyer-controlled hard maximum charge for one Actor run.",
                        "default": 0.3
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
