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

LinkedIn comments scraper API: export the comments on LinkedIn posts from their links. One row per comment: text, time, reactions and the commenter's name, headline and profile link, beside the post's author, date and likes. Filter by date and add commenter profiles. $0.0105 per 1,000 comments.

- **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, Automation
- **Features:** Limited permissions
- **Stats:** 3 total users, 0 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.01 / 1,000 comments

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/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 comments scraper: paste post links and get one row per comment**, with the comment's text, time and reactions, the commenter's name, headline and profile link, and the post it answers.

You give it LinkedIn post links, post URNs or post ids. You get the comments on each post as rows, in the order LinkedIn shows them to someone who is not signed in, each with the post's author, date, likes and comment count beside it.

It reads public posts only. A post LinkedIn does not serve to the run comes back as a free row saying so, and you pay only for comments that come back.

| | |
|---|---|
| **Input** | LinkedIn post links (`linkedin.com/posts/...` or `.../feed/update/urn:li:activity:...`), post URNs or post ids |
| **Output** | One row per comment: text, time, reactions, pictures, commenter name, headline and profile link, and the post's author, date, likes and comment count; commenter profiles on request |
| **Ceiling** | 1,000 posts per run |
| **Account needed** | None from you |
| **Price** | $0.0105 per 1,000 comments, the same rate on every plan. The free plan's $5 a month covers about 476,000 |

| Using an AI agent? | |
|---|---|
| Actor | `dami_studio/linkedin-post-comments-scraper` |
| Set one field | `postUrls`, labelled "Post links" in the Console |
| Cap the bill | `maxTotalChargeUsd` on the run, for example `0.10`: it never charges past that |
| MCP, one link | `https://mcp.apify.com/?tools=fetch-actor-details,dami_studio/linkedin-post-comments-scraper` |
| How often | Daily, to follow the discussion on a set of posts |

### 🔍 What LinkedIn Post Comments Scraper does

It opens each post's public page and turns every comment shown there into a row: what was said, when, how many reactions it got, and who said it. The commenter's headline comes along when LinkedIn prints it under the name, and so does any picture posted in the comment.

Each row also carries the post itself: its author, text, date, likes and total comment count, so one export answers both "who commented" and "on what".

Two settings narrow or widen it:

- **Comments posted within** keeps only recent comments, from the last 24 hours up to the last year, or from a date you choose.
- **Add commenter profiles** reads each commenter's public LinkedIn profile too: headline, location, followers, about, current company, experience, education and skills. Paid per profile that comes back.

### 📋 What data you get from each LinkedIn comment

| What you get | Field |
|---|---|
| The comment | `commentId`, `commentUrn`, `commentUrl`, `text`, `imageUrls`, `position` |
| When | `postedAt`, `postedAgo` |
| Reactions | `reactions` |
| Who wrote it | `authorName`, `authorHeadline`, `authorUrl`, `authorPublicId`, `authorType`, `authorPictureUrl`, `authorIsPostAuthor` |
| The post it answers | `postUrl`, `postUrn`, `postActivityId`, `postAuthorName`, `postAuthorUrl`, `postText`, `postPublishedAt`, `postLikes`, `postCommentsCount`, `postMediaType` |
| Commenter profile (paid add-on) | `commenterProfile` (`headline`, `location`, `followers`, `connections`, `about`, `currentCompany`, `experience`, `education`, `skills` and more) |
| Where it came from | `inputUrl`, `scrapedAt` |

### ▶️ How to scrape LinkedIn comments

