Linkedin Comment Scraper
Pricing
Pay per event
Linkedin Comment Scraper
Scrape comments and replies from LinkedIn posts. Supports pagination, filtering, and comprehensive data extraction.
3.5 (3)
Pricing
Pay per event
0
57
20
Issues response
24 days
Last modified
2 months ago
๐ LinkedIn Comment Scraper
Extract comments and replies from LinkedIn posts quickly and easily! Perfect for market research, lead generation, and social media analysis.
โจ What This Tool Does
- Scrapes all comments from LinkedIn posts (including replies)
- Extracts user details like names, headlines, and profile links
- Handles large posts with hundreds of comments automatically
- Works in two modes: Traditional batch processing or real-time API
- Built-in rate limiting to avoid LinkedIn blocks
๐ฏ Perfect For
- Lead Generation: Find potential customers commenting on competitor posts
- Market Research: Analyze audience reactions and feedback
- Content Strategy: See what resonates with your target audience
- Competitor Analysis: Monitor engagement on industry posts
- Social Listening: Track conversations around your brand or topics
๐ How to Use
Step 1: Get Your LinkedIn Cookies
- Install Cookie Editor: Get it from Chrome Web Store
- Login to LinkedIn in your browser
- Open Cookie Editor (click the extension icon)
- Click "JSON" button in the Export As section
- Copy the JSON data and paste it into the "LinkedIn Cookies" field
Step 2: Choose Your Method
Option A: Standard Method (Recommended)
- Go to Apify Console and find your LinkedIn Comment Scraper Actor
- Configure the input with your settings:
{"postUrls": ["https://www.linkedin.com/posts/example-post"],"maxCommentsPerPost": 50,"cookies": "[{\"name\":\"li_at\",\"value\":\"YOUR_COOKIE_VALUE\"}]"}
- Click "Start" and wait for the scraper to finish
- Download results as Excel, CSV, or JSON from the dataset
Option B: Use the API (in-progress)
Send a POST request to the /scrape
endpoint:
curl -X POST "https://your-actor.apify.actor/scrape" \-H "Content-Type: application/json" \-H "Authorization: Bearer YOUR_API_TOKEN" \-d '{"postUrls": ["https://www.linkedin.com/posts/example-post"],"maxCommentsPerPost": 50,"cookies": "[{\"name\":\"li_at\",\"value\":\"YOUR_COOKIE_VALUE\"}]"}'
๐ Input Parameters
Parameter | Type | Required | Default | Description |
---|---|---|---|---|
postUrls | Array | โ Yes | - | LinkedIn post URLs to scrape |
maxCommentsPerPost | Number | No | 10 | Max comments per post (1-1000) |
commentsPerRequest | Number | No | 10 | Comments per API request (1-10) |
sortOrder | String | No | "Most Relevant" | "Most Relevant" or "Most Recent" |
excludeAuthorComments | Boolean | No | false | Skip comments from post author |
cookies | String | โ Yes | - | LinkedIn session cookies (JSON format) |
๐ค Response Format
{"status": "success","timestamp": "2025-01-15T10:30:00Z","results": {"posts_processed": 1,"total_comments": 25,"comments": [{"comment_id": "urn:li:comment:123","comment_text": "Great insights!","commenter_name": "John Doe","commenter_headline": "Software Engineer","commenter_url": "https://linkedin.com/in/johndoe","created_at": "2025-01-15T09:15:00Z","is_reply": false,"post_url": "https://linkedin.com/posts/...","scraped_at": "2025-01-15T10:30:00Z"}]},"pricing": {"comments_charged": 25,"posts_charged": 1,"total_cost_usd": 0.035}}
๐ฐ Pricing
Pay-Per-Event pricing:
- $0.001 per comment scraped (including replies)
- $0.01 per post processed
Example costs:
- 50 comments from 2 posts = $0.07
- 100 comments from 5 posts = $0.15
โก Performance Tips
- Use 1-3 posts per request for optimal speed
- Request 10-50 comments per post for best balance
- Fresh cookies (update weekly) for best performance
- Use "Most Relevant" sort for full pagination support
๐ก๏ธ Built-in Protection
- Smart rate limiting prevents LinkedIn blocks
- Automatic retries handle temporary failures
- 4-minute timeout prevents hanging requests
- Error handling with helpful suggestions
๐ง Troubleshooting
"No comments found": Check if post has public comments and cookies are valid
"Authentication failed": LinkedIn cookies may have expired - get fresh ones
"Request timed out": Try reducing maxCommentsPerPost
or number of posts
๐ Need Help?
- Check that LinkedIn cookies are fresh (less than a week old)
- Verify post URLs are correct and publicly accessible
- Try with fewer comments first to test
Happy scraping! ๐
On this page
Share Actor: