LinkedIn Post Comment & Reply Thread Extractor avatar

LinkedIn Post Comment & Reply Thread Extractor

Pricing

from $0.49 / 1,000 results

Go to Apify Store
LinkedIn Post Comment & Reply Thread Extractor

LinkedIn Post Comment & Reply Thread Extractor

Pull top-level comments from LinkedIn posts, with optional nested reply threads, author identity, reaction counts, and linked profiles found in the comment text.

Pricing

from $0.49 / 1,000 results

Rating

0.0

(0)

Developer

Nimbryxo-studio

Nimbryxo-studio

Maintained by Community

Actor stats

0

Bookmarked

1

Total users

0

Monthly active users

9 hours ago

Last modified

Share

Feed this actor one or more LinkedIn post links and a session cookie, and it returns the top-level comments on each post (up to your per-post limit) — optionally with nested reply threads — as structured rows with author identity, engagement counts, and linked profiles.

What this actor does

  • Scrapes top-level comments from one or more LinkedIn post URLs, with a relevance or recency sort preference.
  • Optionally follows reply threads up to 3 levels deep, emitting each reply as its own row linked to its parent via parentCommentId.
  • Classifies each commenter as a person or company page, and pulls any LinkedIn profile or company links out of the comment text.
  • Filters out comments below a minimum reaction count, and can exclude comments from person or company authors entirely.
  • Omits text and URL fields it couldn't populate for a given comment; the counts (reactionsCount, repliesCount, authorFollowersCount), isReply and authorType are always present.

Output per comment

FieldDescription
commentIdUnique numeric ID for the comment.
postUrlCanonical URL of the source post.
postIdNumeric activity ID of the source post.
authorNameCommenter's full name.
authorProfileUrlURL to the commenter's LinkedIn profile or company page.
authorHeadlineCommenter's headline/title.
authorAvatarCDN URL of the commenter's profile photo.
authorTypePERSON, COMPANY, or UNKNOWN when it can't be determined.
authorFollowersCountCommenter's follower count, when LinkedIn exposes one (0 otherwise).
commentTextFull text of the comment.
commentedAtISO 8601 UTC timestamp of when the comment was posted.
commentEditedAtISO 8601 UTC timestamp of the last edit, when the comment was edited.
reactionsCountTotal reactions on the comment (0 when none or unknown).
reactionBreakdownReaction counts by type (e.g. like, praise), when more than one type is present.
repliesCountNumber of replies to this comment (0 when none or unknown).
isReplytrue if this row is a reply, false if top-level.
parentCommentIdID of the parent comment (replies only).
mentionedUsersLinkedIn profile URLs (linkedin.com/in/...) that appear in the comment text, when any are present.
mentionedCompaniesCompany slugs from linkedin.com/company/... links in the comment text, when any are present.
attachmentImageUrlURL of an attached image, when the comment includes one.
attachmentVideoUrlURL of an attached video, when the comment includes one.
scrapedAtISO 8601 UTC timestamp of when the row was scraped.

If no cookie is supplied, or the supplied cookie is or becomes invalid, the run writes a record with _status: "no_data", _reason, _message, _help and scrapedAt fields explaining what to fix, and stops. Comments already saved before the cookie stopped working stay in the dataset.

Input

FieldTypeDefaultDescription
postUrlsList of strings–LinkedIn post URLs to scrape comments from. Accepts /feed/update/urn:li:activity:ID/ or /posts/username_slug-ID/ formats. Required.
cookieString–A LinkedIn session cookie: either the li_at value, or the full cookies JSON array exported from a browser extension. Required.
maxCommentsPerPostInteger50Maximum top-level comments to scrape per post (1–500). Replies don't count toward it.
includeRepliesBooleanfalseAlso fetch replies to top-level comments, each output as its own row.
replyDepthInteger1How many reply levels to recurse when includeReplies is on: 1 = direct replies, up to 3. Up to 10 replies are read per comment.
sortByString (select)RELEVANCERELEVANCE (LinkedIn's "Most relevant") or RECENT (newest first). A preference only: depending on how LinkedIn serves a post's comments, they may come back in LinkedIn's default order.
minReactionsInteger0Skip comments and replies with fewer than this many reactions. 0 disables the filter.
languageString (select)enPreferred LinkedIn UI language; influences which translation of comment text is returned.
excludeAuthorTypesList of strings[]Drop comments and replies from the selected author types: PERSON, COMPANY. Comments whose author type is UNKNOWN are always kept.
proxyConfigurationObject–Optional Apify proxy settings.

Example: default run

{
"postUrls": ["https://www.linkedin.com/feed/update/urn:li:activity:7329761432933134337/"],
"cookie": "YOUR_LI_AT_VALUE",
"maxCommentsPerPost": 50
}

Example: with nested replies, newest first

{
"postUrls": ["https://www.linkedin.com/posts/williamhgates_climate-7329761432933134337/"],
"cookie": "YOUR_LI_AT_VALUE",
"includeReplies": true,
"replyDepth": 2,
"sortBy": "RECENT"
}

Example: high-engagement comments from people only

{
"postUrls": ["https://www.linkedin.com/feed/update/urn:li:activity:7329761432933134337/"],
"cookie": "YOUR_LI_AT_VALUE",
"minReactions": 10,
"excludeAuthorTypes": ["COMPANY"]
}

Use cases

  • Audience sentiment — read how people are reacting to a company announcement or thought-leadership post.
  • Lead discovery — surface engaged commenters as warm prospects, filtered to real people by excludeAuthorTypes.
  • Influencer research — see who's actively replying to a creator's posts and how deep the conversation threads go.
  • Brand monitoring — track mentions of your company or product inside comment threads on relevant posts.
  • Community moderation review — pull full reply chains to review how a sensitive post's discussion unfolded.

FAQ

Does this need a LinkedIn account? Yes. A valid session cookie (li_at or an exported cookies JSON array) from a logged-in account is required to read comment data.

Why would authorName be missing from a comment? Deleted accounts or heavily restricted profiles can leave author fields empty. If a comment has no extractable ID at all, it's skipped entirely.

Does the actor see deleted comments? No. Deleted comments are removed from LinkedIn's own response, so the actor only sees whatever is still live at scrape time.

How deep do reply threads go? Up to 3 levels via replyDepth, only when includeReplies is enabled. At each level the actor reads up to 10 replies per comment, and replies beyond the chosen depth aren't fetched.

Why did I get fewer comments than maxCommentsPerPost? The post may simply have fewer comments, minReactions/excludeAuthorTypes may have dropped some, or LinkedIn may serve that post's comments in a way that only exposes its first batch. Comments are not de-duplicated across different input URLs pointing to the same post.

Can I scrape comments on a post I don't have access to? No. Only posts visible to the account behind your cookie can be scraped — private or connection-restricted posts outside your network will fail.

Why is a cookie required for public-looking posts? LinkedIn's comment data isn't available through any unauthenticated public endpoint, even for posts that appear public in a browser without logging in.

What happens if my cookie expires mid-run? The run stops and adds a record with _status: "no_data" plus a _reason/_message/_help explanation; any comment rows saved before that point remain. Log into LinkedIn, copy a fresh li_at value, and start a new run.

Is this affiliated with LinkedIn? No. This is an independent tool and is not affiliated with, endorsed by, or sponsored by LinkedIn Corporation.