1. Open [LinkedIn Post Comments Scraper](https://apify.com/dami_studio/linkedin-post-comments-scraper) and click **Try for free**.
2. Paste post links into **Post links**, one per line. A post's link is in its "Copy link to post" menu.
3. Set a window under **Comments posted within** if you only want recent comments.
4. Turn on **Add commenter profiles** if you need them, then click **Start**.
5. Download the rows as JSON, CSV or Excel, or read them from the API.

Leave the list empty and you get one free sample row showing the shape of the output, with nothing read.

### 💰 How much does it cost to scrape LinkedIn comments?

**$0.0105 per 1,000 comments**, which is $0.0000105 each, the same rate on every plan. On the free plan, the $5 Apify gives you each month covers about 476,000 comments.

Commenter profiles cost **$1.40 per 1,000 profiles**, charged once per commenter in a run, and only when the profile comes back.

Free rows are never charged: a post that was not served, a post with no comment in your date window, an entry that is not a post link, the sample row, and the row that says the run stopped at your time or cost limit.

### 📥 What you give it

```json
{
  "postUrls": ["https://www.linkedin.com/posts/williamhgates_world-bank-says-small-ai-could-transform-activity-7522801130767224832-2eZH"],
  "postedLimit": "any",
  "includeCommenterProfiles": false
}
```

| Field | Default | What it is |
|---|---|---|
| `postUrls` | none, the form starts with one example | Up to 1,000 post links, post URNs (`urn:li:activity:...`, `urn:li:ugcPost:...`) or post ids. A profile, company or article link is refused with a free row. |
| `maxCommentsPerPost` | `1000` | Stops each post at this many comments. |
| `postedLimit` | `any` | `any`, `24h`, `week`, `month`, `3months`, `6months` or `year`. |
| `postedAfter` | none | A day as `YYYY-MM-DD`. When set, it replaces `postedLimit`. Any other format is refused before anything runs. |
| `includeCommenterProfiles` | `false` | Reads each commenter's public profile. Paid per profile that comes back. |

### 📤 What you get back

A real row from a run on 7 November 2026. The post text is cut short, and the commenter's name is shortened and their links left out here:

```json
{
  "ok": true,
  "recordType": "comment",
  "postUrl": "https://www.linkedin.com/posts/rippling_what-do-cursor-clay-runway-decagon-and-activity-7361793045501018112-At0M",
  "postActivityId": "7361793045501018112",
  "position": 1,
  "commentId": "7361849030915600384",
  "commentUrl": "https://www.linkedin.com/feed/update/urn:li:ugcPost:7361792876822896641?commentUrn=urn%3Ali%3Acomment%3A%28ugcPost%3A7361792876822896641%2C7361849030915600384%29",
  "text": "🔥 Clicklease is proud to be amongst the cutting edge companies partnering with Rippling.",
  "postedAt": "2025-08-14T19:59:45.512Z",
  "postedAgo": "1y",
  "reactions": 9,
  "imageUrls": [],
  "authorName": "L. O.",
  "authorType": "person",
  "authorHeadline": null,
  "authorIsPostAuthor": false,
  "postAuthorName": "Rippling",
  "postAuthorUrl": "https://www.linkedin.com/company/rippling",
  "postText": "What do Cursor, Clay, Runway, Decagon and most of the Forbes AI Top 50 have in common?…",
  "postPublishedAt": "2025-08-14T16:17:17.518Z",
  "postLikes": 1244,
  "postCommentsCount": 23,
  "postMediaType": "video",
  "scrapedAt": "2026-11-07T22:22:06.234Z"
}
```

| Field | Read it like this |
|---|---|
| `postedAt` | The exact time the comment was made. `postedAgo` is LinkedIn's own "5d", "1y" |
| `position` | Where the comment sits on the post's page, from 1 |
| `authorHeadline` | The line LinkedIn prints under the commenter's name; empty when it prints none |
| `authorIsPostAuthor` | True when the post's own author wrote the comment |
| `postCommentsCount`, `postLikes`, `reactions` | As counted when the run read them |
| `commentUrl` | Opens the post at that comment |
| Picture links | LinkedIn's own links. They stop working after a while, so save the file if you need it |

### 🧾 Reading the output

Every real row has `ok: true` and `recordType: "comment"`. Rows with `ok: false` are free notes, one per post that gave no comments, with `errorCode` and `error` saying why:

| `errorCode` | What happened |
|---|---|
| `NOT_SERVED` | The post was not served this run. Re-run it later. A deleted or private post ends here too |
| `NOT_FOUND` | No public post at this link: deleted, or not shown publicly |
| `NO_RESULTS` | The post shows no comment, or none in your date window |
| `BAD_INPUT` | The entry is not a post link, URN or id, or the date is not `YYYY-MM-DD` |
| `TIME_LIMIT` | The run reached its time limit; `notRead` lists the posts it did not get to |
| `COST_LIMIT` | The run reached the maximum cost you set; `notRead` lists the rest |

An empty run returns one sample row with `_sample: true`. To keep only real comments, filter on `ok` being true. The **Comments with their post** view puts each comment beside its post, and the **Notes** view lists the free rows.

### 💡 What people use it for

- **Founders and marketers** checking who reacts to their own posts and to other companies' launch posts in their market, and what they say.
- **Sales teams** finding people who comment on a topic they sell into, then reading their headline before reaching out.
- **Community and social teams** following the discussion under a campaign post day by day.
- **Researchers** collecting public reactions to a policy, product or event announced on LinkedIn.

A simple chain: take the post links a company publishes from [LinkedIn Company Posts Scraper](https://apify.com/dami_studio/linkedin-company-posts-scraper), run them here with **Comments posted within** set to `week`, then sort by `reactions` to see which comments drew the most agreement.

### 🚧 What it does not do

- No list of who liked or reacted to a post.
- No e-mail addresses or phone numbers.
- No LinkedIn articles: use the post that shares the article.
- Nothing from inside a LinkedIn account: no messages, no private posts, nothing only signed-in members see.
- It is not an official LinkedIn tool. Dami's Studio is independent and is not affiliated with or endorsed by LinkedIn, or by any other company named on this page.

### 🧭 Which LinkedIn scraper do you need?

| If you want | Use |
|---|---|
| The comments on posts you already have | This one |
| The posts a company page publishes | [LinkedIn Company Posts Scraper](https://apify.com/dami_studio/linkedin-company-posts-scraper) |
| A company's size, industry and headquarters | [LinkedIn Companies Scraper](https://apify.com/dami_studio/linkedin-companies-scraper) |
| Job listings | [LinkedIn Jobs Scraper](https://apify.com/dami_studio/linkedin-jobs-scraper) |

### ❓ Questions people ask

#### Do I need a LinkedIn account to scrape comments?

No. You don't need a LinkedIn account, a cookie or a login. The actor reads the public post pages LinkedIn shows to anyone who opens the link.

#### Why do the reaction counts differ from what I see on LinkedIn?

They are counted at the moment the run reads the post, and they keep moving. Open the post in a private browser window to compare with what a visitor sees.

#### Can I call it from code or an AI assistant?

Yes. The [API tab](https://apify.com/dami_studio/linkedin-post-comments-scraper/api) has ready-made calls, and AI assistants can use it through Apify's MCP server at `https://mcp.apify.com/?tools=fetch-actor-details,dami_studio/linkedin-post-comments-scraper`. In Python:

```python
from apify_client import ApifyClient

client = ApifyClient("<YOUR_APIFY_TOKEN>")
run = client.actor("dami_studio/linkedin-post-comments-scraper").call(
    run_input={"postUrls": ["urn:li:activity:7522801130767224832"], "postedLimit": "month"},
    max_total_charge_usd=0.05,
)
for row in client.dataset(run["defaultDatasetId"]).iterate_items():
    if row.get("ok") is False:
        continue
    print(row["postedAt"], row["reactions"], row["authorName"], row["text"][:80])
```

#### Is scraping LinkedIn legal?

The actor reads public posts the way a signed-out visitor sees them, with no account and nothing private. Comments carry personal data, so GDPR and similar laws apply to what you keep and how you use it: keep only what you need, and mind the rules on contacting people. LinkedIn's own terms still apply to what you do with the data. Apify has a good write-up on [the legality of web scraping](https://blog.apify.com/is-web-scraping-legal/). We are not lawyers, and this is not legal advice.

### 🆘 If something breaks

Open an issue on the actor's **Issues** tab. Include the run ID and the post link that went wrong, and we will look at it.

# Actor input Schema

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

LinkedIn post links, like https://www.linkedin.com/posts/... or https://www.linkedin.com/feed/update/urn:li:activity:..., or a post URN (urn:li:activity:...) or post id. Each post's comments come back, one row per comment.

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

Stop each post at this many comments. You pay only for comments that come back.

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

Keep only comments from this window. Leave on Any time to keep them all.

## `postedAfter` (type: `string`):

Keep only comments from this day on, as YYYY-MM-DD, for example 2026-10-01. When set, it replaces Comments posted within.

## `includeCommenterProfiles` (type: `boolean`):

Also reads each commenter's public LinkedIn profile: headline, location, followers, about, current company, experience, education and skills. Charged once per commenter whose profile comes back.

## Actor input object example

```json
{
  "postUrls": [
    "https://www.linkedin.com/posts/williamhgates_world-bank-says-small-ai-could-transform-activity-7522801130767224832-2eZH"
  ],
  "maxCommentsPerPost": 1000,
  "postedLimit": "any",
  "includeCommenterProfiles": false
}
```

# Actor output Schema

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

Every row in the default dataset: the comment's text, time, reactions and author with headline, beside the post it answers, and the commenter's public profile when asked for. A post that could not be read returns a free row saying why.

# 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/posts/williamhgates_world-bank-says-small-ai-could-transform-activity-7522801130767224832-2eZH"
    ]
};

// 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/posts/williamhgates_world-bank-says-small-ai-could-transform-activity-7522801130767224832-2eZH"] }

# 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/posts/williamhgates_world-bank-says-small-ai-could-transform-activity-7522801130767224832-2eZH"
  ]
}' |
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/owjeatfUDZab22U6A/openapi.json
