Linkedin Comment Scraper avatar

Linkedin Comment Scraper

Pricing

from $1.00 / 1,000 comment scrapeds

Go to Apify Store
Linkedin Comment Scraper

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

Capable Cauldron

Maintained by Community

Actor stats

5

Bookmarked

231

Total users

9

Monthly active users

5 days ago

Last modified

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:

FieldDescription
comment_idLinkedIn's id for the comment
comment_textFull comment text
comment_urlDirect link to the comment
created_atWhen it was posted (ISO 8601)
commenter_nameDisplay name of the person who commented
commenter_headlineTheir LinkedIn headline, e.g. "Head of Growth at Acme"
commenter_urlTheir public profile URL
commenter_profile_idStable profile identifier. Use it to de-duplicate people across posts
is_authortrue if the comment is by the post's author
is_replytrue if this is a reply to another comment
parent_comment_idId of the comment being replied to, or null
post_url / post_idThe post the comment belongs to
scraped_atWhen this row was collected

How to scrape LinkedIn comments

linkedin comment scraper input form

Step 1: Export your LinkedIn cookies

  1. Install the Cookie-Editor browser extension.
  2. Log in to LinkedIn in that browser.
  3. Open Cookie-Editor on any LinkedIn page and click Export, then JSON.
  4. 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

  1. Click Try for free to open the Actor in Apify Console.
  2. Paste your LinkedIn post URLs, up to 100 per run.
  3. Paste the cookie JSON into LinkedIn cookies.
  4. Set Max comments per post. 50 is enough to see what the data looks like.
  5. Click Start. Comments stream into the dataset as each post is processed.
  6. 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.

EventWhen it firesPrice
comment-scrapedEach comment or reply added to your dataset$0.001
post-processedEach 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

FieldTypeRequiredDefaultDescription
postUrlsarrayyesโ€”LinkedIn post URLs to scrape (max 100)
cookiesstringyesโ€”Your LinkedIn session cookies as a JSON array (see Step 1)
maxCommentsPerPostintegerno10Comments to collect per post, 1โ€“1000. Replies count toward this
commentsPerRequestintegerno10Comments fetched per request, 1โ€“10. Lower is gentler on your session
sortOrderstringnoMost RelevantMost Relevant or Most Recent
excludeAuthorCommentsbooleannofalseSkip comments written by the post's author
maxRetriesintegerno3Retries for a failed request, 0โ€“10
requestDelayMinintegerno2Minimum seconds between requests
requestDelayMaxintegerno5Maximum seconds between requests
maxDatasetItemsintegerno10000Hard 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 ApifyClient
client = 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

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 withWhat to do
LinkedIn did not accept your cookiesLog in to LinkedIn and export fresh cookies
LinkedIn is asking this account to confirm it is youComplete the check in your browser, then export fresh cookies
LinkedIn is temporarily limiting activityWait an hour, lower comments per request or raise the delays
LinkedIn refused to serve this accountWait 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

ActorWhat it does
LinkedIn Profile Posts ScraperEvery post from any LinkedIn profile with 55 enriched fields, no cookies needed
Multi-Channel Ad IntelligenceCompetitor ads from the Meta, Google, LinkedIn and TikTok ad libraries in one normalized dataset
Investor Database Search145,000+ VCs, angels and family offices with partner emails, filtered by stage, industry and geography
TikTok Shop USA ScraperTikTok Shop US products, shops, shoppable video stats and creator profiles in one run
LinkedIn Post Comments ScraperComments, 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.