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
recentwhen completeness matters. - Save
sourceKeyin your destination to deduplicate recurring monitoring runs. - Use
sincewith 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.