# LinkedIn Post Comments Scraper – Extract LinkedIn Comment Data (`bhansalisoft/linkedin-post-comments-scraper`) Actor

Extract available comments from LinkedIn posts. Collect comment text, comment URLs, commenter profile IDs, names, profile links, and connection information.

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

## Pricing

from $7.00 / 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.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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 Post Comments Scraper – Extract LinkedIn Comment Data

The **LinkedIn Post Comments Scraper** is an Apify Actor designed to extract available comments and associated commenter information from LinkedIn posts. Provide the required LinkedIn post URL or supported input URL, along with any required authentication input, to process available comments and organize the results into a structured dataset.

Whether you are researching professional discussions, analyzing audience engagement, monitoring industry conversations, or conducting social media research, this LinkedIn comment scraper helps simplify the collection and organization of comment data.

### Key Features of LinkedIn Post Comments Scraper

- **LinkedIn Comment Text Extraction:** Collect available text from comments on LinkedIn posts.
- **Comment URL Extraction:** Retrieve comment links when available, making it easier to reference individual comments.
- **LinkedIn Profile ID Extraction:** Collect available identifiers for the profiles associated with comments.
- **First and Last Name Extraction:** Retrieve available commenter names.
- **LinkedIn Profile URLs:** Collect profile links for further professional research.
- **Connection Information:** Capture available connection status information, such as whether a commenter is outside your network.
- **Structured JSON Output:** Organize comment and profile information into consistent data fields.
- **Dataset Export:** Review and export results using formats supported by Apify, such as JSON, CSV, and Excel.

Actual results depend on the post, available comments, account access, and the Actor's supported functionality.

### What Data Can You Extract?

The LinkedIn Post Comments Scraper is designed to return the following information when available:

| Field | Description |
|---|---|
| `comment_text` | Text content of the comment |
| `comment_link` | URL associated with the comment |
| `Profile_id` | Commenter's LinkedIn profile identifier |
| `fname` | Commenter's first name |
| `lastName` | Commenter's last name |
| `Profile_link` | Link to the commenter's LinkedIn profile |
| `Connection` | Available connection status information |

These fields help organize LinkedIn comment data for professional research, engagement analysis, and other permitted data workflows.

### Example JSON Output

```json
[
  {
    "comment_text": "Thanks for sharing",
    "comment_link": "https://www.linkedin.com/feed/update/urn:li:activity:7347994851067445249",
    "Profile_id": "oseni-joseph-7063559b",
    "fname": "Oseni",
    "lastName": "Joseph",
    "Profile_link": "https://www.linkedin.com/in/oseni-joseph-7063559b",
    "Connection": "OUT_OF_NETWORK"
  }
]
```

*This example illustrates the output structure. The actual comment URL, profile information, and connection status depend on the available source data.*

### How to Use LinkedIn Post Comments Scraper

#### Step 1: Find a LinkedIn Post

Open LinkedIn and navigate to the post whose comments you want to research. Copy the post URL.

#### Step 2: Enter the Post URL

Paste the LinkedIn post URL into the appropriate Actor input field. Check the Actor's input schema for the exact supported URL format.

#### Step 3: Provide Authentication if Required

If the Actor requires a LinkedIn session cookie, provide it through the designated input field in the documented format. Only use an account you are authorized to access.

#### Step 4: Start the Actor

Review the input settings and start the Actor. It will attempt to retrieve the available comments and associated information supported by your configuration.

#### Step 5: Review and Export the Results

After the run completes, review the comment text, comment URLs, commenter names, profile links, and available connection information. Export the dataset in a supported format for further analysis.

### How to Get Your LinkedIn Cookie

If your Actor configuration requires an authenticated LinkedIn session, follow these steps.

