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

Export public LinkedIn post comments and replies with author, thread, engagement, and incremental monitoring fields.

- **URL**: https://apify.com/fetch_cat/linkedin-post-comments-scraper.md
- **Developed by:** [Fetch Cat](https://apify.com/fetch_cat) (community)
- **Categories:** Social media, Marketing
- **Features:** Limited permissions
- **Stats:** 29 total users, 9 monthly users, 84.3% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.02 / 1,000 comment or reply exporteds

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
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

Export comments and exposed replies from public LinkedIn post URLs or URNs into flat, linked dataset rows. This LinkedIn comments scraper returns comment text, available author details, timestamps and engagement counts. Public availability varies and complete threads are not guaranteed.

### Quick start

1. Paste a public LinkedIn post URL or activity URN into `postUrls`.
2. Start with a small comment limit, then run the Actor.
3. Open the dataset and export JSON, CSV, Excel or XML. Check `RUN_SUMMARY` in the default key-value store for each input's outcome.

```json
{
  "postUrls": ["urn:li:activity:7302346926123798528"],
  "maxComments": 20,
  "includeReplies": true,
  "maxRepliesPerComment": 20
}
```

The post ID illustrates accepted input, not a promise that the post currently exposes comments. No LinkedIn login or cookies are required. Private and login-only content is not accessed.

Prefer a video guide? This short Apify walkthrough shows you how to set up and run an Actor. It uses a different Actor, but the setup steps are the same.

https://youtu.be/1OW8gOqlZbY?t=25

### What you get

One flat dataset row for each saved public comment or exposed reply, with its source post, available author attribution, text and time. Parent identifiers and depth link replies to their comments. Source positions and approximate counts retain their limitations rather than promising a complete or engagement-ranked discussion.

### Who is it for?

- **Community teams** reading discussion exposed on known public LinkedIn posts.
- **Qualitative researchers** organizing attributed comment text and available reply relationships.
- **Content analysts** comparing their own collected samples without claiming audience-wide sentiment.
- **Data teams** joining flat comment rows to source posts in a spreadsheet or application.

### How you can use the data

- **Read a top-level discussion sample.** Use the existing activity URN with a twenty-comment cap and replies off. Keep text, commentUrl and available author details together so an analyst can open the source rather than interpret a comment without context.
- **Reconstruct exposed reply relationships.** Enable replies with small separate parent and reply caps. Use parentCommentId and depth to join flat rows in your destination. Reply totals do not establish that every reply was publicly exposed or saved.
- **Review available recent discussion carefully.** Apply the existing first-of-October timestamp cutoff and retain postedAt with each row. Comments with unknown timestamps remain eligible, so a returned row is not automatically proved newer than the cutoff.
- **Compare your own repeated exports.** Join sourceKey in your destination to avoid counting the same post/comment pair twice. Compare available text and collection times yourself. The Actor does not maintain a discussion history, assign sentiment or globally rank engagement.

### Input settings

| Setting / API key | Behavior |
|---|---|
| Post URLs or URNs · `postUrls` | Required list of 1–100 public LinkedIn post URLs or activity, ugcPost or share URNs |
| Comment cap · `maxComments` | 1–5,000 top-level comments per post. Form default 20, omitted API value 50 |
| Include replies · `includeReplies` | Save exposed replies as linked rows. Default true |
| Reply cap · `maxRepliesPerComment` | 0–1,000 per parent. Form default 20, omitted API value 50 |
| Comment order · `sortBy` | Legacy `recent` / `relevant` label. Both preserve the same source-page order |
| Timestamp cutoff · `since` | Exclude known older timestamps. Unknown timestamps remain eligible |
| Relative cutoff · `postedLimit` | Accepted legacy field, currently has no effect. Use `since` instead |

This Actor uses direct public access and has no proxy input or automatic proxy fallback.

#### Input recipes

**Collect a small top-level sample**

```json
{"postUrls":["urn:li:activity:7302346926123798528"],"maxComments":20,"includeReplies":false}
```

**Collect newer discussion where timestamps are available**

```json
{"postUrls":["urn:li:activity:7302346926123798528"],"maxComments":20,"since":"2026-10-01T00:00:00Z"}
```

Store `sourceKey` in your destination to deduplicate repeated exports. A cutoff does not prove that every returned record has a known date.

### Output data

Each saved row is a comment or reply. Missing optional details remain null or empty. Absence is not proof that a profile or comment does not exist.

| Fields | Meaning |
|---|---|
| `type`, `commentId`, `commentUrn`, `commentUrl` | Comment or reply identity and permalink |
| `parentCommentId`, `parentCommentUrl`, `depth` | Parent linkage for exposed replies |
| `postId`, `postUrn`, `postUrl`, `inputPostUrl` | Source post attribution |
| `text` | Public comment text |
| `postedAt`, `postedAtTimestamp` | Available publication time in UTC and milliseconds. Nullable |
| `authorName`, `authorHeadline` | Available public author attribution |
| `authorProfileUrl`, `authorProfilePictureUrl` | Available profile references |
| `authorId` | Currently always null |
| `reactionCount`, `replyCount` | Observed public engagement counts. Unavailable counts may be zero |
| `reactionCounts` | Compatibility object: observed total is placed in `like`, other categories are zero. Not a verified reaction-type breakdown |
| `isPinned`, `isEdited`, `isPostAuthor` | Flags inferred from visible comment labels |
| `rank`, `pageNumber`, `positionOnPage` | Source-page positions. Rank is an approximate page-based index, not a relevance score |
| `sortBy` | Requested legacy label, not proof of sorted output |
| `collectedAt`, `isNewSince`, `sourceKey` | Collection time, cutoff eligibility and stable post/comment deduplication key |

Replies are separate rows rather than nested arrays. The Actor saves only identifiable comments exposed on the pages it can access, not every comment implied by a post's engagement totals.

#### Download your results

Open your run's dataset, choose **Export** and select JSON, CSV or Excel. JSON keeps nested fields together. CSV and Excel are useful when you want to review the records in a spreadsheet.

See [Apify's download and export guide](https://docs.apify.com/storage/dataset#apify-console) for the available formats and field options.

### Pricing

The `start` event is charged once when extraction starts. The `comment` event applies to each saved comment or reply. A completed extraction with no usable rows has no comment charges, but the start fee still applies. Run summaries and pending-work records are not paid dataset rows.

Set small comment and reply caps to bound saved output without treating them as guarantees of availability. See the [live Pricing tab](https://apify.com/fetch_cat/linkedin-post-comments-scraper/pricing) for current rates.

### Tips for best results

- **Use a known public post and small separate caps.** A post can be public while its full discussion remains unavailable.
- **Keep sourceKey when importing repeated exports.** It identifies the post/comment pair for your own duplicate checks.
- **Join replies through their parent fields.** Saved replies are flat rows rather than nested threads.
- **Retain unknown timestamps when reviewing a cutoff.** The timestamp filter excludes only known older comments.
- **Read each input's summary outcome.** A successful mixed batch does not imply that every requested discussion was accessible.

### Limits and caveats

Only comments and replies exposed without a LinkedIn account or cookies are supported. Private or login-only content is not accessed. Direct public access has no proxy input or automatic proxy fallback. An unavailable surface does not prove zero comments, privacy or deletion.

Comment and reply caps have different form prefills and omitted API values, as shown in Input settings. Both legacy order labels preserve the same source-page order, and postedLimit has no effect. Source rank is approximate rather than relevance ranking. Comments without timestamps remain eligible under since.

Author identifiers are always null, public author details can be absent, and unavailable counts can appear as zero. The compatibility reaction object places the observed total in like with other categories zero, rather than identifying reaction types. Visible-label flags are inferred. No complete thread or verified engagement breakdown is guaranteed.

Completed extraction without usable records can succeed empty. RUN_SUMMARY records per-input confirmed_zero, filtered_or_no_usable_records, unavailable_unknown, results, partial_results, input_error or pending reasons. Useful mixed-batch results survive isolated failures. Deadline-limited work is recorded in PENDING_WORK rather than claimed complete, and summary records are not dataset rows.

Invalid inputs, systemic failures, essential storage or billing failures still fail the run. A run where no input completes because of request or interpretation failures or pending work also fails. Inspect the summary before treating a successful empty result as a confirmed zero discussion.

### Automation and integrations

#### Save your settings for next time

Once you have an input that works for you, [save it as an Apify task](https://docs.apify.com/actors/running/tasks). This keeps your settings together so you can use them again without filling in the form from scratch.

#### Run on a schedule

Need fresh results regularly? You can [schedule the Actor or a saved task](https://docs.apify.com/actors/running/schedules) to run at a time that suits you.

Each scheduled run collects the data again. If you want to compare results or highlight changes, add that step in your own workflow.

#### Send results to your other tools

Use **n8n, Make or Zapier** to connect this scraper to the rest of your workflow. For example, you could pass its results to an AI assistant or add records to a spreadsheet. Follow the [Apify integration guides](https://docs.apify.com/integrations) for your chosen tool.

For a custom connection, an [Apify webhook](https://docs.apify.com/integrations/webhooks) can notify your app when a run finishes or fails. Your app can then fetch the results or handle the failure.

### API usage

Want to collect this data from your own app or automation? The examples below send input to the scraper and show how to collect its results.

The Node.js and Python examples wait for the run to finish before reading its results. The cURL example starts the run and returns its details. Wait for that run to finish, then use its `defaultDatasetId` to fetch the results.

For setup instructions, see Apify's [JavaScript client guide](https://docs.apify.com/api/client/js), [Python client guide](https://docs.apify.com/api/client/python) and [Actor runs API reference](https://docs.apify.com/api/v2/acts-runs-post).

#### cURL

```bash
curl -X POST 'https://api.apify.com/v2/acts/fetch_cat~linkedin-post-comments-scraper/runs' \
  -H "Authorization: Bearer $APIFY_TOKEN" \
  -H 'Content-Type: application/json' \
  --data @- <<'JSON'
{
  "postUrls": [
    "urn:li:activity:7302346926123798528"
  ],
  "maxComments": 20,
  "includeReplies": true,
  "maxRepliesPerComment": 20
}
JSON
```

#### Node.js

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

const client = new ApifyClient({ token: process.env.APIFY_TOKEN });
const run = await client.actor('fetch_cat/linkedin-post-comments-scraper').call({
  "postUrls": [
    "urn:li:activity:7302346926123798528"
  ],
  "maxComments": 20,
  "includeReplies": true,
  "maxRepliesPerComment": 20
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items);
```

#### Python

```python
import os
from apify_client import ApifyClient

client = ApifyClient(os.environ['APIFY_TOKEN'])
run = client.actor('fetch_cat/linkedin-post-comments-scraper').call(run_input={'postUrls': ['urn:li:activity:7302346926123798528'], 'maxComments': 20, 'includeReplies': True, 'maxRepliesPerComment': 20})
print(client.dataset(run['defaultDatasetId']).list_items().items)
```

#### API usage and AI agents notes

Wait for the returned run to finish, then use its `defaultDatasetId` to fetch items.

### MCP and AI agents

You can ask your AI assistant to collect data with **LinkedIn Post Comments Scraper** and help you work with the results. The scraper returns the data, and your assistant can then summarize it, compare records or prepare notes.

Connect your assistant through the [Apify MCP server](https://mcp.apify.com/). MCP gives your assistant a way to find this scraper, run it and read the results. Follow the [official setup and sign-in guide](https://docs.apify.com/mcp) for your app.

#### Easier setup with an Apify plugin

If you use a supported coding assistant, the [official Apify plugin](https://docs.apify.com/agents/plugins) can set up the connection for you. It connects your assistant to Apify and includes instructions for common tasks. Follow the guide for your particular app.

#### Use Apify AI in Console

Prefer to keep everything in Apify? Open [Apify AI in Console](https://docs.apify.com/account/apify-ai) and ask it to find Fetch Cat's **LinkedIn Post Comments Scraper**. You can describe the data you want and ask questions about the results.

Apify AI is currently in beta. It asks for confirmation before starting an Actor, and normal run charges apply.

#### Choose your assistant

- **Claude and Claude Code (Anthropic):** [Apify setup guide](https://docs.apify.com/integrations/claude).
- **ChatGPT and Codex (OpenAI):** [Apify setup guides](https://docs.apify.com/integrations/openai).
- **Grok Bot (xAI):** [Apify plugin guide](https://docs.apify.com/integrations/grok-bot).
- **Gemini CLI (Google):** [MCP server setup guide](https://geminicli.com/docs/tools/mcp-server/). Use the server URL below with the HTTP configuration supported by Gemini CLI.

#### Connect just this scraper

To keep your setup focused on this scraper, add this server configuration to a compatible MCP client:

```json
{
  "mcpServers": {
    "apify": {
      "url": "https://mcp.apify.com?tools=fetch_cat/linkedin-post-comments-scraper"
    }
  }
}
```

Sign in to Apify when your client asks. If your client uses a Bearer token instead, follow its setup guide and keep the token in its secure configuration. Configuration formats vary by app, so use the linked guide if your client needs a different format.

#### Use Apify's general server

Already connected to the general Apify MCP server at `https://mcp.apify.com`? You can use it to find this scraper without adding another server. Ask your assistant to use **LinkedIn Post Comments Scraper** by Fetch Cat, or give it the identifier `fetch_cat/linkedin-post-comments-scraper`.

Your assistant can check the available settings and retrieve the results from the returned run. If the run is still working, it should follow that run rather than start it again. Both connection options use Apify's hosted service.

#### Example requests

- “Use Fetch Cat’s LinkedIn Post Comments Scraper to collect up to 5 top-level comments from urn:li:activity:7302346926123798528 with replies off. Keep comment links, text and available author attribution, and report the input outcome if nothing usable is exposed.”
- “Collect up to 5 top-level comments from urn:li:activity:7302346926123798528 with exposed replies enabled and up to 2 replies per comment. Keep parent identifiers and depth so I can join the flat rows without claiming a complete thread.”
- “Retrieve up to 5 top-level comments from urn:li:activity:7302346926123798528 with replies off and a cutoff of 1 October 2026 at midnight UTC. Retain timestamps and flag undated rows instead of assuming every result is newer.”

Normal Apify charges apply. Check the [live Pricing tab](https://apify.com/fetch_cat/linkedin-post-comments-scraper/pricing) before asking your assistant to run a larger batch.

### Pay with x402

If your AI agent has a funded wallet, it can pay for Apify usage through [x402](https://docs.apify.com/integrations/x402). This experimental option lets an agent use Apify without a conventional account.

[Apify AGI](https://agi.apify.com/) provides a prepaid API token with a spending cap after payment. Your agent can use that token to run this scraper through the Apify API or an authenticated MCP connection.

Some MCP setups also support paying for each request directly. That is a different payment option, so check the official guide for its availability.

Follow the official guide for wallet setup, supported payment options and current terms. Apify handles the payments. Keep wallet keys and payment tokens in your agent's secure configuration.

#### Other ways for agents to pay

Apify also supports **MPP** for prepaid access through AGI and **Skyfire** for eligible Actors. If your agent already uses one of these, see the [agentic payment guide](https://docs.apify.com/agents/payments) to choose the right setup.

### FAQ

#### Does relevant sorting change the returned order?

No. `sortBy` is retained as an output label. Both accepted values use the same public-page order. Do not use it to infer completeness or engagement ranking.

#### Why are comments or author fields missing?

LinkedIn may expose only part of a discussion, omit profile details, or require login. An unavailable or empty public surface does not establish that the original post has no comments. Start small and inspect the run summary.

#### Can I export only comments newer than a date?

Set `since` to an ISO timestamp. Known earlier timestamps are excluded, but comments without timestamps remain eligible. `postedLimit` does not filter results.

#### Can I connect results to other tools?

Yes. Use Apify dataset exports, API clients, webhooks or integrations such as Make, Zapier and Google Sheets. Recurring automation is configured separately in Apify, not built into this scraper.

### Related Actors

- [LinkedIn Jobs Scraper](https://apify.com/fetch_cat/linkedin-jobs-scraper) — Collect public LinkedIn job listings and available job details.
- [LinkedIn Ad Library Scraper](https://apify.com/fetch_cat/linkedin-ad-library-scraper) — Collect public LinkedIn advertiser and ad-creative records.
- [LinkedIn Company Profiles Scraper](https://apify.com/fetch_cat/linkedin-company-profiles-scraper) — Collect public company-profile details from known LinkedIn company URLs.
- [LinkedIn Posts Scraper](https://apify.com/fetch_cat/linkedin-posts-scraper) — Collect text, author details and available engagement from known public post URLs or activity IDs.
- [Instagram Comments Scraper](https://apify.com/fetch_cat/instagram-comments-scraper) — collect visible public comment text and available author fields from known Instagram post or Reel URLs

### Support and feedback

For custom additions or integrations, email <hello@fetchcat.dev>.

Found an error or have a feature request? [Open an issue](https://apify.com/fetch_cat/linkedin-post-comments-scraper/issues) with the run URL, a non-sensitive input example and what you expected.

Need help sharing it? See [Apify’s guide to sharing a run when reporting an issue](https://docs.apify.com/account/collaboration/general-resource-access#automatically-sharing-runs-via-actor-issues). Sharing a run can give the developer access to its input, logs and results, so use a run that contains no sensitive data. Please leave out API tokens, passwords, cookies, private documents and personal data. Use a public sample URL or a redacted example instead.

Tried this scraper? We'd love to hear how it worked for you. [Leave a review](https://apify.com/fetch_cat/linkedin-post-comments-scraper/reviews) to help others choose the right tool and help us improve it. Your feedback means a lot to us.

Made with care for curious people, AI agents and the possibilities in data. ♥

# Changelog

This Actor's version history is a separate document: https://apify.com/fetch_cat/linkedin-post-comments-scraper/changelog.md

# Actor input Schema

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

One public LinkedIn post URL, activity URL, or post URN per line.

## `maxComments` (type: `integer`):

Maximum top-level comments saved for each post (1–5,000). The input form supplies 20; API input that omits this field uses 50. This is a cap, not a guarantee of thread completeness.

## `includeReplies` (type: `boolean`):

Save replies already exposed on the public pages as separate rows linked to their parent comment. This does not unlock hidden replies or guarantee all replies are available.

## `maxRepliesPerComment` (type: `integer`):

Maximum replies saved for each parent comment (0–1,000). Use 0 for no replies. The input form supplies 20; API input that omits this field uses 50.

## `sortBy` (type: `string`):

Legacy ordering label recorded in each output row. Both values use the same public-page request and preserve the source page order; selecting relevant does not request or apply a different sort.

## `since` (type: `string`):

Optional ISO date/time cutoff. Excludes comments with a known earlier timestamp; comments with unavailable timestamps remain eligible. Deduplicate recurring exports by sourceKey.

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

Legacy accepted field with no effect on extraction or filtering. Use since for an actual timestamp cutoff.

## Actor input object example

```json
{
  "postUrls": [
    "https://www.linkedin.com/posts/satyanadella_no-one-becomes-a-clinician-to-do-paperwork-activity-7302346926123798528-jitu"
  ],
  "maxComments": 20,
  "includeReplies": true,
  "maxRepliesPerComment": 20,
  "sortBy": "recent",
  "postedLimit": "any"
}
```

# 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 = {
    "postUrls": [
        "https://www.linkedin.com/posts/satyanadella_no-one-becomes-a-clinician-to-do-paperwork-activity-7302346926123798528-jitu"
    ],
    "maxComments": 20
};

// Run the Actor and wait for it to finish
const run = await client.actor("fetch_cat/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/satyanadella_no-one-becomes-a-clinician-to-do-paperwork-activity-7302346926123798528-jitu"],
    "maxComments": 20,
}

# Run the Actor and wait for it to finish
run = client.actor("fetch_cat/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/satyanadella_no-one-becomes-a-clinician-to-do-paperwork-activity-7302346926123798528-jitu"
  ],
  "maxComments": 20
}' |
apify call fetch_cat/linkedin-post-comments-scraper --silent --output-dataset

```

## MCP server setup

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