# LinkedIn Post Comments Scraper (`dami_studio/linkedin-post-comments-scraper`) Actor

Extract the public comments on LinkedIn posts: comment text, author name and profile URL, reactions and age. No login, no cookie, no session to keep alive. LinkedIn shows guests up to 10 comments per post. $0.60 per 1,000 comments - the lowest of any LinkedIn post-comments scraper on Apify.

- **URL**: https://apify.com/dami\_studio/linkedin-post-comments-scraper.md
- **Developed by:** [Dami's Studio](https://apify.com/dami_studio) (community)
- **Categories:** Social media, Lead generation, Marketing
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.60 / 1,000 comment returneds

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

## LinkedIn Post Comments Scraper — public comments API, no login

Give it public LinkedIn post URLs. It returns the comments LinkedIn shows to a logged-out visitor,
one row per comment, with the commenter's name, profile URL, reaction count and comment age.

No LinkedIn account. No session cookie. No `li_at` token to paste. Nothing to keep alive.

### Input

`postUrls` accepts any of these and normalises them to the same post:

- `https://www.linkedin.com/feed/update/urn:li:activity:7302346926123798528/`
- `https://www.linkedin.com/posts/satyanadella_...-activity-7302346926123798528-jitu`
- `urn:li:activity:7302346926123798528`
- `7302346926123798528`

Other options: `maxCommentsPerPost`, `maxRetries` (attempts per post on a fresh proxy session and
fingerprint, default 4), `requestTimeoutSecs`, and an optional `proxyConfiguration`.

Empty input returns exactly one labelled `_sample: true` row and charges nothing.

### Output

| Field | Notes |
|---|---|
| `commentId` | LinkedIn's numeric comment id from `urn:li:comment:(...)` |
| `commentText` | full comment text |
| `authorName`, `authorProfileUrl` | commenter and their public profile URL |
| `likeCount` | reactions on that comment |
| `commentAgeText`, `approximateCreatedAt` | LinkedIn only publishes a relative age ("1y", "9mo") to guests; `approximateCreatedAt` is that age subtracted from fetch time, so it is an approximation, not an exact timestamp |
| `commentUrl` | permalink built from the comment URN |
| `postActivityId`, `postUrl`, `postAuthorName` | the post the comment belongs to |
| `postReactionCount`, `postCommentCount` | LinkedIn's own totals for the post |
| `transport`, `retrievedAt` | provenance |

#### Measured field coverage

Across 28 real comment rows pulled from 20 public posts on 2026-08-10, every one of the fields above
was filled on **100%** of rows. There is no column that is empty on every row.

### Honest limits — read this before you buy

**LinkedIn's logged-out view caps comments at 10 per post.** "See more comments" points at the
signup wall. Measured directly: a post with 762 comments and a post with 16 comments both returned
exactly 10, on 8/8 fetches each, across three browser fingerprints and eight proxy sessions.
`?sortBy=RECENT`, `?numComments=100`, `?commentsPage=2` and the `/embed/` view were all tested and
all return the same 10 (the embed view returns none).

**Not every post exposes comments to guests.** Of 20 arbitrary public posts, 8 returned comments and
12 returned none — and it is a stable property of the post, not luck: one post with 60 comments
returned zero on 8 consecutive fetches through 8 different sessions and 3 fingerprints, and its
canonical `/posts/` URL behaved identically. Those posts produce an uncharged `NO_RESULTS`
diagnostic row. **You are not billed for them.**

**Only top-level comments.** Replies are not rendered to guests.

If you need every comment on a post, or replies, you need a tool that logs in. This one does not
pretend to.

### What it does not do

- No login, no cookie injection, no account rental — so no full comment lists and no replies.
- No reactions/likers list, no profile enrichment, no email finding.
- No private or connection-only posts. Those come back as an uncharged diagnostic row.
- No exact comment timestamps. LinkedIn does not give guests one.
- No residential proxy. It runs on Apify datacenter addresses with a fresh session per attempt.

### Billing

**$0.60 per 1,000 comments** ($0.0006 each), plus $0.001 each time a run starts — the lowest
per-comment price of any LinkedIn post-comments scraper on the Apify Store with an active user base;
the next cheapest, `datadoping/linkedin-post-comments-scraper` (60 monthly users), is $1.20 per 1,000
even on its cheapest volume tier.

Pay per event, event name `comment`. One event per real comment row. Never charged: the empty-input
sample, `BAD_INPUT`, `NO_RESULTS` and `BLOCKED` diagnostic rows. A run where every post refuses to
show comments charges the start fee and nothing else.

Price is not the only thing to weigh. This actor returns at most 10 comments per post — LinkedIn's
own logged-out cap, documented above — and the cookie-based tools do not have that limit. Pick on
that basis, not on price alone.

### How it works

Requests go out with a real browser TLS + HTTP/2 fingerprint (`impit`), rotating Chrome and Firefox
profiles and a fresh Apify datacenter session per attempt.

That transport is the whole fix. The previous build of this actor used Node's `undici` and returned
`NO_RESULTS` on every post — LinkedIn rejected it at the TLS handshake and served a shell with no
comment markup. Same URLs, same proxy pool, same second, `impit` instead: the full ~385 KB guest page
with ten `section.comment` blocks, 4/4 sessions.

### FAQ

**Do I need a LinkedIn account or cookie?**
No. Nothing to log in with, nothing to refresh.

**How many comments will I get per post?**
Up to 10 — LinkedIn's own limit for logged-out visitors. Many posts give fewer, some give none.

**Why did a post return no comments when I can see comments on it?**
You are logged in and this actor is not. LinkedIn hides the comment block from guests on a
significant share of posts. That row is a diagnostic and is not charged.

**Can I get replies to comments?**
No. Guests only see top-level comments.

**Is the timestamp exact?**
No. LinkedIn gives guests a relative age like "9mo". `approximateCreatedAt` converts that, so it is
accurate to the granularity LinkedIn published — not to the minute. `commentAgeText` is the raw
value if you would rather do your own conversion.

**What happens with a private post or a bad URL?**
One uncharged diagnostic row with an `errorCode` (`BAD_INPUT`, `BLOCKED`, or `NO_RESULTS`) and a
plain-English reason.

**Does it use residential proxies?**
No. Datacenter only.

# Actor input Schema

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

Public LinkedIn activity URLs, /posts/ URLs containing activity-<id>, a bare activity ID, or urn:li:activity:<id>. Empty input returns one labeled, uncharged sample row.

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

Upper bound on charged comment rows per post. LinkedIn's logged-out view exposes at most 10 top-level comments per post, so values above 10 have no effect.

## `maxRetries` (type: `integer`):

How many times to retry a post on a different proxy session and browser fingerprint before giving up and writing an uncharged diagnostic row.

## `requestTimeoutSecs` (type: `integer`):

Maximum duration of each page request, in seconds.

## `proxyConfiguration` (type: `object`):

Optional. Leave empty to use Apify datacenter proxy with a fresh session per attempt, which is what this actor is tuned for. Supply proxyUrls to route through your own addresses instead. Residential proxy is never used.

## Actor input object example

```json
{
  "postUrls": [
    "https://www.linkedin.com/feed/update/urn:li:activity:7302346926123798528/",
    "7302346926123798528"
  ],
  "maxCommentsPerPost": 100,
  "maxRetries": 4,
  "requestTimeoutSecs": 20
}
```

# Actor output Schema

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

One normalized row for each public comment parsed successfully. Sample and diagnostic rows are clearly labeled and never charged.

# 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:7302346926123798528/"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("dami_studio/linkedin-post-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 = { "postUrls": ["https://www.linkedin.com/feed/update/urn:li:activity:7302346926123798528/"] }

# Run the Actor and wait for it to finish
run = client.actor("dami_studio/linkedin-post-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 '{
  "postUrls": [
    "https://www.linkedin.com/feed/update/urn:li:activity:7302346926123798528/"
  ]
}' |
apify call dami_studio/linkedin-post-comments-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,dami_studio/linkedin-post-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/sIDXmDPcgCPxap08A/builds/v44fGWVU4wDTTA07s/openapi.json
