LinkedIn Comments Scraper avatar

LinkedIn Comments Scraper

Pricing

from $3.00 / 1,000 results

Go to Apify Store
LinkedIn Comments Scraper

LinkedIn Comments Scraper

Scrape comments and replies from any LinkedIn post. Get comment text, author details, timestamps, and engagement metrics.

Pricing

from $3.00 / 1,000 results

Rating

0.0

(0)

Developer

Crawler Bros

Crawler Bros

Maintained by Community

Actor stats

0

Bookmarked

1

Total users

0

Monthly active users

19 hours ago

Last modified

Share

Extract comments and replies from any LinkedIn post at scale. Get full author details, comment text, timestamps, and engagement metrics — exported as clean structured data.

What This Actor Does

LinkedIn Comments Scraper fetches comments from one or more LinkedIn post URLs using LinkedIn's official Voyager API. For each comment it returns the author's name, profile URL, headline, comment text, timestamp, and reaction count. Optionally, it also fetches replies to top-level comments and links each reply back to its parent via parentCommentId.

Key features:

  • Scrapes comments from /feed/update/ and /posts/ URL formats
  • Fetches up to 500 top-level comments per post
  • Optionally retrieves replies (nested comments) as separate dataset rows
  • Automatically paginates through all available comments
  • Works without a browser — pure HTTP via LinkedIn's Voyager API

Input

FieldTypeRequiredDescription
postUrlsstring[]YesOne or more LinkedIn post URLs to scrape. Supports both /feed/update/urn:li:activity:…/ and /posts/username_slug-ID/ formats.
cookiestringYesYour LinkedIn session cookie (li_at). See setup instructions below.
maxCommentsPerPostintegerNoMaximum top-level comments to scrape per post. Default: 50. Range: 1–500.
includeRepliesbooleanNoSet true to also fetch replies to top-level comments. Default: false.
proxyConfigurationobjectNoApify proxy settings. Residential proxy recommended for best reliability.

Accepted Post URL Formats

https://www.linkedin.com/feed/update/urn:li:activity:7329761432933134337/
https://www.linkedin.com/posts/williamhgates_climate-7329761432933134337/

Output

Each scraped comment is a separate dataset row. Replies (when includeReplies is enabled) are also individual rows, identified by isReply: true.

FieldTypeDescription
commentIdstringUnique numeric comment ID extracted from LinkedIn's internal URN.
postUrlstringCanonical URL of the source post (query strings stripped).
postIdstringNumeric activity ID of the source post.
authorNamestringFull name of the commenter.
authorProfileUrlstringFull URL to the commenter's LinkedIn profile.
authorHeadlinestringThe commenter's LinkedIn headline/job title.
authorAvatarstringCDN URL of the commenter's profile photo.
commentTextstringFull text of the comment.
commentedAtstringISO 8601 UTC timestamp when the comment was posted.
reactionsCountintegerTotal number of reactions on this comment.
repliesCountintegerNumber of replies on this comment (only on top-level comments).
isReplybooleantrue if this row is a reply to another comment; false for top-level.
parentCommentIdstringcommentId of the parent comment (only present when isReply is true).
scrapedAtstringISO 8601 UTC timestamp when this record was scraped.

Example Output — Top-Level Comment

{
"commentId": "7330000000000000001",
"postUrl": "https://www.linkedin.com/feed/update/urn:li:activity:7329761432933134337/",
"postId": "7329761432933134337",
"authorName": "Jane Doe",
"authorProfileUrl": "https://www.linkedin.com/in/janedoe/",
"authorHeadline": "VP of Product at TechCorp",
"authorAvatar": "https://media.licdn.com/dms/image/D4E03AQGexample/profile-displayphoto.jpg",
"commentText": "This is such an insightful post! Thanks for sharing.",
"commentedAt": "2024-11-14T22:13:20+00:00",
"reactionsCount": 12,
"repliesCount": 3,
"isReply": false,
"scrapedAt": "2024-11-15T09:00:00+00:00"
}

Example Output — Reply

{
"commentId": "7330000000000000002",
"postUrl": "https://www.linkedin.com/feed/update/urn:li:activity:7329761432933134337/",
"postId": "7329761432933134337",
"authorName": "John Smith",
"authorProfileUrl": "https://www.linkedin.com/in/johnsmith/",
"authorHeadline": "Software Engineer",
"commentText": "Totally agree with Jane!",
"commentedAt": "2024-11-14T23:45:00+00:00",
"reactionsCount": 2,
"isReply": true,
"parentCommentId": "7330000000000000001",
"scrapedAt": "2024-11-15T09:00:01+00:00"
}

The actor authenticates using your LinkedIn session cookie. This is a secure, read-only token that does not expose your password.

