# LinkedIn Comment Opportunity Monitor — Questions & Requests (`agency-shift/linkedin-comment-opportunity-monitor`) Actor

Monitor selected LinkedIn posts for newly observed comments and questions. Export direct comment links, exact phrase evidence and persistent deduplication. Uses separately billed HarvestAPI collection, or process an existing comments dataset.

- **URL**: https://apify.com/agency-shift/linkedin-comment-opportunity-monitor.md
- **Developed by:** [Mako](https://apify.com/agency-shift) (community)
- **Categories:** Social media, Automation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.98 / 1,000 delivered qualifying comments

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

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

## LinkedIn Comment Opportunity Monitor

Watch selected LinkedIn posts for newly observed comments, questions and request language. Export the original comment, a direct LinkedIn link, available author details and exact text evidence for your review. Useful for GTM research, community listening and finding conversations where you can contribute.

**Live collection uses the separately billed [HarvestAPI LinkedIn Post Comments](https://apify.com/harvestapi/linkedin-post-comments). This Actor adds persistent monitoring and literal filtering; it is not an independent LinkedIn extraction engine.** Existing-dataset mode processes compatible comments you already collected. No LinkedIn login, cookies, publishing or automated outreach are involved.

Live mode requires an Apify plan that permits running public Store Actors. Some Creator plans restrict this. Those accounts can use existing-dataset mode; this Actor never upgrades your plan or uses a different account.

### Quick start

```json
{
  "sourceMode": "comments",
  "postUrls": ["https://www.linkedin.com/feed/update/urn:li:activity:7511362109293731840/"],
  "postedLimit": "week",
  "requestsOnly": true,
  "mode": "new",
  "monitorName": "gtm-conversations",
  "maxScanComments": 25,
  "maxResults": 25,
  "maxSourceChargeUsd": 0.1,
  "sourceTimeoutSecs": 180
}
```

Supply up to five post URLs, including URLs discovered by our LinkedIn Keyword Post Monitor. Reuse the same monitor name and settings on later runs. Create an Apify schedule yourself if needed; no schedule is created automatically.

Use `includePhrases` and `excludePhrases` for case-insensitive literal filters. `requestsOnly` keeps simple English request phrases or question punctuation. It can include rhetorical and promotional questions: **a match is not verified buying intent, a qualified lead or a recommendation to contact someone.** Review the text and context yourself.

The source collects root comments. Nested replies supplied inside those records are not expanded or monitored. Full author enrichment and separate reply collection are disabled. Direct links retain the comment identifier so “Open on LinkedIn” points to the comment when the source provides it.

### Output

Each delivered record includes original text, comment identity, available comment and parent-post links, available author and date fields, literal qualification evidence, source provenance and a stable `eventId`. Unknown fields remain null. Reaction counts are observations, not measures of purchase intent.

The run's `SUMMARY` reports delivered/pending counts, collection status, coverage warnings and provisional source charges. `SOURCE_RUN` identifies the paid child run; its settled billing is authoritative. `ERROR` records a failure. Results are available through Apify's dataset API and JSON/CSV/Excel exports.

For dataset mode, select `sourceMode: "dataset"` and choose `sourceDatasetId`. Compatible root rows use `type: "comment"`, `id`, `commentary`, `linkedinUrl` with comment query parameters, `postId`, optional `actor` and `createdAt`. Dataset mode examines the first `maxScanComments` records and does not reapply the source time window.

### Pricing and limits

Our fee is **$1.98 per 1,000 delivered qualifying comments**, plus a $0.00005 startup event per allocated GB (minimum one). Apify compute and storage are separate.

Live collection also pays HarvestAPI on the running customer's account. On 1 October 2026 its base Free/Starter price was **$2 per 1,000 source comments**, with discounts on some plans. Check [current source pricing](https://apify.com/harvestapi/linkedin-post-comments/pricing). This is an additional cost, including comments later excluded or already seen.

For example, collecting 100 comments and delivering 20 matches costs approximately $0.20 in source fees + $0.0396 in monitoring fees, plus startup/platform usage. A run with zero output can still incur collection and platform costs.

- `maxScanComments` is a shared source cap; each post receives `floor(cap / number of posts)`. It is never sent as an unlimited zero value.
- `maxResults` caps our output. Qualifying overflow is saved and delivered on the next run before another collection starts.
- `maxSourceChargeUsd` controls the separate source's PPE ceiling. It is not the parent fee or a total account budget.
- Apify's maximum Actor charge controls our event charges. Collection has its own budget and timeout.
- No profile enrichment or expanded reply collection is purchased.

### Monitoring and reliability

`mode: "new"` suppresses previously delivered comment identities. First-run matches are delivered by default; `emitInitial: false` saves a baseline without comment-record output fees. Snapshot mode outputs all qualifying observations each scan.

Post URLs, source, time window and phrase filters define a history scope. Changing them starts a separate baseline; changing only `maxResults` does not. A fresh monitor name deliberately starts new history. New means newly observed, not necessarily newly published. Edits or reaction changes do not produce new-comment events.

A monitor lock prevents simultaneous writers. Pending output is saved before delivery. Delivery is at least once: a crash after writing output but before saving its checkpoint can repeat and charge the same `eventId`; deduplicate that ID downstream. History never silently expires. At the configured history count or 16 MB state limit, the Actor stops instead of forgetting identities.

Searches and comment ordering can be incomplete, delayed or restricted. Zero output does not prove no new comments exist. Missing comments do not generate deletion events. Failed or uncertain source runs never establish an empty baseline. A supplier can report success after reaching its charge cap, so even a successful scan covers only the returned observations. An ambiguous source launch is not automatically retried inside that parent run.

# Actor input Schema

## `sourceMode` (type: `string`):

Live comments use paid HarvestAPI collection. Dataset mode reads compatible root comments without starting another scraper.

## `sourceDatasetId` (type: `string`):

Required only in dataset mode. An Apify dataset containing compatible LinkedIn comment rows. Only read permission is requested.

## `postedLimit` (type: `string`):

Filter passed to the live comments provider. Existing dataset mode does not independently apply this window.

## `includePhrases` (type: `array`):

Optional case-insensitive literal substring rules applied after collection. Output includes exact matched text and offsets. Collection charges apply before filtering.

## `excludePhrases` (type: `array`):

Optional case-insensitive literal exclusions. Excluded comments are not charged our comment-record fee; source fees still apply.

## `requestsOnly` (type: `boolean`):

Uses simple English phrase rules and question punctuation, not AI or verified purchase intent. Rhetorical and promotional questions can still match; review the supplied evidence.

## `mode` (type: `string`):

New mode remembers delivered comment identities. Snapshot emits qualifying observations each scan. Missing comments never imply deletion.

## `monitorName` (type: `string`):

Reuse a name for recurring scans. Post URL, source and filter changes create a separate baseline. A new name deliberately creates new history.

## `emitInitial` (type: `boolean`):

Disable to save the initial qualifying baseline without comment-record fees. Live-source and platform costs still apply.

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

Caps this monitor output. Qualified overflow is saved for the next run before another source scan. Changing this cap does not reset history.

## `maxSourceChargeUsd` (type: `number`):

Separate child-run PPE ceiling, not a total account or parent-platform budget. A source run reaching its limit can stop with incomplete data. No automatic source retries or enrichment.

## `sourceTimeoutSecs` (type: `integer`):

Live source timeout is also constrained by the parent time remaining. A failed source does not establish an empty baseline.

## `maxHistoryItems` (type: `integer`):

History never silently expires or evicts records. At the count or 16 MB size limit, the monitor stops and asks for a new monitor or a higher supported count.

## `maxScanComments` (type: `integer`):

Shared root-comment cap across supplied posts. Each post gets floor(cap/post count). Nested replies are not monitored.

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

One to five public post URLs. Root comments only; comment/reply URLs are not supported. Each post receives an equal share of maxScanComments.

## Actor input object example

```json
{
  "sourceMode": "comments",
  "postedLimit": "any",
  "includePhrases": [],
  "excludePhrases": [],
  "requestsOnly": false,
  "mode": "new",
  "monitorName": "default",
  "emitInitial": true,
  "maxResults": 25,
  "maxSourceChargeUsd": 0.1,
  "sourceTimeoutSecs": 180,
  "maxHistoryItems": 20000,
  "maxScanComments": 50,
  "postUrls": [
    "https://www.linkedin.com/feed/update/urn:li:activity:7511362109293731840/"
  ]
}
```

# Actor output Schema

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

No description

## `error` (type: `string`):

No description

## `comments` (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 = {
    "postUrls": [
        "https://www.linkedin.com/feed/update/urn:li:activity:7511362109293731840/"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("agency-shift/linkedin-comment-opportunity-monitor").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.linkedin.com/feed/update/urn:li:activity:7511362109293731840/"] }

# Run the Actor and wait for it to finish
run = client.actor("agency-shift/linkedin-comment-opportunity-monitor").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.linkedin.com/feed/update/urn:li:activity:7511362109293731840/"
  ]
}' |
apify call agency-shift/linkedin-comment-opportunity-monitor --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,agency-shift/linkedin-comment-opportunity-monitor"
        }
    }
}
```

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/QnnpVDBrB2UjlaUJx/builds/8amxUgHY5uQh8SliN/openapi.json
