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

Scrape comments a LinkedIn user posted on other people's public content. Paste profile URLs or handles; get comment text, target post URL, relative time, and source profile. Cookieless, no login. For post-URL comments, use linkedin-comments-scraper. $0.006/comment.

- **URL**: https://apify.com/khadinakbar/linkedin-user-comments-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 user comment 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/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 Scraper

Turn a LinkedIn profile URL or vanity handle into the **comments that person posted on other people's public content**. Each dataset row is one comment: the commenter's name and profile, the comment text, the target post URL, and the relative time LinkedIn shows (for example `1mo`). Built for SDRs, ABM researchers, and recruiters who want talking points from a prospect's public commentary before outreach. Cookieless public-profile data.

This Actor reads the comments LinkedIn already shows on the **public profile page**.

### Best fit for this Actor

- Start with a public profile URL such as `https://www.linkedin.com/in/satyanadella` or a vanity handle such as `satyanadella`.
- Use it when you need **what this person said on other people's posts**.
- For comments on a post URL you already have, use [LinkedIn Comments Scraper](https://apify.com/khadinakbar/linkedin-comments-scraper). For people commenting on a profile's own posts, continue with [LinkedIn Profile Comments Scraper](https://apify.com/khadinakbar/linkedin-profile-comments-scraper). When you still need to find the profile, start with [LinkedIn Profile Search Scraper](https://apify.com/khadinakbar/linkedin-profile-search-scraper).

### Warm outreach from a prospect's public comments

An SDR targeting Microsoft-ecosystem buyers pastes Satya Nadella's profile, caps the job at 20 comments, and gets two public comments with the exact post URLs he replied to — a teaching post and a Reid Hoffman conversation. Those post URLs and the comment text become the first line of a personalized note. When a profile loads and LinkedIn shows no public comments, the outcome is `VALID_EMPTY` and only the start event is billed.

### Quick start input

```json
{
  "profiles": ["https://www.linkedin.com/in/satyanadella"],
  "maxCommentsPerProfile": 20,
  "maxResults": 20
}
```

`profiles` accepts LinkedIn `/in/` URLs or vanity handles. `maxResults` is the billed-row ceiling for the whole run.

### Input reference

| Field | Type | What it controls |
|---|---|---|
| `profiles` | array, required | Profile URLs or handles. Prefill: Satya Nadella. Max 50. Company pages, post URLs, and `ACoAA...` member IDs belong in other Actors. |
| `maxCommentsPerProfile` | integer | Per-profile cap (1–100, default 20). Public pages usually show only a handful. |
| `maxResults` | integer | Run-wide billed cap (1–5000, default 100). |
| `maxConcurrency` | integer | Profiles in parallel (1–5, default 2). |

### What data you receive

One dataset item is **one public comment** the input user posted on someone else's content.

| Field | What it answers |
|---|---|
| `commenterName` + `commenterProfileUrl` + `commenterHandle` | Who posted the comment |
| `commenterHeadline` | Public job title when JSON-LD exposes it |
| `commentText` | What they wrote |
| `commentPostedAgo` | Relative time LinkedIn shows (`1mo`, `2d`) |
| `postUrl` + `postId` + `postAuthorHandle` | Which public post they commented on |
| `mentionedProfileUrls` | Other `/in/` URLs mentioned in the comment |
| `provider` + `scrapedAt` | How the public HTML was fetched, and when the row was saved |

```json
{
  "commenterName": "Satya Nadella",
  "commenterProfileUrl": "https://www.linkedin.com/in/satyanadella",
  "commenterHandle": "satyanadella",
  "commenterHeadline": "Chairman and CEO at Microsoft",
  "commentText": "Thanks for having me, michael. Great to chat with your students about the industry and career growth!",
  "commentPostedAgo": "1mo",
  "postUrl": "https://www.linkedin.com/posts/michaelabbott_one-of-the-privileges-of-teaching-cs153-activity-7477760679408599040-MXGW",
  "postId": "7477760679408599040",
  "postAuthorHandle": "michaelabbott",
  "mentionedProfileUrls": ["https://www.linkedin.com/in/michaelabbott"],
  "sourceProfileUrl": "https://www.linkedin.com/in/satyanadella",
  "provider": "native",
  "scrapedAt": "2026-08-21T12:00:00.000Z"
}
```

You can download the dataset as JSON, CSV, Excel, or HTML from the run Output tab. Every terminal run also writes `OUTPUT` and `RUN_SUMMARY` with a named `outcome`.

### Workflow story: from a prospect profile to talking points

A researcher collecting warm openers for a Microsoft-adjacent account list pastes three `/in/` URLs, sets `maxCommentsPerProfile` to 10, and keeps `maxResults` at 30. The Actor fetches each public profile, parses the comment cards LinkedIn already displays, and writes one row per comment with the target post URL intact. She then filters rows that mention a product or event, clicks through `postUrl` to read the original conversation, and drafts a first line that quotes the comment instead of a generic compliment. After she has the profile URLs, she can pass them to [LinkedIn Profile Details Scraper](https://apify.com/khadinakbar/linkedin-profile-details-scraper) for the public about and experience view.

### Use through the API

```bash
curl -X POST "https://api.apify.com/v2/acts/khadinakbar~linkedin-user-comments-scraper/runs?token=YOUR_APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"profiles":["https://www.linkedin.com/in/satyanadella"],"maxCommentsPerProfile":20,"maxResults":20}'
```

After the Actor completes, read rows from the default dataset and `OUTPUT` / `RUN_SUMMARY` from the default key-value store.

### Use with AI agents through Apify MCP

> Scrape the public comments Satya Nadella posted on other people's LinkedIn content. Return comment text, target post URL, relative time, and profile URL. Cap at 20 comments. Keep postUrl as the source.

Inspect the terminal `outcome` (`COMPLETE`, `VALID_EMPTY`, `INVALID_INPUT`, `PARTIAL`, `UPSTREAM_FAILED`). Preserve `postUrl` as provenance. Treat `VALID_EMPTY` as a completed empty lookup for that profile. Connect through [Apify MCP](https://mcp.apify.com).

### Pricing — Pay per event + usage

This Actor uses Pay per event plus Apify platform usage. Open the live Pricing tab for current event details.

| Event | When it charges | Price |
|---|---|---|
| `apify-actor-start` | Once per run | $0.00005 |
| `user-comment-scraped` | Each saved comment row | $0.006 |

Platform compute and proxy usage are billed on top (`isPPEPlatformUsagePaidByUser: true`). Empty public profiles and invalid input stay outside `user-comment-scraped`. A typical one-profile prefill with two public comments is about **$0.012** in events plus a small usage component.

See the Actor **Pricing** tab in Console for the live event map. That Pricing tab is the current source of truth for event prices and platform usage.

### Best results

- Provide public `/in/` URLs or vanity handles; those are the starting condition this Actor is designed for.
- Keep `maxCommentsPerProfile` near 20 — public pages usually surface a small recent sample.
- Use `maxResults` as the run-wide cost cap when you pass several profiles.
- When LinkedIn shows public comments, rows include `commentText` and `postUrl`. When the public page has none, the outcome is `VALID_EMPTY`.
- Pair it with [LinkedIn Comments Scraper](https://apify.com/khadinakbar/linkedin-comments-scraper) when the starting point is a post URL, and with [LinkedIn Profile Details Scraper](https://apify.com/khadinakbar/linkedin-profile-details-scraper) when you want the public about/experience view next.

### Builder's note

I built this after a live probe of ScrapeCreators and SociaVault: both have LinkedIn profile and post routes, and neither exposes a user-comments-on-others endpoint. I found that native HTTP of a public profile such as Satya Nadella already returns `div.comment` cards with “commented on a post”, the comment body, relative time, and a target post URL. That is why this Actor parses public-profile HTML first and uses Scrapfly ASP only when the native response is an auth wall.

### FAQ

**Why did a real profile return zero rows?** LinkedIn showed no public comment cards on that profile. That is `VALID_EMPTY`, a completed empty lookup.

**How do I get comments on a specific post?** When the starting point is a post URL, use [LinkedIn Comments Scraper](https://apify.com/khadinakbar/linkedin-comments-scraper) then paste that post URL.

**Are LinkedIn cookies required?** Public profile HTML is enough for this contract.

### Legal & compliance

This Actor collects publicly visible LinkedIn profile information. You are responsible for complying with LinkedIn's terms, applicable privacy laws, and your own outreach policies. Use the output for lawful public-data collection and authorized outreach.

### Support

Open an issue on the Actor's Issues tab and include the Actor identifier plus the input JSON (no tokens). Custom workflow work is available through the developer profile.

# Actor input Schema

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

LinkedIn profile URLs or vanity handles whose public comments you want. Example: https://www.linkedin.com/in/satyanadella or satyanadella. Up to 50 profiles per run. NOT a post URL, company page, or member ID (ACoAA...). For comments on a known post, use linkedin-post-engagers-scraper.

## `maxCommentsPerProfile` (type: `integer`):

Maximum public comment rows to save for each profile. Example: 20. LinkedIn's public profile typically surfaces only a handful of recent comments; this cap is a cost control, not a promise of a full history. Default 20.

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

Hard ceiling on billed comment rows across the whole run. Example: 100. Use this as the primary cost cap when you pass several profiles. Default 100.

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

How many profiles to fetch in parallel. Example: 2. Range 1-5, default 2. Keep low if LinkedIn starts returning auth walls.

## Actor input object example

```json
{
  "profiles": [
    "https://www.linkedin.com/in/satyanadella"
  ],
  "maxCommentsPerProfile": 20,
  "maxResults": 20,
  "maxConcurrency": 2
}
```

# Actor output Schema

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

Dataset items containing commenter identity, comment text, target post URL, and relative time.

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

Run summary including outcome, commentsSaved, provider status codes, per-profile outcomes, 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"
    ],
    "maxCommentsPerProfile": 20,
    "maxResults": 20,
    "maxConcurrency": 2
};

// Run the Actor and wait for it to finish
const run = await client.actor("khadinakbar/linkedin-user-comments-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"],
    "maxCommentsPerProfile": 20,
    "maxResults": 20,
    "maxConcurrency": 2,
}

# Run the Actor and wait for it to finish
run = client.actor("khadinakbar/linkedin-user-comments-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"
  ],
  "maxCommentsPerProfile": 20,
  "maxResults": 20,
  "maxConcurrency": 2
}' |
apify call khadinakbar/linkedin-user-comments-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-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/lwoAo0dN18Deixjmz/builds/rQq2fbU5bhYGlgl6o/openapi.json