Steps to get your li_at cookie:

  1. Log into LinkedIn in your browser.
  2. Open DevTools (F12 or right-click → Inspect).
  3. Go to ApplicationCookieshttps://www.linkedin.com.
  4. Find the cookie named li_at and copy its value.
  5. Paste this value into the cookie input field.

Alternatively — full cookie export:

If you use a browser extension like EditThisCookie, you can export all cookies as a JSON array and paste that directly. The actor will automatically extract li_at from the array.

Note: Keep your li_at cookie private. It grants read access to your LinkedIn account. Do not share it with anyone.


Using includeReplies

When includeReplies is set to true, the actor fetches replies for every top-level comment that has at least one reply. Each reply is pushed to the dataset as a separate row with isReply: true and a parentCommentId field pointing back to its parent comment.

Example input with replies:

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

With this configuration, a post that has 20 top-level comments — where 5 of them have 3 replies each — will produce 20 + 15 = 35 dataset rows.


Frequently Asked Questions

Why do some comments have no authorName? Deleted accounts or very restricted privacy settings may result in comments with empty author fields. The actor skips any record that cannot be assigned a unique commentId.

What happens to deleted comments? LinkedIn removes deleted comments from the API response. The actor only sees what LinkedIn's API returns at the time of scraping.

Are anonymous comments supported? LinkedIn does not allow truly anonymous comments — all commenters have a profile. However, some users may have private profiles, in which case the author name will still be returned but authorHeadline or authorAvatar may be absent.

How many comments can I scrape? The LinkedIn Comments API returns up to 500 top-level comments per post (controlled by maxCommentsPerPost). Replies are fetched one page (up to 10 replies) per top-level comment by default.

Will the actor get rate-limited? The actor uses polite delays between API calls. For large scraping jobs (many posts or very high maxCommentsPerPost), using a residential proxy is recommended to avoid LinkedIn's rate limiting.

Can I scrape comments from private posts? No. The actor uses your li_at cookie, so it can only access posts visible to your LinkedIn account. Posts from connections or public posts work best.

Why is a cookie required? LinkedIn's Voyager API requires authentication for all endpoints — including public post comments. There is no publicly accessible unauthenticated API for this data.

My cookie stopped working — what should I do? LinkedIn session cookies (li_at) typically expire after several weeks or when you log out. Simply log back into LinkedIn, copy your new li_at value, and update the actor input.


Tips for Best Results

  • Use residential proxy: LinkedIn is more likely to rate-limit datacenter IP ranges. Enabling residential proxy in proxyConfiguration significantly improves reliability.
  • Batch multiple posts: Pass multiple URLs in postUrls to scrape them in one run.
  • Start with includeReplies: false: For posts with many comments, fetching replies multiplies the number of API calls. Enable it only when you need the reply data.
  • Fresh cookie: Use a cookie obtained within the last few days for best reliability.

Explore the rest of the LinkedIn suite

Need a different LinkedIn surface? Pair this actor with any of the others in the LinkedIn Suite — all published under the same publisher and built to share the same cookie format and output conventions.

ActorWhat it scrapes
LinkedIn Company Employees ScraperEmployee list for any company (by URN)
LinkedIn Company Info ScraperCompany About page (size, HQ, industry, specialties)
LinkedIn Company Posts ScraperPosts published from a company page
LinkedIn Events ScraperEvents by keyword/URL with full event detail
LinkedIn Hashtag Posts ScraperPosts ranked under a #hashtag
LinkedIn Jobs ScraperJob listings via the public jobs-guest API
LinkedIn Jobs Scraper UltraSame as jobs-scraper + full detail enrichment
LinkedIn Learning Courses ScraperLinkedIn Learning course catalog by keyword
LinkedIn People Search ScraperPeople search with every LinkedIn facet (role, company, school, location, etc.)
LinkedIn Post Reactions ScraperReactors on a post (name, headline, reaction type)
LinkedIn Post ScraperFull post (text, media, engagement counts, author)
LinkedIn Post Search ScraperPosts matching a keyword (with date/author/network filters)
LinkedIn Profile Posts ScraperAll posts/reposts/articles for one profile
LinkedIn Profile ScraperPublic profile fields (name, headline, positions, education, skills)
LinkedIn Profile Scraper ProProfile fields + extras (recommendations, organizations, languages)
LinkedIn Profile Scraper Pro UltraPro + premium fields (contact info, followers list when allowed)
LinkedIn Profile Scraper UltraProfile + the full upstream dash-120 surface
LinkedIn Profile Search by NameSearch profiles by person name (great for matching CSVs of names)
LinkedIn Schools Alumni ScraperAlumni list for any LinkedIn school page
LinkedIn Top Content ScraperTrending / top-engagement posts by topic
LinkedIn User Activity ScraperReactions + comments + posts feed for one profile

All actors share the same cookie input format (plain li_at OR full cookies JSON array) and the same omit-empty output convention.