# Instagram Comments Analyzer: Buyer Intent & Comment Leads (`nerolabs/instagram-comments-analyzer`) Actor

Finds buyers in Instagram, TikTok and YouTube comment rows (scraper dataset, CSV or Sheet): price asks, where to buy, sizes, stock, complaints, product requests, 6 languages, unanswered first. Per comment. MCP, x402.

- **URL**: https://apify.com/nerolabs/instagram-comments-analyzer.md
- **Developed by:** [Adam Pearce](https://apify.com/nerolabs) (community)
- **Categories:** Social media, Lead generation, E-commerce
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.50 / 1,000 comment analyzeds

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

## Instagram Comments Analyzer: Buyer Intent & Comment Leads

**Which commenters want to buy, and which ones did you never answer?** Give this actor the comment rows your Instagram, TikTok or YouTube comment scraper already returned (a dataset, CSV or Google Sheet) and it tags **every comment as a price ask, where to buy or link ask, wants it, size or fit, stock or shipping, product request, complaint, question, collab ask, spam or praise**, in 6 languages, then ranks the buyers to reply to, **unanswered first**, with a reply tip for each.

"How much?", "link please", "does it come in XL?", "cuánto cuesta?" and "quanto custa?" are sales sitting in the comments. On a busy post they get buried under emojis and nobody replies. This finds them in seconds.

No scraping, no login, no AI fees: it is plain keyword rules on rows you already have, so the same comment always gets the same tags, and it costs a fraction of a cent per comment.

### Who uses it

- **Shops and DTC brands**: run it on your last 20 posts, reply to every unanswered price and link ask today, and see which products people keep asking you to restock or make in another colour.
- **Social media managers and agencies**: a daily list of comments the client must answer, plus a report of buyer share, top complaints and questions per post.
- **Creators and affiliate marketers**: find which videos make people ask "where did you get that?", and what they ask for.
- **Product teams**: product requests ("bring back the navy one", "make it in black") and complaints, grouped and counted.
- **AI agents and n8n or Make flows**: run the comment scraper, then ask "who should we reply to?" in one call.

### Works with the rows you already have

- **apify/instagram-comment-scraper** (the most used Instagram comment scraper) and other Instagram comment scrapers: pass the dataset as it is. Nested replies are read too.
- **clockworks/tiktok-comments-scraper** and look-alikes.
- **streamers/youtube-comments-scraper** and look-alikes (channel owner replies and hearts are read).
- **Your own sheet**: one row per comment with a `text` (or `comment`) column, and optional username, likes and post URL columns. Column names are read loosely.

Tip: add your own handle in **Account owner usernames** and scrape replies too. Your own comments are then skipped (and free), and every buyer comment is marked answered or not.

### How it works (plain words)

1. Every comment and reply is read, whatever the scraper's column names are.
2. Each comment is matched against keyword rules in **English, Spanish, Portuguese, French, German and Italian**: price ask, where to buy, wants it, size or fit, stock or shipping, product request, complaint, question, collab ask, spam, praise. Short-comment guards stop "the price of fame" or "link to your discord" counting as buyers.
3. **Intent score**: a price ask, where to buy or wants it scores 3; size, stock or shipping 2; a product request 1; likes add up to 2 more. Spam and collab asks are capped at 1.
4. **Answered**: the account owner replied under it, or liked, pinned or hearted it, as far as the rows show.
5. Buyer comments (intent 2 or more by default) are ranked: unanswered first, then by intent score and likes.

### What you get

**Buyer leads (default)**, one row per buyer comment:

| Field | What it means |
|---|---|
| `rank` | 1 = reply to this first |
| `username`, `platform`, `text` | Who said what, where (usernames can be hidden) |
| `tags` | e.g. `price`, `where_to_buy`, `size_fit`, `question` |
| `intentScore` | How strong the buying signal is |
| `answered` | true, false, or null when the rows do not show owner replies |
| `replyTip` | e.g. "Reply with the price and the product link." |
| `likes`, `language`, `time`, `postUrl`, `commentUrl` | Context and links |

**Every comment, tagged** (`What to return` = Every comment): your rows with all their columns kept, plus `intent_tags`, `intent_score`, `intent_answered` and `intent_reply_tip`.

**The OUTPUT record** (both modes): comments read, buyer share, unanswered buyers, counts of every tag, languages, the 20 most liked complaints, grouped product requests, and per post stats (buyer comments, unanswered buyers, top questions).

### Input

| Field | What it does |
|---|---|
| Datasets | One or more comment scraper datasets (in an integration, `{{resource.defaultDatasetId}}`) |
| File or Google Sheet URL | CSV, Excel, JSON or JSON Lines |
| Comment rows | Rows as JSON, for a quick run or an AI agent call |
| What to return | Buyer leads (ranked) or every comment, tagged |
| Account owner usernames | Your handle(s): skipped, free, and used to mark comments answered |
| Minimum intent score for a lead | 2 by default; 3 keeps only strong buyers |
| Must have all these tags | e.g. only `price` |
| Only unanswered | Keep only comments you have not answered |
| Hide usernames | For reports you share |
| Extra keywords per tag | Your own words, e.g. `{"where_to_buy": ["dm price"]}` |
| Also save as a file | CSV or Excel copy |
| Also append to a named dataset | Build a reply list across runs |

Run it with no input and it analyzes a public example file (made-up shop and commenters), so you can see the output first.

### Pricing

Pay per event, no subscription:

- **$0.0005 per comment analyzed** (1,000 comments = $0.50). The account owner's own comments are free. You pay for every comment read, not only the leads returned, because every comment is checked.
- **$0.01 per CSV or Excel file**, only if you ask for one.

### Agent-ready

Pay per event, limited permissions and plain JSON in and out, so AI agents can call it through the Apify MCP server or pay per call with x402 at the Nero Labs Agent Tools shop (`POST /comment-intent`).

### FAQ

**Does it scrape Instagram?** No. It only reads rows you already have, so it never logs in or touches Instagram, TikTok or YouTube.

**Is it AI?** No. It uses fixed keyword rules, so results are fast, cheap and repeatable. Add your own words with Extra keywords per tag.

**Why is `answered` null?** The rows do not show owner replies. Add your handle in Account owner usernames and scrape replies too.

**Which languages?** English, Spanish, Portuguese, French, German and Italian. Comments in other languages are still read for emojis and links, but tag less often.

If it found you buyers to reply to, a review on the Apify Store helps a lot.

# Actor input Schema

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

One or more comment datasets: apify/instagram-comment-scraper (the biggest), clockworks/tiktok-comments-scraper, streamers/youtube-comments-scraper and look-alikes. Nested replies are read too. In a scraper's Integrations tab, set this to {{resource.defaultDatasetId}}.

## `fileUrl` (type: `string`):

A public link to a CSV, Excel, JSON or JSON Lines file of comment rows, or your own sheet with a text (or comment) column and optional username, likes and post URL columns. Google Sheets share links work (set 'Anyone with the link can view').

## `fileFormat` (type: `string`):

Leave on 'Detect automatically' unless the link has no file extension.

## `sheetName` (type: `string`):

Which sheet to read from an Excel workbook. Defaults to the first sheet.

## `data` (type: `array`):

Rows as JSON objects, for a quick run or an AI agent call, e.g. \[{"text": "how much is this?", "ownerUsername": "jane", "likesCount": 4, "postUrl": "https://www.instagram.com/p/abc/"}]. Scraper rows can be passed as they are.

## `outputMode` (type: `string`):

Buyer leads (default): only comments with buying intent, ranked unanswered first, then by intent score and likes. Every comment: all comments with your columns kept plus intent_tags, intent_score, intent_answered and intent_reply_tip. Either way the summary, top complaints, product requests and per post stats go to the OUTPUT record.

## `ownerUsernames` (type: `array`):

The brand's own handle(s), e.g. yourshop. Their comments are skipped and free, and a comment they replied under counts as answered. Without it, answered is only known from author-liked, pinned or hearted flags in the rows.

## `minIntent` (type: `integer`):

A price ask, where to buy or wants it scores 3; size, stock or shipping 2; a product request 1; likes add up to 2. 2 is the default; 3 keeps only strong buyers.

## `requiredTags` (type: `array`):

Keep only rows that carry every tag picked. Filtering does not change the charge (every comment read is analyzed).

## `onlyUnanswered` (type: `boolean`):

Keep only comments the account owner has not answered. Needs 'Account owner usernames' and scraped replies (or author-liked flags).

## `hideUsernames` (type: `boolean`):

Leave commenter usernames and profile pictures out of the results, for reports you share.

## `extraKeywords` (type: `object`):

Your own words added to the rules, e.g. {"where_to_buy": \["dm price"], "product_request": \["vegan version"]}. Keys are the tag names: price, where_to_buy, wants_it, size_fit, stock_shipping, product_request, complaint, question, collab_ask, spam, praise.

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

Safety cap on top-level rows read from the input (each with its nested replies).

## `exportFormats` (type: `array`):

Also save the results as CSV and/or Excel in the run's key-value store (charged once per file).

## `outputDatasetName` (type: `string`):

Also append the rows to a named dataset, for example to build a lead list across runs.

## Actor input object example

```json
{
  "fileUrl": "https://nerolabs-samples.nerolabs.workers.dev/sample-instagram-comments.json",
  "fileFormat": "auto",
  "outputMode": "leads",
  "ownerUsernames": [
    "sample_shop"
  ],
  "minIntent": 2,
  "onlyUnanswered": false,
  "hideUsernames": false,
  "maxItems": 200000
}
```

# Actor output Schema

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

One row per buyer comment (or every comment, tagged, in 'all' mode): tags, intent score, answered, reply tip, likes, links.

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

Comments read, buyer share, unanswered buyers, tag counts, languages, top complaints, product requests, per post stats, export links and warnings.

# 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 = {
    "fileUrl": "https://nerolabs-samples.nerolabs.workers.dev/sample-instagram-comments.json",
    "ownerUsernames": [
        "sample_shop"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("nerolabs/instagram-comments-analyzer").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 = {
    "fileUrl": "https://nerolabs-samples.nerolabs.workers.dev/sample-instagram-comments.json",
    "ownerUsernames": ["sample_shop"],
}

# Run the Actor and wait for it to finish
run = client.actor("nerolabs/instagram-comments-analyzer").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 '{
  "fileUrl": "https://nerolabs-samples.nerolabs.workers.dev/sample-instagram-comments.json",
  "ownerUsernames": [
    "sample_shop"
  ]
}' |
apify call nerolabs/instagram-comments-analyzer --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,nerolabs/instagram-comments-analyzer"
        }
    }
}
```

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/WLja1R30bh5p3okR4/builds/Lh3P4oQGQghOlBGNQ/openapi.json
