# Linkedin Comments Scraper (`scraperoka/linkedin-comments-scraper`) Actor

🔎 LinkedIn Comments Scraper extracts insightful comment data—sentiment, engagement signals, keywords, and author context—from public posts. 📈 Perfect for B2B research, competitive intel, lead targeting, and community analysis.

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

## Pricing

from $1.99 / 1,000 results

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/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 Comments Scraper 🎯

Manually reviewing LinkedIn posts to collect comments wastes hours you don’t have. **LinkedIn Comments Scraper** automatically scrapes comments from a LinkedIn post URL and appends the results as they’re collected. This LinkedIn comments scraper is ideal for marketers, recruiters, and growth teams who need LinkedIn comment extractor data at scale—quickly turning engagement into structured insights and cleaner comment exports. You can pull up to thousands of comments across runs, so your team can focus on outreach and analysis, not copy-pasting.

***

### What You Get: Sample Output

Here’s a sample record from a single run:

```json
{
  "id": "1234567890",
  "linkedinUrl": "https://www.linkedin.com/feed/update/urn:li:ugcPost:7329991434395160578?commentUrn=urn%3Ali%3Acomment%3A(ugcPost%3A7329991434395160578%2C1234567890)&dashCommentUrn=urn%3Ali%3Afsd_comment%3A(1234567890%2Curn%3Ali%3AugcPost%3A7329991434395160578)",
  "commentary": "Great insights—thanks for sharing!",
  "createdAt": "2024-01-10T12:34:56Z",
  "createdAtTimestamp": 1736541296000,
  "actor": {
    "id": "john-doe",
    "type": "profile",
    "name": "John Doe",
    "linkedinUrl": "https://www.linkedin.com/in/john-doe/",
    "position": "Product Manager",
    "pictureUrl": "https://example.com/pic.jpg",
    "picture": {
      "url": "https://example.com/pic.jpg",
      "width": 500,
      "height": 500,
      "expiresAt": 1735497600000
    },
    "author": false
  },
  "engagement": {
    "likes": 0,
    "comments": 0,
    "shares": 0,
    "impressions": 0,
    "reactions": [
      {
        "type": "LIKE",
        "count": 3
      }
    ]
  },
  "postId": "urn:li:ugcPost:7329991434395160578",
  "pinned": false,
  "contributed": false,
  "edited": false,
  "query": {
    "post": "https://www.linkedin.com/posts/microsoft-events_microsoft-build-has-arrived-in-seattle-and-ugcPost-7329991434395160578-GnK7"
  },
  "replies": [
    {
      "id": "987654321",
      "linkedinUrl": "https://www.linkedin.com/feed/update/urn:li:ugcPost:7329991434395160578?commentUrn=urn%3Ali%3Acomment%3A(ugcPost%3A7329991434395160578%2C987654321)&dashCommentUrn=urn%3Ali%3Afsd_comment%3A(987654321%2Curn%3Ali%3AugcPost%3A7329991434395160578)",
      "commentary": "Agreed—this is super useful.",
      "createdAt": "2024-01-11T08:00:00Z",
      "createdAtTimestamp": 1736592000000,
      "actor": {
        "id": "jane-smith",
        "type": "profile",
        "name": "Jane Smith",
        "linkedinUrl": "https://www.linkedin.com/in/jane-smith/",
        "position": "Marketing Lead",
        "pictureUrl": "https://example.com/pic2.jpg",
        "picture": {
          "url": "https://example.com/pic2.jpg",
          "width": 500,
          "height": 500,
          "expiresAt": 1735497600000
        },
        "author": false
      },
      "engagement": {
        "likes": 0,
        "comments": 0,
        "shares": 0,
        "impressions": 0,
        "reactions": [
          {
            "type": "LIKE",
            "count": 1
          }
        ]
      },
      "postId": "urn:li:ugcPost:7329991434395160578",
      "pinned": false,
      "contributed": false,
      "edited": false,
      "query": {
        "post": "https://www.linkedin.com/posts/microsoft-events_microsoft-build-has-arrived-in-seattle-and-ugcPost-7329991434395160578-GnK7"
      },
      "replies": []
    }
  ]
}
```

Output Fields table (what the actor writes per comment):

| Field | Type | What It Tells You |
|---|---|---|
| `id` | string | The comment’s extracted identifier within the post |
| `linkedinUrl` | string | A direct LinkedIn URL pointing to the comment resource |
| `commentary` | string | The visible text of the comment (your analysis text field) |
| `createdAt` | string | Human-readable time text for when the comment was created |
| `createdAtTimestamp` | number | A timestamp (in milliseconds) you can sort/filter reliably |
| `actor` | object | The commenter profile object attached to the comment |
| `engagement` | object | Reaction counts summary for the comment (useful for prioritization) |
| `postId` | string | The post URN in `urn:li:{urn_type}:{post_id_str}` format |
| `pinned` | boolean | Whether the comment is marked as pinned (in the output) |
| `contributed` | boolean | Whether the comment is marked as contributed (in the output) |
| `edited` | boolean or string-derived | Whether the comment is flagged as edited in the page text |
| `query` | object | Keeps the original input post URL under `query.post` |
| `replies` | array | Replies under the comment (empty unless enabled with `scrapeReplies`) |

Export your dataset as JSON, CSV, or Excel — straight from the Apify dashboard.

***

### Why LinkedIn Comments Scraper?

There are a lot of ways to pull data from LinkedIn posts — here’s what sets **LinkedIn Comments Scraper** apart.

#### Comment and reply structure, ready for analysis

LinkedIn comment extractor output is returned as structured JSON objects per comment, with a `replies` array attached to the parent comment when you enable replies. This makes it straightforward to build engagement trees and categorize discussion threads.

#### Profile detail control with Profile Scraper Mode

If you set `profileScraperMode` to `Main`, LinkedIn comment scraping tool output is enhanced with expanded profile details for each commenter (and their replies when `scrapeReplies` is enabled). If you choose `Short`, you still get useful commenter fields without expanding the full profile.

#### Resilient runs built for real-world scraping

The actor is designed for practical scraping workflows using built-in proxy support and resilience so you can run LinkedIn post comments scraper jobs with less manual babysitting. Results are appended as collected, so you don’t have to wait for everything to finish.

#### Integration-friendly output for downstream workflows

Each comment record includes a complete `actor`, `engagement`, timestamps, and a `query` object containing your original post URL. That means **LinkedIn comments data scraper** output can plug into your reporting pipeline and help power tools like exports to spreadsheets or automated lead workflows.

***

### Configuring Your Run

Drop this into your `input.json` to get started:

```json
{
  "url": "https://www.linkedin.com/posts/microsoft-events_microsoft-build-has-arrived-in-seattle-and-ugcPost-7329991434395160578-GnK7",
  "limit": 10,
  "profileScraperMode": "Short",
  "scrapeReplies": false,
  "maxItems": 10,
  "posts": ""
}
```

Input Parameters table:

| Parameter | Required | What It Does |
|---|---|---|
| `url` | ✅ | The LinkedIn post URL to scrape comments from. |
| `limit` | ⬜ | Maximum number of comments to extract per post (minimum is 1). |
| `profileScraperMode` | ⬜ | Choose the level of profile details to scrape for each commenter. Options are `Short` or `Main`. |
| `scrapeReplies` | ⬜ | When enabled, extract replies for each comment along with the comments. |
| `maxItems` | ⬜ | Enter maxItems (integer). |
| `posts` | ⬜ | Enter posts (a text field in the input schema). The actor also supports backward compatibility via `posts` and treats `url` as the primary single-post input. |

***

### Core Capabilities

#### Scrapes LinkedIn post comments at the source

LinkedIn post comments scraper functionality focuses on extracting visible comment text and metadata from the provided LinkedIn post URL. The output is built to be consistent per comment record for easier downstream processing.

#### Optional inclusion of replies

With `scrapeReplies` enabled, the LinkedIn comment scraping tool includes threaded replies under each top-level comment’s `replies` array. This is ideal for deeper qualitative research and engagement mapping.

#### Profile enrichment when you select Main mode

Set `profileScraperMode` to `Main` to expand each commenter’s profile details beyond the basic fields. This gives you a richer dataset for segmentation, outreach prioritization, and analyst workflows that need more than just the comment text.

#### Clean timestamps for sorting and freshness checks

Each comment includes both `createdAt` and `createdAtTimestamp`. That helps you sort comments chronologically and compare comment activity across runs—useful for monitoring and LinkedIn comments collection efforts.

#### Incremental dataset writing for smoother runs

As results are extracted, the actor pushes comment objects one-by-one to the Apify dataset. That means you can access partial results even if a long run doesn’t complete in one go.

***

### Who Gets the Most Out of This

**Marketing and engagement teams** use LinkedIn comments scraper output to understand what resonated, identify objections, and capture recurring themes from real discussion threads. They can quickly turn engagement comments into structured insights rather than manual review.

**Recruiters and talent sourcers** benefit from an automated LinkedIn comment extractor workflow that helps compile commenter identities tied to specific posts. With `profileScraperMode` set to `Main`, they can enrich commenter profiles for faster candidate research.

**Growth analysts and community researchers** can run LinkedIn comments data scraper jobs to study comment timing, reaction patterns in `engagement.reactions`, and how replies extend the discussion. This is useful for engagement monitoring and qualitative coding.

**Sales development and outreach operators** can use the output to prioritize commenters by engagement signals and profile context, then export the dataset for downstream outreach tooling. When you enable replies, they can also analyze conversational depth.

**Developers and automation specialists** can integrate this LinkedIn comments export into pipelines via the Apify platform: collect comment data for a post, then feed it into their own ETL or CRM import step.

***

### Step-by-Step: How to Use It

No coding needed. Here's how to run LinkedIn Comments Scraper from start to finish:

