# LinkedIn Comment Replies & Reactions Scraper (`khadinakbar/linkedin-comment-replies-reactions-scraper`) Actor

Extract LinkedIn comments, nested replies when public data includes them, and post reaction counts from post or comment URLs. Provider-backed, cookieless, MCP-ready.

- **URL**: https://apify.com/khadinakbar/linkedin-comment-replies-reactions-scraper.md
- **Developed by:** [Khadin Akbar](https://apify.com/khadinakbar) (community)
- **Categories:** Social media, Lead generation, MCP servers
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $6.00 / 1,000 linkedin comment or reply scrapeds

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/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

## LinkedIn Comment Replies & Reactions Scraper

Paste a public LinkedIn **post URL** or a **comment URL** (the timestamp link that contains `commentUrn`) and get one dataset row per public comment or nested reply: author name, profile URL, text, thread level, and the post's like/comment counts. Optional profile enrichment adds current company, location, and followers. No LinkedIn cookies or login.

Built for social-listening teams, community managers, and B2B researchers who need the visible discussion on a post — plus reaction **counts** — as structured JSON for agents, CRMs, and spreadsheets.

### Best fit for this Actor

- This Actor is designed for public LinkedIn post URLs and comment permalinks that include `commentUrn`. It works well for social listening, community review, and commenter lead lists that need author, text, thread fields, and post like/comment counts.
- Start with a public post URL when you want the visible comment sample. Continue with a comment timestamp URL when you already have a specific `commentUrn`. Then pass `authorProfileUrl` to [LinkedIn Profile Email Scraper](https://apify.com/khadinakbar/linkedin-profile-email-scraper) when the next step is email research.

### Workflow: from a post URL to comment rows

A community manager tracking a product announcement pastes `https://www.linkedin.com/feed/update/urn:li:activity:7468770468041502720/`. The run returns the public visible comments (typically around 10 top-level rows), each with `authorName`, `authorProfileUrl`, `text`, `postLikeCount`, and `postCommentCount`. Nested replies are saved when the public provider payload includes a `replies` array. Reaction fields on each row are counts; commenter identity lives on the author fields.

### Quick start input

```json
{
  "postUrls": [
    "https://www.linkedin.com/feed/update/urn:li:activity:7468770468041502720/"
  ],
  "maxComments": 10,
  "includeReplies": true,
  "enrichProfiles": false
}
```

`maxComments` caps rows per URL (default 50). It does not invent comments that public no-login data does not expose.

### Input reference

| Field | Type | What it controls |
|---|---|---|
| `postUrls` | string\[] (required) | Post URLs, comment URLs with `commentUrn`, numeric activity IDs, or `urn:li:activity:` values. Up to 100 per run. Profile and company-home URLs belong on a profile or company Actor. |
| `startUrls` | request list | Same URLs in Apify request-object form for agent/MCP callers. |
| `maxComments` | integer | Cap of comment + reply rows per URL. Default 50, range 1–1000. |
| `includeReplies` | boolean | Save nested replies when the payload includes them. Default true. |
| `maxRepliesPerComment` | integer | Cap nested replies per parent comment. Default 25. |
| `enrichProfiles` | boolean | Add public company, location, followers, about. Extra $0.012 per enriched row. Default false. |
| `providerOrder` | enum | ScrapeCreators first (default) or SociaVault first. Fallback fires automatically. |
| `includeRawData` | boolean | Attach raw provider objects. Default false. |

#### Comment URL form

On LinkedIn, click the timestamp of a specific comment. The address bar then contains `commentUrn=urn:li:comment:(activity:…,…)`. Paste that URL. The Actor fetches the parent post and keeps `requestedCommentUrn` on every saved row.

### What data you receive

One dataset item is one public comment or nested reply.

```json
{
  "recordType": "comment",
  "postUrl": "https://www.linkedin.com/posts/microsoft_activity-7468770468041502720-mGV1",
  "postId": "7468770468041502720",
  "postAuthorName": "Microsoft",
  "postLikeCount": 379,
  "postReactionCount": 379,
  "postCommentCount": 25,
  "threadLevel": 0,
  "text": "Looking at AI adoption county by county is where the real story is.",
  "authorName": "Example Author",
  "authorProfileUrl": "https://www.linkedin.com/in/example-author",
  "commentLikeCount": 4,
  "provider": "scrapecreators",
  "scrapedAt": "2026-08-21T07:00:00.000Z"
}
```

`scrapedAt` is ISO-8601. `OUTPUT.outcome` is one of `COMPLETE`, `PARTIAL`, `VALID_EMPTY`, `INVALID_INPUT`, `UPSTREAM_FAILED`, or `CONFIG_ERROR`.

### Data table

| Field | Meaning |
|---|---|
| `recordType` | `comment` or `reply` |
| `authorName` / `authorProfileUrl` | Public commenter identity |
| `text` | Comment or reply body |
| `threadLevel` / `parentCommentId` | Thread position |
| `postLikeCount` / `postCommentCount` | Post-level reaction and comment counts |
| `commentReactionCount` / `reactions` | Per-comment counts when the payload includes them |
| `requestedCommentUrn` | Present when the input was a comment URL |

### Public data scope

Managed public-data providers return a **visible comment sample** (author, text, profile URL) plus post `likeCount` / `commentCount`. Nested replies and per-comment reaction type maps are saved when the provider payload includes them. The Actor is cookieless: public counts ship on every row, and reactor identity lists stay outside the public payload.

### Pricing

This Actor uses **Pay per event** plus **platform usage**. The live **Pricing tab** on the Actor page is the current source of truth for event names and prices.

| Event | Price |
|---|---|
| `apify-actor-start` | $0.00005 per run |
| `comment-scraped` | $0.006 per saved comment or reply |
| `comment-enriched` | $0.012 extra per successfully enriched row |

A 10-comment run without enrichment is about $0.06005 in events plus Apify platform usage. `VALID_EMPTY` and `INVALID_INPUT` runs keep `comment-scraped` at zero.

### Use through the API

```bash
curl "https://api.apify.com/v2/acts/khadinakbar~linkedin-comment-replies-reactions-scraper/runs?token=$APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "postUrls": ["https://www.linkedin.com/feed/update/urn:li:activity:7468770468041502720/"],
    "maxComments": 10
  }'
```

Read the dataset from the run's `defaultDatasetId`, then read `OUTPUT` from the default key-value store for `outcome` and `itemsPushed`.

### Use with AI agents through Apify MCP

> Extract public comments and post reaction counts from this LinkedIn post URL. Return author name, profile URL, comment text, threadLevel, postLikeCount, and postCommentCount. Cap at 10 rows. After the run, read OUTPUT.outcome and the default dataset for provenance, cost, and scope.

Connect the client at <https://mcp.apify.com>. Inspect `OUTPUT` before treating `SUCCEEDED` as complete data.

### Connect the workflow

- Then pass `authorProfileUrl` into [LinkedIn Profile Email Scraper](https://apify.com/khadinakbar/linkedin-profile-email-scraper) when the next job is email research.
- Start with [LinkedIn Profile Search Scraper](https://apify.com/khadinakbar/linkedin-profile-search-scraper) when you still need to discover public profiles by keyword before you have a post URL.
- Continue with [LinkedIn Comments Scraper](https://apify.com/khadinakbar/linkedin-comments-scraper) when the store listing you want is the post-comments workflow rather than this comment-URL plus reaction-count surface.

### Best results

- Use a public post URL or a comment timestamp URL with `commentUrn`.
- Keep `maxComments` at 10–50 for canaries and agent calls; raise it only when you need the full visible sample.
- Turn on `enrichProfiles` only for outreach qualification — it adds a second provider call and $0.012 per enriched row.
- Provide a public post URL. When LinkedIn returns no visible comments, `OUTPUT.outcome` is `VALID_EMPTY` and `comment-scraped` stays at zero.

### FAQ and legal

**Who appears in the reaction fields?** Public providers expose reaction **counts**. Author identity is on comment and reply rows.

**Why is the comment sample smaller than the post counter?** The public post payload returns the visible sample LinkedIn exposes without a session.

**Are cookies required?** This Actor is cookieless. Provide a public post or comment URL only.

This Actor collects **publicly available** LinkedIn information for legitimate research, analytics, and lead-generation workflows. Responsible use includes complying with LinkedIn's terms of service, applicable laws, and your own outreach rules. Keep the output inside authorized research and CRM workflows.

Report issues on the Actor's Issues tab. Custom extraction work is available on request.

### Builder's note

I built this Actor after live provider probes showed that "comments, replies, and reactions" in the Store often names a reactor roster that public no-login APIs omit. I learned to keep the query language buyers search for, then ship the public subset that actually arrives: comment text, nested replies when present, and counts. In my testing that contract is what MCP agents can trust.

# Actor input Schema

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

LinkedIn post URLs, comment URLs with commentUrn, numeric activity IDs, or urn:li:activity values. Example: https://www.linkedin.com/feed/update/urn:li:activity:7468770468041502720/. Comment URLs must include commentUrn=... from the comment timestamp link. Up to 100 URLs per run. Not profile, company, or feed-home URLs.

## `startUrls` (type: `array`):

Alternative Apify request-list input for the same LinkedIn post or comment URLs. Use this when another Actor or agent passes request objects. Not for profile, company, or search URLs.

## `maxComments` (type: `integer`):

Maximum comment and reply rows to save per input URL. Default 50. This caps output volume and cost; it does not invent comments or replies that public no-login data does not expose. Typical public payloads return a visible sample of about 10 top-level comments.

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

When enabled, nested replies are saved when the public provider payload includes them under a comment. Public no-login LinkedIn payloads often omit nested replies; this toggle does not create missing replies. Default true.

## `maxRepliesPerComment` (type: `integer`):

Caps nested replies saved under each top-level comment when includeReplies is true. Default 25. Set 0 to skip replies even if the payload contains them.

## `enrichProfiles` (type: `boolean`):

When enabled, each comment author's public LinkedIn profile is fetched to add current company, company URL, location, follower count, and an about preview. Enrichment costs an additional $0.012 per successfully enriched row on top of $0.006 per comment. Leave disabled when you only need author name, profile URL, comment text, and reaction counts.

## `providerOrder` (type: `string`):

Which managed public-data provider to try first for each URL. A provider only wins if it returns usable comments, or a truthful zero-comment post. Keep the default unless you are debugging a single provider. Not a LinkedIn cookie or login setting.

## `includeRawData` (type: `boolean`):

Attach the raw provider comment object to each dataset row for debugging extra fields. Defaults to false because raw payloads increase dataset size and agent token usage.

## Actor input object example

```json
{
  "postUrls": [
    "https://www.linkedin.com/feed/update/urn:li:activity:7468770468041502720/"
  ],
  "startUrls": [
    {
      "url": "https://www.linkedin.com/feed/update/urn:li:activity:7468770468041502720/"
    }
  ],
  "maxComments": 10,
  "includeReplies": true,
  "maxRepliesPerComment": 25,
  "enrichProfiles": false,
  "providerOrder": "scrapecreators-first",
  "includeRawData": false
}
```

# Actor output Schema

## `output` (type: `string`):

Terminal outcome envelope with outcome, itemsPushed, chargedEventCounts, and warnings.

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

Dataset API URL for saved comment and reply rows, including post reaction counts.

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

Per-URL status, provider diagnostics, reaction counts, and billing counters.

# 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:7468770468041502720/"
    ],
    "startUrls": [
        {
            "url": "https://www.linkedin.com/feed/update/urn:li:activity:7468770468041502720/"
        }
    ],
    "maxComments": 10,
    "includeReplies": true,
    "maxRepliesPerComment": 25,
    "enrichProfiles": false
};

// Run the Actor and wait for it to finish
const run = await client.actor("khadinakbar/linkedin-comment-replies-reactions-scraper").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:7468770468041502720/"],
    "startUrls": [{ "url": "https://www.linkedin.com/feed/update/urn:li:activity:7468770468041502720/" }],
    "maxComments": 10,
    "includeReplies": True,
    "maxRepliesPerComment": 25,
    "enrichProfiles": False,
}

# Run the Actor and wait for it to finish
run = client.actor("khadinakbar/linkedin-comment-replies-reactions-scraper").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:7468770468041502720/"
  ],
  "startUrls": [
    {
      "url": "https://www.linkedin.com/feed/update/urn:li:activity:7468770468041502720/"
    }
  ],
  "maxComments": 10,
  "includeReplies": true,
  "maxRepliesPerComment": 25,
  "enrichProfiles": false
}' |
apify call khadinakbar/linkedin-comment-replies-reactions-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,khadinakbar/linkedin-comment-replies-reactions-scraper"
        }
    }
}

```

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/LxG1nypyyMrwIrIGl/builds/NzerUTgedPk2KQxfa/openapi.json