1. **Install the Chrome extension:** [Export Cookie JSON File for Puppeteer](https://chromewebstore.google.com/detail/export-cookie-json-file-f/nmckokihipjgplolmcmjakknndddifde/reviews).
2. **Log in to LinkedIn:** Open LinkedIn in the same browser and sign in to an account you are authorized to use.
3. **Export the cookie:** Open the extension and use its cookie export feature if supported by your current browser and session.
4. **Configure the Actor:** Enter the required cookie in the designated input field according to the Actor's input schema.

**Security reminder:** LinkedIn session cookies are sensitive credentials that may provide access to your account. Never publish or share them with untrusted parties. Use secure credential handling and comply with applicable platform terms and privacy requirements.

#### Cookie Setup Demo

Watch the cookie setup demonstration:

https://youtu.be/yYJ6l2jm83Q

### Use Cases for LinkedIn Post Comments Scraper

#### Social Media Engagement Analysis

Study available comment text to understand how professionals respond to posts and participate in discussions.

#### Professional Discussion Research

Organize comments from relevant industry posts to research professional opinions, topics, and conversations.

#### Audience Research

Analyze available comment data to understand the themes and questions that appear in discussions relevant to your business or industry.

#### Content Research

Review comments on relevant posts to identify recurring topics, audience questions, and ideas for future content.

#### Market and Industry Research

Organize publicly available or otherwise authorized comment data to support research into professional communities and industry trends.

#### Data Analysis

Prepare structured comment datasets for classification, sentiment analysis, keyword analysis, and other permitted research workflows.

### Why Choose LinkedIn Post Comments Scraper?

Manually collecting comments from LinkedIn posts can be time-consuming, especially when you need to organize comment text and associated profile information into a consistent dataset.

LinkedIn Post Comments Scraper provides a structured approach to processing available comment data. By organizing comments, comment links, profile identifiers, names, and connection information into separate fields, it helps simplify review and analysis.

The Actor is designed for users who need an organized workflow for LinkedIn comment research and data processing.

### Frequently Asked Questions

#### What is LinkedIn Post Comments Scraper?

LinkedIn Post Comments Scraper is an Apify Actor designed to extract available comments and associated commenter information from LinkedIn posts.

#### What input do I need?

Provide the LinkedIn post URL in the supported input format. If required by the Actor, you must also supply a LinkedIn authentication cookie.

#### What information does the scraper return?

The Actor can return comment text, comment links, profile IDs, first names, last names, profile URLs, and available connection status information.

#### Can I export the comments to CSV or Excel?

You can export the resulting Apify dataset using supported formats, including CSV and Excel where available.

#### Does the scraper retrieve every comment?

Complete extraction cannot be guaranteed. Results may depend on comment pagination, post availability, access restrictions, and the Actor's implementation.

#### Does it guarantee real-time results or a specific extraction speed?

The data reflects information available during the run. Processing speed and completeness depend on source availability, network conditions, and the Actor's configuration.

#### Can I use the extracted comment data for research?

Use the information in accordance with LinkedIn's applicable terms, relevant privacy and data protection laws, and any restrictions on data collection, storage, and reuse.

### Get Started with LinkedIn Post Comments Scraper

Simplify LinkedIn comment research with the **LinkedIn Post Comments Scraper**. Provide the required post URL, configure any necessary authentication inputs, and organize available comments and commenter information into a structured dataset.

**Try the Actor:** https://apify.com/bhansalisoft/linkedin-post-comments-scraper

For support, contact: bhansalisoft781986@gmail.com

# Actor input Schema

## `Linkedin_Post_Url` (type: `string`):

Linkedin Post URL

## `Limit` (type: `integer`):

Number of Comments want to scrap : if this option is blank or 0 then it will scrap unlimited

## `Linkedin_cookie` (type: `array`):

1. **Install the Chrome extension:** [Export Cookie JSON File for Puppeteer](https://chromewebstore.google.com/detail/export-cookie-json-file-f/nmckokihipjgplolmcmjakknndddifde/reviews).
2. **Log in to LinkedIn:** Open LinkedIn in the same browser and sign in to an account you are authorized to use.
3. **Export the cookie:** Open the extension and use its cookie export feature, provided it supports your current browser and session.\
   Watch the cookie setup demonstration:
   https://youtu.be/yYJ6l2jm83Q

## `Run_Last` (type: `boolean`):

If checked then actors runs where last stop

## `Delay` (type: `string`):

Delay on Every Requet in second will add extra on every request  ,we already have rendom delay 5-10 second..

## Actor input object example

```json
{
  "Linkedin_Post_Url": "https://www.linkedin.com/posts/tanvi-singh-44512424b_were-hiring-qa-engineer-automation-activity-7348243780237418497-MRmE?utm_source=share&utm_medium=member_desktop&rcm=ACoAABUMbBQBtbpm-QMb2dUN0OuJ058KWKxMjBc",
  "Limit": 100,
  "Run_Last": false,
  "Delay": "5"
}
```

# Actor output Schema

## `overview` (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 = {
    "Linkedin_Post_Url": "https://www.linkedin.com/posts/tanvi-singh-44512424b_were-hiring-qa-engineer-automation-activity-7348243780237418497-MRmE?utm_source=share&utm_medium=member_desktop&rcm=ACoAABUMbBQBtbpm-QMb2dUN0OuJ058KWKxMjBc",
    "Run_Last": false,
    "Delay": "5"
};

// Run the Actor and wait for it to finish
const run = await client.actor("bhansalisoft/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 = {
    "Linkedin_Post_Url": "https://www.linkedin.com/posts/tanvi-singh-44512424b_were-hiring-qa-engineer-automation-activity-7348243780237418497-MRmE?utm_source=share&utm_medium=member_desktop&rcm=ACoAABUMbBQBtbpm-QMb2dUN0OuJ058KWKxMjBc",
    "Run_Last": False,
    "Delay": "5",
}

# Run the Actor and wait for it to finish
run = client.actor("bhansalisoft/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 '{
  "Linkedin_Post_Url": "https://www.linkedin.com/posts/tanvi-singh-44512424b_were-hiring-qa-engineer-automation-activity-7348243780237418497-MRmE?utm_source=share&utm_medium=member_desktop&rcm=ACoAABUMbBQBtbpm-QMb2dUN0OuJ058KWKxMjBc",
  "Run_Last": false,
  "Delay": "5"
}' |
apify call bhansalisoft/linkedin-post-comments-scraper --silent --output-dataset

```

## MCP server setup

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