# LinkedIn User Comments & Reactions Scraper (`khadinakbar/linkedin-user-comments-reactions-scraper`) Actor

Scrape comments and reactions a LinkedIn profile left on other people's posts: comment text, reaction type, timestamps, and original post context. Cookieless HarvestAPI-backed, no login. MCP-ready.

- **URL**: https://apify.com/khadinakbar/linkedin-user-comments-reactions-scraper.md
- **Developed by:** [Khadin Akbar](https://apify.com/khadinakbar) (community)
- **Categories:** Social media, Lead generation, Automation
- **Stats:** 2 total users, 2 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $8.00 / 1,000 linkedin activity items

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?

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 User Comments & Reactions Scraper

SDRs and ABM researchers paste a public LinkedIn `/in/` profile URL and receive **one dataset row per comment or reaction** that person made on someone else's post. Each row returns `commentText` or `reactionType`, the original `postAuthorName`, a `postTextPreview`, and `postUrl` so outreach can reference a real conversation. Charged Pay per event plus platform usage.

### Best fit for this Actor

- Best for a known public LinkedIn profile when the job is "what has this person been commenting on or reacting to?"
- Designed for personalized outbound: comment text plus the original post author and preview in one row.
- Pair it with [LinkedIn Post Engagers Scraper](https://apify.com/khadinakbar/linkedin-post-engagers-scraper) when the next step is people on a specific `postUrl`, or start with [LinkedIn Profile Comments Scraper](https://apify.com/khadinakbar/linkedin-profile-comments-scraper) when the job is commenters on that profile's own posts.

### Workflow: from profile URL to outreach copy

An SDR targeting Microsoft commercial leaders pastes `https://www.linkedin.com/in/satyanadella/`, chooses comments, and caps **Max comments per profile** at 3. The Actor then returns comment text, original post author, and post preview. Next they export CSV or pass `postUrl` into a post-engagers run, or pass `profileUrl` into email enrichment.

### Quick start input

```json
{
  "profiles": ["https://www.linkedin.com/in/satyanadella/"],
  "scrapeType": "comments",
  "commentsLimit": 3,
  "maxResults": 3
}
```

That input is the quality-test prefill: one public profile, comments only, three billed rows.

### Input reference

| Field | Type | What it controls |
|---|---|---|
| `profiles` | string list (required) | LinkedIn `/in/` URLs or public identifiers. Example: `satyanadella`. Duplicates removed. Max 100. Post and company URLs are skipped. |
| `scrapeType` | enum | `comments` (default), `reactions`, or `both`. |
| `commentsLimit` | integer | Max comments per profile (1–500, default 10, prefill 3). |
| `reactionsLimit` | integer | Max reactions per profile (1–500, default 10). |
| `maxResults` | integer | Run-wide billed-row cap (1–2000, default 50). |
| `postedLimit` | enum | `any` (default), `24h`, `week`, `month`, `3months`, `6months`, `12months`. |
| `maxConcurrency` | integer | Profiles in parallel (1–3, default 1). |

### What data you receive

One dataset item is one comment or one reaction the queried profile made on another person's post.

| Field | Description |
|---|---|
| `recordType` | `comment` or `reaction` |
| `profileUrl` / `profileName` | The person whose activity you requested |
| `commentText` | Comment body on comment rows |
| `reactionType` / `actionText` | Normalized type plus provider action on reaction rows |
| `postAuthorName` / `postUrl` / `postTextPreview` | Original post context for outreach |
| `createdAt` / `scrapedAt` | Activity time when provided, plus collection time |
| `provider` | `harvestapi` |

```json
{
  "recordType": "comment",
  "profileUrl": "https://www.linkedin.com/in/satyanadella",
  "profileName": "Satya Nadella",
  "commentText": "Thanks for having me.",
  "postAuthorName": "Example Author",
  "postTextPreview": "One of the privileges of teaching...",
  "postUrl": "https://www.linkedin.com/posts/example_activity-123",
  "createdAt": "recent ISO timestamp from the provider",
  "provider": "harvestapi",
  "scrapedAt": "collection time ISO timestamp"
}
```

Reaction rows use `recordType: "reaction"` with `reactionType` (for example `LIKE`) and `actionText` instead of `commentText`.

### Use through the API

```bash
curl "https://api.apify.com/v2/acts/khadinakbar~linkedin-user-comments-reactions-scraper/runs?token=$APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"profiles":["https://www.linkedin.com/in/satyanadella/"],"scrapeType":"comments","commentsLimit":3,"maxResults":3}'
```

Once the Actor completes, read the default dataset items and the `OUTPUT` / `RUN_SUMMARY` key-value records for `outcome`, `itemsPushed`, and `chargedEventCounts`.

### Use with AI agents through Apify MCP

> Scrape the last 3 comments https://www.linkedin.com/in/satyanadella/ left on other people's LinkedIn posts. Return comment text, original post author, post URL, and createdAt. Cap at 3 rows. Use profile URLs only.

Inspect `OUTPUT.outcome` before using rows. `VALID_EMPTY` means the profile is valid and the public activity list was empty in range. `INVALID_INPUT` means supply a LinkedIn `/in/` profile. Confirm cost via `chargedEventCounts`. Setup: <https://mcp.apify.com>.

### Connect the workflow

- Then pass `postUrl` to [LinkedIn Post Engagers Scraper](https://apify.com/khadinakbar/linkedin-post-engagers-scraper) when you want the people on that original post.
- Then pass `profileUrl` to [LinkedIn Profile Email Scraper](https://apify.com/khadinakbar/linkedin-profile-email-scraper) when you want an email for the queried person.
- Then pass `postAuthorUrl` to [LinkedIn Profile Details Scraper](https://apify.com/khadinakbar/linkedin-profile-details-scraper) when you want public details for the post author.

### Pricing

Pay per event plus **platform usage**. Confirm the live amounts on the Actor **Pricing tab** before a large run.

| Event | Intended price | When |
|---|---|---|
| `apify-actor-start` | $0.00005 | Once per run |
| `activity-item` | $0.008 | Each saved comment or reaction row |

A bounded prefill of 3 comments is about **$0.024** in events plus compute. Valid empty profiles are charged the start event only. Platform usage includes this Actor's compute and the HarvestAPI nested fetch.

### Best results

Provide a public LinkedIn `/in/` URL and start with `scrapeType: "comments"` plus a small `commentsLimit`. Use `postedLimit: "month"` when you only need recent activity. Confirm `OUTPUT.outcome` and a sample row before scheduling. Source coverage is public HarvestAPI profile comments and reactions; keep `maxResults` as the cost cap.

### Builder's note

I found that ScrapeCreators and SociaVault expose LinkedIn profiles and posts, while comments a person left on other people's posts arrive through HarvestAPI profile-comments and profile-reactions. I designed this Actor around that split so each dataset row is one activity item with original post context, rather than mixing it into a post-commenters scraper.

### Legal and responsible use

Use this Actor on public LinkedIn data you are authorized to collect. Follow LinkedIn's terms, applicable laws, and your outreach policy. Keep runs proportionate. LinkedIn and HarvestAPI can change public activity coverage; check `OUTPUT.outcome` and a sample row before relying on a run.

# Actor input Schema

## `profiles` (type: `array`):

LinkedIn profile URLs or public identifiers to scrape. Example: https://www.linkedin.com/in/satyanadella/ or satyanadella. Duplicates are removed; max 100 unique profiles per run. Not a post, company, or job URL — those belong on sibling post/company Actors.

## `scrapeType` (type: `string`):

Which activity to collect for each profile. comments (default) returns comments they wrote on other people's posts. reactions returns likes/celebrates/etc they gave. both runs comments then reactions in one pass. This is not comments left ON the profile's own posts.

## `commentsLimit` (type: `integer`):

Maximum comment rows to save per profile. Example: 3. Range 1-500, default 10, quality prefill 3. Ignored when What to scrape is reactions-only. Use Max activity rows total as the run-wide cost cap.

## `reactionsLimit` (type: `integer`):

Maximum reaction rows to save per profile. Example: 10. Range 1-500, default 10. Ignored when What to scrape is comments-only. Each saved reaction is billed as one activity item.

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

Hard ceiling on billed comment+reaction rows across the whole run. Example: 50. Range 1-2000, default 50. This is the primary cost cap; per-profile limits still apply underneath it.

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

Keep activity created inside this window. any (default) keeps whatever the provider returns. 24h, week, and month are passed to HarvestAPI; 3months, 6months, and 12months are filtered client-side from timestamps. This is not a LinkedIn search date on the target's own posts.

## `maxConcurrency` (type: `integer`):

How many profiles to fetch in parallel. Example: 1. Range 1-3, default 1. Keep at 1 for predictable HarvestAPI cost; raise only for large bulk runs.

## Actor input object example

```json
{
  "profiles": [
    "https://www.linkedin.com/in/satyanadella/",
    "williamhgates"
  ],
  "scrapeType": "comments",
  "commentsLimit": 3,
  "reactionsLimit": 10,
  "maxResults": 20,
  "postedLimit": "any",
  "maxConcurrency": 1
}
```

# Actor output Schema

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

Dataset items containing comments the profile wrote and/or reactions they gave, plus original post context.

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

Run summary including outcome, itemsPushed, per-profile routes, warnings, and billing counters.

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

Machine-readable RUN\_SUMMARY record mirroring OUTPUT for integrations that read RUN\_SUMMARY directly.

# 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 = {
    "profiles": [
        "https://www.linkedin.com/in/satyanadella/"
    ],
    "scrapeType": "comments",
    "commentsLimit": 3
};

// Run the Actor and wait for it to finish
const run = await client.actor("khadinakbar/linkedin-user-comments-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 = {
    "profiles": ["https://www.linkedin.com/in/satyanadella/"],
    "scrapeType": "comments",
    "commentsLimit": 3,
}

# Run the Actor and wait for it to finish
run = client.actor("khadinakbar/linkedin-user-comments-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 '{
  "profiles": [
    "https://www.linkedin.com/in/satyanadella/"
  ],
  "scrapeType": "comments",
  "commentsLimit": 3
}' |
apify call khadinakbar/linkedin-user-comments-reactions-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,khadinakbar/linkedin-user-comments-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/bWhByZD7zLB7c8AuM/builds/ljimtFVhcYgpqeHZk/openapi.json
