# Instagram Comment Lead Extractor (`intrabit/instagram-comment-lead-extractor`) Actor

Find potential buyers in public Instagram post and Reel comments. Turn thousands of raw comments into a short list of buying-intent signals.

- **URL**: https://apify.com/intrabit/instagram-comment-lead-extractor.md
- **Developed by:** [Intrabit](https://apify.com/intrabit) (community)
- **Categories:** Automation, Lead generation, Social media
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

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

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — 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

## Instagram Comment Lead Extractor

Turn Instagram comments into potential buyer signals.

### What does Instagram Comment Lead Extractor do?

Paste one or more public Instagram post or Reel URLs and get back only the comments that show buying or commercial intent. Instead of returning every raw comment, the Actor fetches the public comments, filters out the noise, and hands you a short list of people who asked about price, availability, shipping, ordering, purchase links, and more.

```
Instagram comments  ->  buying-intent filter  ->  qualified potential leads
(thousands of raw)      (rule-based classifier)    (short list, scored)
```

### Why use it?

Generic comment scrapers return tens of thousands of raw comments that still require manual review. Most of them are casual chatter with zero commercial value. This Actor applies a deterministic classifier so you get a short list of comments that look like buying signals, organized by intent level and category. Less noise, less manual work, faster follow-up.

### Input

Minimal input is a list of public post or Reel URLs:

```json
{
  "postUrls": [
    "https://www.instagram.com/p/XXXXXXXX/"
  ]
}
```

| Field | Type | Default | Description |
| --- | --- | --- | --- |
| `postUrls` | array | required | One or more public Instagram post or Reel URLs (`/p/`, `/reel/`, `/reels/`). |
| `maxCommentsPerPost` | integer | `1000` | Maximum comments analyzed per post. Range 10-10000. |
| `minimumIntent` | string | `MEDIUM` | Only output comments at or above this intent level (`LOW`, `MEDIUM`, `HIGH`, `VERY_HIGH`). |
| `languages` | array | `["en","pt","es"]` | Languages used for buying-intent detection: `en`, `pt`, `es`. |
| `includeReplies` | boolean | `false` | Also analyze reply comments. Increases upstream cost. |
| `customKeywords` | array | `[]` | Extra keywords that count as commercial intent. Augments the built-in patterns. |
| `excludeKeywords` | array | `[]` | Comments containing any of these words are suppressed (removes false positives). |
| `includeNonLeads` | boolean | `false` | Debug mode: write every analyzed comment (including non-leads) to the dataset. |
| `commentSource` | string | `"apify"` | Upstream Actor used to fetch comments: `apify` (official, reliable, free plan ok) or `scrapesmith` (cheapest, but requires a paid Apify plan). |

Only `postUrls` is required; every other field has a sensible default.

### Output

Each item is a potential lead with a classification:

```json
{
  "postUrl": "https://www.instagram.com/p/XXXXXXXX/",
  "commentId": "123456789",
  "username": "john_example",
  "userProfileUrl": "https://www.instagram.com/john_example/",
  "comment": "How much is this and do you ship to Canada?",
  "postedAt": "2026-08-08T12:00:00.000Z",
  "likesCount": 4,
  "language": "en",
  "intent": "VERY_HIGH",
  "intentScore": 92,
  "categories": ["PRICE", "SHIPPING"],
  "matchedSignals": ["how much", "ship to"],
  "isReply": false,
  "source": "instagram",
  "scrapedAt": "2026-08-08T12:00:00.000Z"
}
```

| Field | Type | Description |
| --- | --- | --- |
| `postUrl` | string | URL of the Instagram post or Reel the comment was found on. |
| `commentId` | string | null | Instagram comment identifier. `null` when unavailable. |
| `username` | string | null | Instagram handle of the comment author. |
| `userProfileUrl` | string | null | URL of the author's public profile. |
| `comment` | string | Original comment text. |
| `postedAt` | string | null | ISO timestamp of when the comment was posted. |
| `likesCount` | number | null | Number of likes on the comment. |
| `language` | string | null | Detected language of the matched signals (`en`, `pt` or `es`). |
| `intent` | string | Buying-intent level: `NONE`, `LOW`, `MEDIUM`, `HIGH`, `VERY_HIGH`. |
| `intentScore` | number | Heuristic commercial-intent score from 0 to 100. Not a calibrated probability. |
| `categories` | array | Detected intent categories, e.g. `PRICE`, `SHIPPING`. |
| `matchedSignals` | array | The specific phrases that triggered the classification. |
| `isReply` | boolean | Whether the comment is a reply to another comment. |
| `source` | string | Origin of the data. |
| `scrapedAt` | string | ISO timestamp of when the comment was analyzed. |

Fields such as `commentId`, `postedAt`, `likesCount` and `userProfileUrl` are `null` when the upstream source does not provide them. In debug mode (`includeNonLeads: true`), every analyzed comment is written to the dataset with its classification, including comments with no buying intent.

Results are stored in the Actor's Apify dataset and can be exported as JSON, CSV, or Excel.

### Intent categories

- `PRICE` - The comment asks about price, cost, value, or payment.
- `PURCHASE` - The comment expresses a clear intent or desire to buy.
- `AVAILABILITY` - The comment asks if an item is available or still in stock.
- `PRODUCT_LINK` - The comment asks for the product link or where to buy.
- `SHIPPING` - The comment asks about shipping, delivery, or whether the seller ships to a location.
- `ORDER` - The comment asks how to place an order or mentions ordering.
- `CONTACT` - The comment asks for contact details or to be messaged.
- `WHOLESALE` - The comment asks about wholesale, bulk, or reseller pricing.
- `PRODUCT_INFO` - The comment asks for details or specifications about the product.
- `OTHER_COMMERCIAL` - Commercial intent that does not fit the categories above.

A comment can match multiple categories. `minimumIntent` controls the floor: set it to `HIGH` for a very strict, short list, or `LOW` to capture softer signals such as "this looks nice, how much".

### Supported languages

- English (`en`)
- Portuguese (`pt`)
- Spanish (`es`)

Selecting fewer languages makes detection stricter and faster; including all three covers most international audiences.

### Use cases

- **E-commerce brands** - Find people asking about price, stock, and shipping on product posts and Reels so they can be reached out to.
- **Marketing agencies** - Build qualified prospect lists for clients from their organic Instagram content.
- **Creators and influencers** - Turn engaged followers into product inquiries for partnerships or merch.
- **Lead-generation teams** - Feed scored comments into CRM or outreach workflows instead of scraping raw comments.
- **Product research** - Read what buyers actually ask for, and spot recurring questions or missing info in your posts.

Example: a product Reel with 8,000 comments can yield around 241 commercial-intent comments, giving a small, prioritizable list instead of a dump of raw chatter.

### Pricing

Pay-per-analysis (pay-per-event). You are charged per comment analyzed: the launch price is $1.00 per 1,000 comments analyzed. The total you see on a run is proportional to the comments fetched and classified for the posts you provided.

The upstream comment-fetching cost is billed separately to the same Apify account by the upstream source (`apify` - apify/instagram-comment-scraper, or `scrapesmith`), and depends on how many comments are actually retrieved. Your final cost is the sum of both.

The $1.00 / 1,000 comments figure is the launch price and is not guaranteed forever: it may be adjusted after cost testing to keep the Actor profitable while staying fair. Always check the current price on the Store listing before running large batches.

### Limitations

- **Public data only** - The Actor never bypasses authentication and never accesses private content. It can only see what Instagram shows to logged-out users on public posts and Reels.
- **Heuristic classification** - This is a deterministic rule-based classifier, not AI. It is designed for low false-positive rates, but it can still miss intent or misclassify edge cases. Always review output before acting on it.
- **Instagram availability** - Instagram can change its public pages, access patterns, or rate limits at any time, which may affect comment retrieval.
- **Results depend on what Instagram shows** - The number of comments retrieved depends on what Instagram exposes publicly, which may differ from what a logged-in user sees.
- **Upstream plan limits** - The official `apify` source caps comment retrieval at about 15 comments per post on Apify free plans; paid plans get the full requested volume. The `scrapesmith` source returns results only on paid Apify plans. For meaningful volume, run this Actor on a paid Apify plan.

### Responsible use

The output of this Actor is research and enrichment data. It is not permission to contact anyone.

Do not use it for spam, unsolicited bulk messaging, harassment, or any other abuse. Respect Instagram's terms of service and applicable law, including privacy regulations such as the GDPR. Never use this Actor to bypass authentication or to access private or protected content. When you reach out to people, follow up appropriately and let them opt out.

### Technical notes

- Built with the Apify SDK and TypeScript.
- Uses an upstream adapter pattern: a `CommentSource` interface abstracts over the upstream comment-fetching Actors, so the data layer is swappable without touching the classifier.
- Deterministic multilingual rule-based classifier running on normalized text, with configurable intent floor and custom keyword augmentation.
- Results are written to a standard Apify dataset with an `overview` table view showing the highest-signal fields.

# Actor input Schema

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

Paste one or more public Instagram post or Reel URLs.

## `maxCommentsPerPost` (type: `integer`):

Maximum number of comments to analyze per post.

## `minimumIntent` (type: `string`):

Only output comments whose buying-intent level is equal to or higher than this value.

## `languages` (type: `array`):

Languages used for buying-intent detection. Values: en (English), pt (Portuguese), es (Spanish).

## `commentSource` (type: `string`):

Upstream Apify Actor used to fetch the public comments. 'apify' is the official, most reliable source (free plans are capped at ~15 comments per post; paid plans get the full requested volume). 'scrapesmith' is the cheapest ($0.50 per 1,000 comments) but requires a paid Apify plan to return results.

## `includeReplies` (type: `boolean`):

Also analyze reply comments. Increases upstream cost.

## `customKeywords` (type: `array`):

Extra keywords that should count as commercial intent. They augment, not replace, the built-in patterns.

## `excludeKeywords` (type: `array`):

Comments containing any of these words are suppressed (useful to remove false positives).

## `includeNonLeads` (type: `boolean`):

When true, every analyzed comment is written to the dataset with its classification, including comments with no buying intent. Mostly useful for debugging.

## Actor input object example

```json
{
  "postUrls": [
    "https://www.instagram.com/p/EXAMPLE/"
  ],
  "maxCommentsPerPost": 1000,
  "minimumIntent": "MEDIUM",
  "languages": [
    "en",
    "pt",
    "es"
  ],
  "commentSource": "apify",
  "includeReplies": false,
  "includeNonLeads": false
}
```

# Actor output Schema

## `potentialLeads` (type: `string`):

One item per comment classified with commercial buying intent. Each item includes intent, intentScore, categories, matchedSignals, username, comment, postUrl, postedAt, likesCount and language. The table view shows the highest-signal fields by default.

## `runSummary` (type: `string`):

JSON summary of the run: postsRequested, postsProcessed, postsFailed, commentsAnalyzed, leadsFound, highIntentLeads, veryHighIntentLeads, intentBreakdown, categoryBreakdown, durationMs and per-post failures.

# 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 = {
    "postUrls": [
        "https://www.instagram.com/p/EXAMPLE/"
    ],
    "languages": [
        "en",
        "pt",
        "es"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("intrabit/instagram-comment-lead-extractor").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 = {
    "postUrls": ["https://www.instagram.com/p/EXAMPLE/"],
    "languages": [
        "en",
        "pt",
        "es",
    ],
}

# Run the Actor and wait for it to finish
run = client.actor("intrabit/instagram-comment-lead-extractor").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 '{
  "postUrls": [
    "https://www.instagram.com/p/EXAMPLE/"
  ],
  "languages": [
    "en",
    "pt",
    "es"
  ]
}' |
apify call intrabit/instagram-comment-lead-extractor --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,intrabit/instagram-comment-lead-extractor"
        }
    }
}

```

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/yWRcWOz5jFUcdsYIZ/builds/hrofS8n9X7nTtkjlz/openapi.json
