# LinkedIn Comments Scraper — Post Leads & Discussions (`rbbscrap/linkedin-comments-scraper`) Actor

Extract LinkedIn post comments, author names, profile URLs, job headlines, and lead-magnet replies without a browser on 256MB RAM.

- **URL**: https://apify.com/rbbscrap/linkedin-comments-scraper.md
- **Developed by:** [Hector](https://apify.com/rbbscrap) (community)
- **Categories:** Lead generation, Social media
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 1 bookmarks
- **User rating**: No ratings yet

## Pricing

$0.25 / 1,000 scraped linkedin comment leads

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

<p align="center">
  <img src="https://apify-image-uploads-prod.s3.us-east-1.amazonaws.com/y0h5Xh4ZLYL8d8YO7-actor-h8bTyFgg4EooddE9k-tIltW6ONYP-fast-linkedin-profile-scraper.png" width="110" height="110" style="border-radius: 24px;" alt="LinkedIn Comments Scraper — Post Leads & Discussions Official Logo" />
</p>

## LinkedIn Comments Scraper — Post Leads & Discussions

**LinkedIn Comments Scraper** extracts structured LinkedIn Comments records, B2B lead metadata, and canonical URLs in real time. Built on a zero-browser HTTP/2 engine running in **256 MB RAM**, it delivers clean datasets with **zero `null` fields** ready for **CSV, Excel, JSON**, or API pipelines.

> **Looking for related LinkedIn scrapers?** Check out [LinkedIn Jobs Scraper](https://apify.com/rbbscrap/linkedin-jobs-scraper), [LinkedIn Company Scraper](https://apify.com/rbbscrap/linkedin-company-scraper), [LinkedIn Posts Scraper](https://apify.com/rbbscrap/linkedin-posts-scraper), [LinkedIn Profile Scraper](https://apify.com/rbbscrap/linkedin-profile-scraper), or browse our [full catalog on Apify](https://apify.com/rbbscrap).

***

### What does LinkedIn Comments Scraper do?

Extract LinkedIn post comments, author names, profile URLs, job headlines, and lead-magnet replies without a browser on 256MB RAM.

- **1-Click Ready Execution:** Pre-filled defaults allow instant testing from the Apify Console without manual setup.
- **Zero-Browser 256 MB Architecture:** Uses pure Node.js HTTP/2 and Cheerio HTML/JSON-LD parsing — no heavy Chromium instances.
- **Multi-Format Export:** Download normalized datasets in **JSON, CSV, Excel (XLSX), XML, or HTML Table**.
- **Optional BYOC Session Support:** Works out-of-the-box in zero-cookie public mode, with optional `li_at` cookie support for deeper authenticated pagination.

#### Beyond the Official LinkedIn API

- **No Partner App Approvals:** Start extracting public LinkedIn Comments data immediately without restrictive LinkedIn Marketing Developer approvals.
- **Predictable Pay-Per-Event Pricing:** Priced at **$0.00025 per record** ($0.25 / 1,000 items — **up to 10x cheaper** than leading alternatives at $2.50 / 1K), with your **1st run 100% free**.

***

### What data can you scrape from LinkedIn Comments?

<table>
<tr>
<td><b>Comment ID</b> (<code>commentId</code>)</td>
<td><b>Post URL</b> (<code>postUrl</code>)</td>
<td><b>Post Author Name</b> (<code>postAuthorName</code>)</td>
</tr>
<tr>
<td><b>Author Name</b> (<code>authorName</code>)</td>
<td><b>Author Profile URL</b> (<code>authorProfileUrl</code>)</td>
<td><b>Author Headline</b> (<code>authorHeadline</code>)</td>
</tr>
<tr>
<td><b>Comment Text</b> (<code>commentText</code>)</td>
<td><b>Word Count</b> (<code>wordCount</code>)</td>
<td><b>Likes Count</b> (<code>likesCount</code>)</td>
</tr>
<tr>
<td><b>Created At</b> (<code>createdAt</code>)</td>
<td><b>Is Author Reply</b> (<code>isAuthorReply</code>)</td>
<td><b>Scraped At</b> (<code>scrapedAt</code>)</td>
</tr>
</table>

| Data Category | Extracted Fields & Data Points |
| :--- | :--- |
| **Core Record & Identity** | `commentId`, `postUrl`, `postAuthorName`, `authorName` |
| **Context & Metrics** | `authorProfileUrl`, `authorHeadline`, `commentText`, `wordCount` |
| **Links & Timestamps** | `likesCount`, `createdAt`, `isAuthorReply`, `scrapedAt` |

***

### Why scrape LinkedIn Comments? (Typical Use Cases)

- **Lead Magnet Harvesting:** Extract every prospect who commented *"GUIDE"*, *"AI"*, or *"INTERESTED"* on viral B2B posts for instant social selling.
- **Competitor Audience Poaching:** Monitor comments on competitors' product launches and extract decision makers asking questions.
- **Outreach Personalization (Clay / HubSpot):** Pipe commenter names, profile URLs, and exact comment text into AI personalization sequences.
- **Community Sentiment & Voice-of-Customer:** Analyze hundreds of LinkedIn discussions to uncover recurring pain points and feature requests.
- **AI Agents, RAG & Automated Workflows:** Connect live comment streams to Make.com, n8n, Zapier, or Claude via the Apify MCP Server.

***

### How to scrape LinkedIn Comments data

1. **Open the Input tab** in the Apify Console — realistic default values are already pre-filled for a **1-Click Run**.
2. **Customize your targets** (URLs, keywords, filters, or optional `sessionCookie`) or keep the defaults to test immediately.
3. **Click Start** — the actor executes in seconds on **256 MB RAM**.
4. **Export or integrate** your dataset as **JSON, CSV, Excel**, or connect via Make, Zapier, n8n, REST API, or MCP Server.

***

### ⬇️ Input Configuration & Examples

| Parameter | Type | Default | Description |
| :--- | :--- | :--- | :--- |
| `postUrls` | `array` | `["https://www.linkedin.com/posts/artificial-intelligence2026_most-people-are-using-generative-ai-but-ugcPost-7515590415371296768-mFTg"]` | Direct URLs of LinkedIn posts to extract comments and commenter leads from. |
| `maxItems` | `integer` | `50` | Maximum number of comments to return across all target posts. |
| `searchTopic` | `string` | `""` | Optional topic or keyword to automatically discover public LinkedIn posts and harvest their comments. |
| `filterKeyword` | `string` | `""` | Only return comments containing this keyword or lead-magnet trigger (e.g., 'GUIDE', 'interested', 'AI'). |
| `minWordCount` | `integer` | `0` | Skip ultra-short comments below this word count threshold. |
| `onlyWithBio` | `boolean` | `false` | Filter out anonymous or unlinked comments without a verifiable profile URL or headline. |
| `includeAuthorReplies` | `boolean` | `true` | Keep replies posted by the original post author in the dataset. |
| `sessionCookie` | `string` | `""` (Secret) | Optional 'li_at' cookie for deep paginated comment extraction via authenticated Voyager API. Leave empty for zero-cookie mode. |
| `proxyConfiguration` | `object` | `""` | Optional Apify Proxy configuration for high-volume extraction. |
| `maxExecutionTimeSecs` | `integer` | `75` | Safety timeout in seconds (15 to 90s) to protect compute budget. |

#### Example 1: 1-Click Quick Start

```json
{
  "postUrls": [
    "https://www.linkedin.com/posts/artificial-intelligence2026_most-people-are-using-generative-ai-but-ugcPost-7515590415371296768-mFTg"
  ],
  "maxItems": 50
}
```

#### Example 2: Targeted B2B Filtering

```json
{
  "searchTopic": "B2B SaaS growth",
  "filterKeyword": "GUIDE",
  "minWordCount": 3,
  "onlyWithBio": true,
  "maxItems": 200
}
```

***

### ⬆️ Output Example (Table View, JSON & Fields Reference)

#### Table View (CSV / Excel Preview)

| Author Name | Author Headline | Comment Text | Likes Count | Author Profile URL |
| :--- | :--- | :--- | :--- | :--- |
| Edward Vargas | LinkedIn Member | At Synov Gloo, we address this through rol | 2 | https://co.linkedin.com/in/edwardvargas-sc |

#### JSON Output Example

```json
{
  "commentId": "cmt_b6c0352fd882",
  "postUrl": "https://www.linkedin.com/posts/artificial-intelligence2026_most-people-are-using-generative-ai-but-ugcPost-7515590415371296768-mFTg",
  "postAuthorName": "Artificial intelligence",
  "authorName": "Edward Vargas",
  "authorProfileUrl": "https://co.linkedin.com/in/edwardvargas-scm",
  "authorHeadline": "LinkedIn Member",
  "commentText": "At Synov Gloo, we address this through role-based and document-level permissions and a controlled gateway to AWS Bedrock.",
  "wordCount": 20,
  "likesCount": 2,
  "createdAt": "1mo",
  "isAuthorReply": false,
  "hasProfileLink": true,
  "scrapedAt": "2026-11-13T08:52:27.269Z"
}
```

#### Output Fields Reference

| Field | Type | Description |
| :--- | :--- | :--- |
| `commentId` | `string` | Unique identifier of the comment |
| `postUrl` | `string` | Canonical URL of the LinkedIn post |
| `postAuthorName` | `string` | Author of the parent LinkedIn post |
| `authorName` | `string` | Full name of the commenter |
| `authorProfileUrl` | `string` | Direct LinkedIn profile or company URL of the commenter |
| `authorHeadline` | `string` | Professional headline or role of the commenter |
| `commentText` | `string` | Full text content of the comment |
| `wordCount` | `integer` | Number of words in the comment |
| `likesCount` | `integer` | Number of reactions/likes on the comment |
| `createdAt` | `string` | ISO timestamp or relative age of the comment |
| `isAuthorReply` | `boolean` | Whether the comment was posted by the original post author |
| `scrapedAt` | `string` | ISO timestamp of extraction |

***

### 🔗 Related & Dedicated Scrapers

| Actor | Slug | Primary Use Case |
| :--- | :--- | :--- |
| [LinkedIn Jobs Scraper](https://apify.com/rbbscrap/linkedin-jobs-scraper) | `rbbscrap/linkedin-jobs-scraper` | Extract job listings, salaries, company metadata, and apply URLs. |
| [LinkedIn Company Scraper](https://apify.com/rbbscrap/linkedin-company-scraper) | `rbbscrap/linkedin-company-scraper` | Extract firmographics, headcount, industry, headquarters, and websites. |
| [LinkedIn Posts Scraper](https://apify.com/rbbscrap/linkedin-posts-scraper) | `rbbscrap/linkedin-posts-scraper` | Search and extract LinkedIn posts, engagement metrics, and media links. |
| [LinkedIn Profile Scraper](https://apify.com/rbbscrap/linkedin-profile-scraper) | `rbbscrap/linkedin-profile-scraper` | Extract personal bios, career history, education, and corporate email patterns. |
| [LinkedIn Reactions Scraper](https://apify.com/rbbscrap/linkedin-reactions-scraper) | `rbbscrap/linkedin-reactions-scraper` | Extract post likers, reaction types, headlines, and warm B2B leads. |
| [LinkedIn Events Scraper](https://apify.com/rbbscrap/linkedin-events-scraper) | `rbbscrap/linkedin-events-scraper` | Scrape B2B webinars, schedules, speaker lists, and organizer links. |

***

### ⚠️ Error Items & Resilience Reference

**LinkedIn Comments Scraper** is built with fail-fast timeout guards and graceful per-target isolation so a single unavailable or authwalled URL never crashes an entire batch.

| Status / Behavior | Meaning | Resolution |
| :--- | :--- | :--- |
| `OK` | Target extracted and normalized | Record pushed cleanly with zero `null` fields |
| `EMPTY_RESULTS` | Filters matched 0 items | Broaden `filterKeyword` / `jobTitleFilters` or increase `maxItems` |
| `INVALID_TARGET` | Malformed URL skipped gracefully | Verify URL format in input; remaining batch items continue |
| `AUTHWALL_FALLBACK` | Guest page restricted by LinkedIn | Automatic SERP/JSON-LD fallback triggered, or supply optional `sessionCookie` |

***

### ❓ Frequently Asked Questions (FAQ)

#### How much does scraping LinkedIn Comments cost?

**LinkedIn Comments Scraper** uses transparent `PAY_PER_EVENT` pricing (`comment-scraped`) at **$0.00025 per item** ($0.25 per 1,000 records — far below standard $2.50/1K tools). **Your very first run on Apify is 100% free ($0.00 event charges)**, and Apify's Free Plan includes $5/month in platform credits. See [Apify Pricing](https://apify.com/pricing).

#### Can I integrate LinkedIn Comments Scraper with Make, Zapier, n8n, or Google Sheets?

Yes. Every run produces a structured dataset that connects natively via [Apify Integrations](https://apify.com/integrations) to **Make.com, Zapier, n8n, Clay, HubSpot, Airtable, and Google Sheets**, or triggers webhooks upon completion.

#### Can I use LinkedIn Comments Scraper with the Apify API (Python & Node.js)?

Yes. Call the actor programmatically with the official `apify-client` SDK:

**Python (`apify-client`)**

```python
from apify_client import ApifyClient

client = ApifyClient("YOUR_APIFY_API_TOKEN")
run = client.actor("rbbscrap/linkedin-comments-scraper").call(run_input={"postUrls":["https://www.linkedin.com/posts/artificial-intelligence2026_most-people-are-using-generative-ai-but-ugcPost-7515590415371296768-mFTg"],"maxItems":50})
items = list(client.dataset(run["defaultDatasetId"]).iterate_items())
print(items)
```

**Node.js (`apify-client`)**

```javascript
import { ApifyClient } from 'apify-client';

const client = new ApifyClient({ token: 'YOUR_APIFY_API_TOKEN' });
const run = await client.actor('rbbscrap/linkedin-comments-scraper').call({"postUrls":["https://www.linkedin.com/posts/artificial-intelligence2026_most-people-are-using-generative-ai-but-ugcPost-7515590415371296768-mFTg"],"maxItems":50});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items);
```

#### Can I use LinkedIn Comments Scraper as an MCP Server (Claude, Cursor, AI Agents)?

Yes. Connect **LinkedIn Comments Scraper** directly to **Claude Desktop, Cursor, or Windsurf** using the [Apify MCP Server](https://apify.com/rbbscrap/linkedin-comments-scraper/api/mcp) to invoke scraping tools in natural language.

#### Do I need residential proxies or login cookies?

No. **LinkedIn Comments Scraper** runs on a lightweight Zero-Browser HTTP/2 engine (256 MB RAM) and works in zero-cookie public mode by default. For high-volume automation or member-only pagination, you can optionally configure Apify Proxy or pass your own `li_at` cookie in the `sessionCookie` field.

#### Is it legal to scrape LinkedIn Comments data?

This scraper only processes publicly accessible web pages and metadata (or data you are authorized to view when supplying your own session cookie). Personal data is governed by **GDPR ([EU Regulation 2016/679](https://eur-lex.europa.eu/eli/reg/2016/679/oj))** and applicable regional privacy laws — always ensure you have a legitimate legal basis for processing personal profiles.

#### Need help, custom features, or found an issue?

Please open a ticket directly on the actor's [Issues tab](https://apify.com/rbbscrap/linkedin-comments-scraper/issues/open) in the Apify Console.

# Actor input Schema

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

Direct URLs of LinkedIn posts to extract comments and commenter leads from.

## `maxItems` (type: `integer`):

Maximum number of comments to return across all target posts.

## `searchTopic` (type: `string`):

Optional topic or keyword to automatically discover public LinkedIn posts and harvest their comments.

## `filterKeyword` (type: `string`):

Only return comments containing this keyword or lead-magnet trigger (e.g., 'GUIDE', 'interested', 'AI').

## `minWordCount` (type: `integer`):

Skip ultra-short comments below this word count threshold.

## `onlyWithBio` (type: `boolean`):

Filter out anonymous or unlinked comments without a verifiable profile URL or headline.

## `includeAuthorReplies` (type: `boolean`):

Keep replies posted by the original post author in the dataset.

## `sessionCookie` (type: `string`):

Optional 'li_at' cookie for deep paginated comment extraction via authenticated Voyager API. Leave empty for zero-cookie mode.

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

Optional Apify Proxy configuration for high-volume extraction.

## `maxExecutionTimeSecs` (type: `integer`):

Safety timeout in seconds (15 to 90s) to protect compute budget.

## Actor input object example

```json
{
  "postUrls": [
    "https://www.linkedin.com/posts/artificial-intelligence2026_most-people-are-using-generative-ai-but-ugcPost-7515590415371296768-mFTg"
  ],
  "maxItems": 50,
  "searchTopic": "",
  "filterKeyword": "",
  "minWordCount": 0,
  "onlyWithBio": false,
  "includeAuthorReplies": true,
  "maxExecutionTimeSecs": 75
}
```

# Actor output Schema

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

No description

# 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/artificial-intelligence2026_most-people-are-using-generative-ai-but-ugcPost-7515590415371296768-mFTg"
    ],
    "maxItems": 50,
    "searchTopic": ""
};

// Run the Actor and wait for it to finish
const run = await client.actor("rbbscrap/linkedin-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/artificial-intelligence2026_most-people-are-using-generative-ai-but-ugcPost-7515590415371296768-mFTg"],
    "maxItems": 50,
    "searchTopic": "",
}

# Run the Actor and wait for it to finish
run = client.actor("rbbscrap/linkedin-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/artificial-intelligence2026_most-people-are-using-generative-ai-but-ugcPost-7515590415371296768-mFTg"
  ],
  "maxItems": 50,
  "searchTopic": ""
}' |
apify call rbbscrap/linkedin-comments-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,rbbscrap/linkedin-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/2LpkNikBavC25uas2/builds/1NE2rSRzTMIFyfIBG/openapi.json
