LinkedIn Post Comments Scraper

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

Data fields

FieldTypeDescription
typestringValue exported as type.
commentIdstringValue exported as commentId.
commentUrnstringValue exported as commentUrn.
commentUrlstringValue exported as commentUrl.
parentCommentIdstring | nullValue exported as parentCommentId.
parentCommentUrlstring | nullValue exported as parentCommentUrl.
postIdstringValue exported as postId.
postUrnstringValue exported as postUrn.

Input preview

postUrlsLinkedIn post URLs or URNs *
maxCommentsMaximum comments per post
includeRepliesInclude replies
maxRepliesPerCommentMaximum replies per comment
sortByComment order
sinceOnly comments since

API and agents

This actor can be run through Apify API, datasets, webhooks, schedules, and the official Apify MCP server.

How this actor works

See example inputs, outputs, API usage, and practical limits before running this actor on Apify.

Open Apify page

Use this LinkedIn comments scraper to export public post comments and replies into structured data for engagement monitoring, recruiting signals, and discussion archiving. Scrape LinkedIn post comments from known public URLs without manually copying thread data. Supply one or more public LinkedIn post URLs or URNs and receive one row per comment or reply. Export LinkedIn comments through the Apify Console, API, schedules, or integrations.

Quick start

{
  "postUrls": ["https://www.linkedin.com/posts/example_activity-7302346926123798528-example"],
  "maxComments": 50,
  "includeReplies": true,
  "maxRepliesPerComment": 20,
  "sortBy": "recent"
}

Output

Each row includes stable comment and post identifiers, comment text, author attribution, timestamps, reaction and reply counts, parent-child linkage, rank and page provenance, and incremental-monitoring fields.

Field Description
type comment or reply
commentId, commentUrn, commentUrl Stable comment identity and URL
parentCommentId, parentCommentUrl, depth Reply-thread relationship
postId, postUrn, postUrl, inputPostUrl Source post attribution
text Public comment text
postedAt, postedAtTimestamp Publication time in ISO UTC and milliseconds
authorId, authorName, authorHeadline Public author attribution when available
authorProfileUrl, authorProfilePictureUrl Public profile references when available
reactionCount, reactionCounts, replyCount Public engagement totals
isPinned, isEdited, isPostAuthor Comment state flags
rank, pageNumber, positionOnPage, sortBy Ordering and pagination provenance
collectedAt, isNewSince, sourceKey Collection and incremental deduplication fields

Input settings

Setting Description Default
postUrls Public LinkedIn post URLs or activity, ugcPost, or share URNs Required
maxComments Maximum top-level comments per post (1–5,000) 50
includeReplies Include replies as separate rows true
maxRepliesPerComment Maximum replies per parent comment 50
sortBy recent or relevant recent
since Optional ISO date/time cutoff for incremental monitoring None

Input recipes

Monitor new discussion

{"postUrls":["urn:li:activity:7302346926123798528"],"maxComments":100,"since":"2026-08-01T00:00:00Z"}

Export top-level comments only

{"postUrls":["urn:li:activity:7302346926123798528"],"maxComments":500,"includeReplies":false}

Who is it for

  • Community and social teams tracking discussion quality and recurring participants.
  • Sales teams identifying public buying signals and follow-up opportunities.
  • Recruiters reviewing public expertise and professional discussion signals.
  • Researchers and analysts archiving thread structure, engagement, and authorship.
  • Developers feeding structured LinkedIn discussion data into databases and dashboards.

The flat, linked row format supports spreadsheets and BI tools as well as databases: replies retain their parent IDs without requiring consumers to unpack nested arrays.

API usage and integrations

Run through the Apify API using Actor ID fetch_cat/linkedin-post-comments-scraper, export datasets as JSON, CSV, Excel, or XML, or connect results to Zapier, Make, Google Sheets, and webhooks.

cURL

curl -X POST "https://api.apify.com/v2/acts/fetch_cat~linkedin-post-comments-scraper/runs?token=$APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"postUrls":["urn:li:activity:7302346926123798528"],"maxComments":20}'

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,
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();

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,
})
items = client.dataset(run['defaultDatasetId']).list_items().items

For AI agents, connect through Apify MCP.

Tips

  • Prefer recent when completeness matters.
  • Save sourceKey in your destination to deduplicate recurring monitoring runs.
  • Use since with a UTC timestamp to limit output to newer comments.
  • Start with a small limit to verify that each post is publicly accessible.

Support

Open an issue from the Actor's Apify Console page with a public example URL, run ID, and expected result. Do not include private credentials or personal data that is not already public.

Common questions

Questions and answers reused from the canonical actor README.

What data can I export with LinkedIn Post Comments Scraper?

Each row contains comment identity and text, post attribution, available author details, timestamps, reactions, reply linkage, rank, and collection metadata.

Can I run LinkedIn Post Comments Scraper through an API, schedule, or MCP client?

Yes. Use the API examples above, create a Console schedule, or add this Actor as a tool through Apify MCP.

How is usage priced?

The Actor charges once at run start and once per saved comment or reply. The live Pricing tab shows the current plan-specific rates before you run it.

Does it require a LinkedIn login?

No. It processes comments exposed on public post surfaces. It does not access private or login-only content.

Are replies nested?

No. Replies are separate dataset rows linked by parentCommentId, which makes filtering and database imports easier.