1. **Open the actor on Apify** — visit [console.apify.com](https://console.apify.com) and search for LinkedIn Comments Scraper.
2. **Enter your inputs** — add your LinkedIn post URL in `url`, and set `limit` and `scrapeReplies` based on how much discussion you want.
3. **Choose profile enrichment** — set `profileScraperMode` to `Short` for basic commenter fields or `Main` for expanded profile details.
4. **Configure proxy settings** — use the actor’s built-in proxy support for more reliable scraping, especially for higher-volume runs.
5. **Hit Run and watch the live log** — monitor progress as the actor processes your post URL(s).
6. **View results in the dataset tab** — each comment record is pushed to the dataset as collected.
7. **Export your data** — export as JSON, CSV, or Excel from the Apify dashboard.

The whole process takes under 5 minutes to set up.

***

### Integrations & Export Options

Once your data is collected, LinkedIn Comments Scraper plugs directly into your existing workflow.

You can export results as **JSON, CSV, or Excel** from the Apify dataset tab for easy analysis and sharing. For no-code automation, you can connect Apify to tools like Zapier or Make to push your LinkedIn comments data scraper output into other systems.

If you want to run it programmatically, you can fetch results via the Apify API (see [apify.com/docs/api](https://apify.com/docs/api)). You can also chain automations by triggering downstream actions via webhooks after the run completes.

***

### Pricing & Free Trial

LinkedIn Comments Scraper runs on the Apify platform, which offers a **free tier** — no credit card required to get started. You’ll typically use platform credits for runs, and heavier usage can scale with Apify’s subscription plans. For the most accurate details on current credits, CU usage, and plan options, check the pricing page on Apify. Start for free at [apify.com](https://apify.com) and scale when you’re ready.

***

### Reliability & Performance

| What We Handle | How |
|---|---|
| Rate-limit pressure | Uses built-in pacing and retry/fallback behavior for resilience |
| Scraping reliability | Supports proxy configuration to improve access consistency |
| Partial results | Writes results as collected so you keep what’s already extracted |
| Output completeness | Returns structured comment objects with timestamps, actor info, engagement info, and optional replies |
| Failure-state behavior | If fetching fails for a post, the actor logs the error and continues without crashing the whole run |

Limitations: This actor is designed for publicly accessible information. If a profile or content isn’t available as expected in the page response, some fields may be missing or empty. For enterprise-scale needs, contact us to discuss custom configurations.

For enterprise-scale runs, contact us to discuss custom configurations.

***

#### Is there a free plan or trial?

Yes. Apify offers a free tier with credits that you can use to test LinkedIn Comments Scraper before scaling up.

#### Do I need to log in to LinkedIn to use this?

No login is required from your side for the actor inputs described here. The actor is built to scrape publicly available content from the provided post URL.

#### How accurate is the data?

Accuracy depends on what’s available on the post page and commenters’ publicly visible profile fields. The actor extracts comment text, actor details available in the page, and timestamps when present.

#### How many results can I get per run?

You can control how many comments are extracted using `limit` (minimum 1). There’s also `maxItems` in the input schema for controlling run behavior.

#### How often is the data updated / how fresh is it?

Data freshness depends on when you run the actor. Each comment record includes `createdAt` and `createdAtTimestamp` fields, so you can evaluate the timing of comments at scrape time.

#### Is this legal? Does it comply with GDPR / CCPA?

This actor collects **publicly available data**. You are responsible for ensuring your use complies with GDPR, CCPA, and the relevant platform terms and laws in your jurisdiction.

#### Can I export results to Google Sheets or Excel?

Yes. Export your dataset as JSON, CSV, or Excel directly from the Apify dashboard, and then import into Google Sheets or other tools as needed.

#### Can I run this on a schedule automatically?

Yes. On Apify, you can schedule actor runs so LinkedIn comments collection can happen automatically on the cadence you choose.

#### Can I access this via API?

Yes. Runs can be triggered and results can be retrieved programmatically via the Apify API. For details, see the Apify API documentation: https://apify.com/docs/api.

#### What happens if the actor hits an error?

If a post fetch fails, the actor logs the error for that post and continues without stopping the entire run. If comment pages load with partial content, the actor still produces the available structured comment records.

***

### Need Help or Have a Request?

Got a question about LinkedIn Comments Scraper or want a new feature added? Reach out at <dataforleads@gmail.com>. We’re actively maintaining this actor and welcome requests like webhook notifications on completion or additional export-friendly fields for comment analytics.

***

*LinkedIn Comments Scraper is the fastest, most reliable way to extract LinkedIn post comment discussions at scale — start your free run today.*

This actor collects **publicly available data** and does not access private accounts, login-gated content, or password-protected pages. It’s your responsibility to comply with GDPR, CCPA, and applicable platform Terms of Service when using and storing scraped data. For data removal requests, contact <dataforleads@gmail.com>. Use responsibly, ethically, and only for lawful purposes.

# Actor input Schema

## `url` (type: `string`):

The LinkedIn post URL to scrape comments from.

## `limit` (type: `integer`):

Maximum number of comments to extract per post.

## `profileScraperMode` (type: `string`):

Choose the level of profile details to scrape for each commenter.

## `scrapeReplies` (type: `boolean`):

Extract replies for each comment along with the comments.

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

Enter maxItems

## `posts` (type: `string`):

Enter posts

## Actor input object example

```json
{
  "url": "https://www.linkedin.com/posts/microsoft-events_microsoft-build-has-arrived-in-seattle-and-ugcPost-7329991434395160578-GnK7",
  "limit": 10,
  "profileScraperMode": "Short",
  "scrapeReplies": false,
  "maxItems": 10
}
```

# 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 = {
    "url": "https://www.linkedin.com/posts/microsoft-events_microsoft-build-has-arrived-in-seattle-and-ugcPost-7329991434395160578-GnK7"
};

// Run the Actor and wait for it to finish
const run = await client.actor("scraperoka/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 = { "url": "https://www.linkedin.com/posts/microsoft-events_microsoft-build-has-arrived-in-seattle-and-ugcPost-7329991434395160578-GnK7" }

# Run the Actor and wait for it to finish
run = client.actor("scraperoka/linkedin-comments-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "url": "https://www.linkedin.com/posts/microsoft-events_microsoft-build-has-arrived-in-seattle-and-ugcPost-7329991434395160578-GnK7"
}' |
apify call scraperoka/linkedin-comments-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=scraperoka/linkedin-comments-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/acts/rUWBaOc3UhfnaLf6O/builds/oqI9ZSC2tG9olk0zU/openapi.json
