Linkedin Comment Scraper
Pricing
from $1.00 / 1,000 comment scrapeds
Linkedin Comment Scraper
Scrape comments and replies from LinkedIn posts. Supports pagination, filtering, and comprehensive data extraction.
Pricing
from $1.00 / 1,000 comment scrapeds
Rating
4.2
(3)
Developer
Capable Cauldron
Maintained by CommunityActor stats
5
Bookmarked
231
Total users
9
Monthly active users
5 days ago
Last modified
Categories
Share
Scrape LinkedIn post comments and replies from any post URL and export them as JSON, CSV or Excel. Each row has the commenter's name, headline, profile URL, the comment text and a timestamp. Paste one or more post links, say how many comments you want, and the Actor pages through the whole thread for you, replies included.
Before you start: LinkedIn only serves comments to a logged-in session, so this Actor needs your LinkedIn cookies. Exporting them takes two minutes (steps below). If you would rather not attach your main account, use a secondary one.
Built on Apify, so you can schedule runs, trigger them from the API or a webhook, push results to Google Sheets and route requests through rotating proxies without writing code. Click Try for free to open it in Console. Apify's free plan includes $5 of monthly credit, which buys about 4,500 comments.
See it run in 25 seconds:
What can LinkedIn Comment Scraper do?
- ๐ฌ Scrape comments and replies from any public LinkedIn post
- ๐ค Extract commenter name, headline, profile URL and profile ID for every comment
- ๐ Handle posts with hundreds of comments through automatic pagination
- ๐ Sort by Most Relevant or Most Recent
- ๐ Optionally skip the post author's own comments
- โฑ๏ธ Built-in rate limiting and retries so your session stays healthy
- ๐ธ Pay per comment, with a hard dataset cap that stops runaway spend
- ๐ค Export to CSV, Excel, JSON or XML, or pull results via API
What data can you extract from LinkedIn comments?
One row per comment or reply:
| Field | Description |
|---|---|
comment_id | LinkedIn's id for the comment |
comment_text | Full comment text |
comment_url | Direct link to the comment |
created_at | When it was posted (ISO 8601) |
commenter_name | Display name of the person who commented |
commenter_headline | Their LinkedIn headline, e.g. "Head of Growth at Acme" |
commenter_url | Their public profile URL |
commenter_profile_id | Stable profile identifier. Use it to de-duplicate people across posts |
is_author | true if the comment is by the post's author |
is_reply | true if this is a reply to another comment |
parent_comment_id | Id of the comment being replied to, or null |
post_url / post_id | The post the comment belongs to |
scraped_at | When this row was collected |
How to scrape LinkedIn comments
Step 1: Export your LinkedIn cookies
- Install the Cookie-Editor browser extension.
- Log in to LinkedIn in that browser.
- Open Cookie-Editor on any LinkedIn page and click Export, then JSON.
- The JSON is now on your clipboard. You will paste it into the Actor in the next step.
Cookies stay valid for about a week. When runs start failing with an auth error, export fresh ones.
Step 2: Run the Actor
- Click Try for free to open the Actor in Apify Console.
- Paste your LinkedIn post URLs, up to 100 per run.
- Paste the cookie JSON into LinkedIn cookies.
- Set Max comments per post. 50 is enough to see what the data looks like.
- Click Start. Comments stream into the dataset as each post is processed.
- Open the Storage tab and export as CSV, Excel or JSON, or fetch the dataset from the API.
How much does it cost to scrape LinkedIn comments?
Pricing is per event. There is no charge for compute time.
| Event | When it fires | Price |
|---|---|---|
comment-scraped | Each comment or reply added to your dataset | $0.001 |
post-processed | Each post that was read. A post that could not be opened is free | $0.01 |
Worked examples
- 50 comments from 2 posts costs $0.07
- 500 comments from 10 posts costs $0.60
- 5,000 comments from 50 posts costs $5.50
Apify's free plan ($5/month) covers roughly 4,500 comments. Nothing is charged on top. To cap spend, set maxCommentsPerPost and maxDatasetItems; the run stops as soon as either limit is hit.
You are never charged for a post that could not be read. If LinkedIn refuses your cookies, the run stops at the first post and costs nothing.
Input
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
postUrls | array | yes | โ | LinkedIn post URLs to scrape (max 100) |
cookies | string | yes | โ | Your LinkedIn session cookies as a JSON array (see Step 1) |
maxCommentsPerPost | integer | no | 10 | Comments to collect per post, 1โ1000. Replies count toward this |
commentsPerRequest | integer | no | 10 | Comments fetched per request, 1โ10. Lower is gentler on your session |
sortOrder | string | no | Most Relevant | Most Relevant or Most Recent |
excludeAuthorComments | boolean | no | false | Skip comments written by the post's author |
maxRetries | integer | no | 3 | Retries for a failed request, 0โ10 |
requestDelayMin | integer | no | 2 | Minimum seconds between requests |
requestDelayMax | integer | no | 5 | Maximum seconds between requests |
maxDatasetItems | integer | no | 10000 | Hard cap on rows saved across all posts |
{"postUrls": ["https://www.linkedin.com/posts/satyanadella_ai-activity-7300000000000000000-AbCd"],"cookies": "[{\"name\":\"li_at\",\"value\":\"...\"}, {\"name\":\"JSESSIONID\",\"value\":\"...\"}]","maxCommentsPerPost": 50,"sortOrder": "Most Relevant","excludeAuthorComments": false}
Output
Each comment is one dataset item. This is what the input above produces:
{"comment_id": "7393592608029110272","comment_text": "This is exactly where enterprise AI is heading. Great post.","comment_url": "https://www.linkedin.com/feed/update/urn:li:activity:7300000000000000000?commentUrn=urn%3Ali%3Acomment%3A(activity%3A7300000000000000000%2C7393592608029110272)","created_at": "2026-08-10T04:17:24.063000","commenter_name": "Jane Smith","commenter_headline": "VP Engineering at Acme Corp","commenter_url": "https://www.linkedin.com/in/janesmith","commenter_profile_id": "ACoAABLOV80BplFy...","is_author": false,"is_reply": false,"parent_comment_id": null,"post_url": "https://www.linkedin.com/posts/satyanadella_ai-activity-7300000000000000000-AbCd","post_id": "7300000000000000000","scraped_at": "2026-08-12T10:30:00.123456"}
A run summary is also saved to the key-value store as OUTPUT, and its message is shown as the run's status in Console:
{"status": "SUCCESS","reason": null,"posts_processed": 1,"total_posts": 1,"total_comments_scraped": 50,"pricing_model": "pay-per-event","message": "Collected 50 comments from 1 of 1 post.","posts": [{ "postUrl": "https://www.linkedin.com/posts/satyanadella_ai-activity-7300000000000000000-AbCd", "status": "OK", "comments": 50, "reason": null, "message": null }]}
status is SUCCESS, PARTIAL_SUCCESS (some posts could not be read), NO_RESULTS, STOPPED (LinkedIn refused the account, so the remaining posts were skipped) or VALIDATION_ERROR (a problem with the input). When something goes wrong, reason names it and message says what to do. Each entry in posts carries its own reason.
Use cases
- Lead generation. People commenting on a competitor's launch post are warm prospects. Export them with headline and profile URL straight into your CRM.
- Social listening. Track the conversation under your own company's posts, or under every post about your category.
- Audience research. See who engages with an industry voice and what they say before you write for the same audience.
- Content strategy. Compare comment volume and sentiment across your last 20 posts to learn what resonates.
- Event and webinar follow-up. Pull everyone who commented "interested" on the announcement post.
- Recruiting. Engineers who leave thoughtful comments on technical posts are a sourcing channel most recruiters skip.
API and integrations
Run it from your own code with the Apify API. Swap in your token and cookies; the Actor id stays as written.
Python
from apify_client import ApifyClientclient = ApifyClient("<YOUR_API_TOKEN>")run = client.actor("capable_cauldron/linkedin-comment-scraper").call(run_input={"postUrls": ["https://www.linkedin.com/posts/..."],"cookies": "<YOUR_COOKIE_JSON>","maxCommentsPerPost": 50,})for item in client.dataset(run["defaultDatasetId"]).iterate_items():print(item["commenter_name"], "-", item["comment_text"])
JavaScript
import { ApifyClient } from "apify-client";const client = new ApifyClient({ token: "<YOUR_API_TOKEN>" });const run = await client.actor("capable_cauldron/linkedin-comment-scraper").call({postUrls: ["https://www.linkedin.com/posts/..."],cookies: "<YOUR_COOKIE_JSON>",maxCommentsPerPost: 50,});const { items } = await client.dataset(run.defaultDatasetId).listItems();
CLI
$apify call capable_cauldron/linkedin-comment-scraper --input-file input.json --silent --output-dataset
Connect results to Google Sheets, HubSpot, Airtable, Slack, Make, Zapier or n8n from the Actor's Integrations tab, run it on a Schedule to monitor a post over time, or fire a webhook when a run finishes.
FAQ
Is it legal to scrape LinkedIn comments?
This Actor collects comments that are publicly visible on LinkedIn. You are responsible for how you use the data, including compliance with LinkedIn's terms of service and the data-protection laws that apply to you (GDPR, CCPA). Using cookies from your own account is your decision. LinkedIn may act on accounts that automate at high volume, so keep the default request delays and use a secondary account if in doubt.
Do I need a LinkedIn account?
Yes. LinkedIn does not show comments to anonymous visitors, so the Actor authenticates with your session cookies. No password is ever entered, only the cookie JSON you export.
How often do I need to refresh the cookies?
About once a week. When LinkedIn stops accepting them, the run ends early with the status "LinkedIn did not accept your cookies", and nothing is charged. Export a fresh set from Cookie-Editor and paste them in again. Runs on a Schedule need the cookies updated in the saved input.
Why did I get fewer comments than I asked for?
Either the post has fewer public comments than maxCommentsPerPost, excludeAuthorComments removed some, maxDatasetItems was reached across all posts, or a post could not be read. The run's status message says which, and the posts list in OUTPUT gives the reason for each post.
Why did my run stop early?
The status message tells you. The common ones:
| Message starts with | What to do |
|---|---|
| LinkedIn did not accept your cookies | Log in to LinkedIn and export fresh cookies |
| LinkedIn is asking this account to confirm it is you | Complete the check in your browser, then export fresh cookies |
| LinkedIn is temporarily limiting activity | Wait an hour, lower comments per request or raise the delays |
| LinkedIn refused to serve this account | Wait a few hours and keep the default delays |
In each case the run finishes normally and you are not charged for the posts it could not read.
What does "This post could not be opened" mean?
The post was deleted, made private, or is visible only to the author's connections. That post is skipped, not charged, and the rest of the run continues.
Which sort order should I use?
Most Relevant paginates through the full thread and is the default. Most Recent uses offset paging and is best for pulling the newest comments from a post you monitor on a schedule.
Can I scrape LinkedIn comments with Python?
Yes. See the Python snippet under API and integrations. The apify-client package is on PyPI; pass the same input you would use in Console.
How do I get the posts themselves, not just the comments?
Pair this Actor with LinkedIn Profile Posts Scraper. Scrape a profile's posts first (no cookies needed), then feed the post_url values into this Actor.
Other Actors by capable_cauldron
| Actor | What it does |
|---|---|
| LinkedIn Profile Posts Scraper | Every post from any LinkedIn profile with 55 enriched fields, no cookies needed |
| Multi-Channel Ad Intelligence | Competitor ads from the Meta, Google, LinkedIn and TikTok ad libraries in one normalized dataset |
| Investor Database Search | 145,000+ VCs, angels and family offices with partner emails, filtered by stage, industry and geography |
| TikTok Shop USA Scraper | TikTok Shop US products, shops, shoppable video stats and creator profiles in one run |
| LinkedIn Post Comments Scraper | Comments, replies and everyone who reacted on any LinkedIn post, no cookies needed |
Support
Found a bug or need a field that isn't here? Open an issue on the Actor's Issues tab. Issues are usually answered within 24 hours. If you need a custom version (reaction data, comment sentiment, a private deployment), describe it in an issue and we will scope it.
