AI Linkedin Post Scraper
Pricing
from $0.01 / 1,000 results
AI Linkedin Post Scraper
Scrape viral/trending LinkedIn posts by hashtag or keyword search. Perfect for finding content inspiration and building a library of top-performing posts in your niche. Get top posts from any LinkedIn hashtag. Find posts matching specific keywords. Output formatted for AI voice analysis
Pricing
from $0.01 / 1,000 results
Rating
0.0
(0)
Developer
The Howlers
Actor stats
3
Bookmarked
87
Total users
18
Monthly active users
3 days ago
Last modified
Categories
Share
LinkedIn Post Scraper — Viral Content, Trending Topics & Voice Training
Scrape viral LinkedIn posts by hashtag, keyword, or profile. Find top-performing content for inspiration, voice training, and competitive research. 6 search modes, optional AI sentiment analysis, comment scraping, and reaction breakdowns. Uses Camoufox stealth browser with residential proxies.
Before You Start (Read This First)
| Step | What to Do | Why |
|---|---|---|
| 1 | Click Start with default settings | See sample output (free, no setup needed) |
| 2 | Pick your search mode | See decision tree below |
| 3 | Set up authentication if needed | Some modes require cookies or API tokens |
Demo Mode is ON by default. Your first run returns realistic sample data so you can preview the output format before setting up authentication. No charges, no cookies, no setup.
Which Mode Should I Use?
Do you have LinkedIn cookies or an OAuth token?├── NO → Use "auto" or "google_search" mode (no auth needed)│ ├── Want posts from a specific person? → google_search + profileUsername│ └── Want posts from hashtags/topics? → auto + hashtags│└── YES → You have full access to all modes├── Want posts from a specific person? → profile + profileUrl├── Want posts from a hashtag? → hashtag + hashtags├── Want posts by keyword search? → keyword + keywords└── Want your own feed? → feed
| Mode | What It Does | Auth Required? | Best For |
|---|---|---|---|
auto | Combines multiple methods automatically | No | Most users — start here |
google_search | Finds LinkedIn posts indexed by Google | No | Finding a specific person's posts without cookies |
profile | Scrapes a specific person's post history | Yes (cookies or OAuth) | Voice training, competitor deep-dive |
hashtag | Gets posts from specific hashtags | Yes (cookies) | Trend research, content inspiration |
keyword | Searches posts by keyword | Yes (cookies) | Topic research |
feed | Scrapes your personal LinkedIn feed | Yes (cookies) | Feed analysis |
If you're not sure, use auto mode. It works without cookies and tries 5 different methods automatically.
Quick Start Examples
1. Demo Mode (Free, Zero Setup)
{"demoMode": true}
Returns sample viral posts so you can test your integration. No charges, no cookies, no API keys.
2. Auto Mode — No Cookies Needed
{"searchType": "auto","hashtags": ["marketing", "leadership"],"maxPostsPerSource": 20,"demoMode": false}
Uses residential proxies and multiple scraping methods. Best starting point for real scraping.
3. Google Search Mode — Find Anyone's Posts
{"searchType": "google_search","profileUsername": "garyvee","maxPostsPerSource": 20,"demoMode": false}
Finds LinkedIn posts indexed by Google. No cookies needed. Good for researching specific creators.
4. Profile Scraping — Full Post History
{"searchType": "profile","profileUrl": "https://www.linkedin.com/in/garyvee/","cookies": "[paste your cookies here — see auth section below]","maxPostsPerSource": 50,"activityTypes": ["posts", "articles"],"demoMode": false}
Scrapes a person's full post history including articles and comments. Requires authentication.
5. Hashtag Research — Trending Content
{"searchType": "hashtag","hashtags": ["marketing", "AI", "leadership"],"cookies": "[paste your cookies here]","maxPostsPerSource": 20,"minLikes": 50,"sortBy": "top","demoMode": false}
6. With AI Sentiment Analysis
{"searchType": "auto","hashtags": ["leadership"],"maxPostsPerSource": 10,"enableSentimentAnalysis": true,"aiProvider": "anthropic","aiApiKey": "sk-ant-...","demoMode": false}
Each post gets tone analysis, emotional triggers, persuasion techniques, and target emotions. Works with OpenAI, Anthropic, Google, Mistral, or Cohere.
7. With Webhook Delivery
{"searchType": "auto","hashtags": ["startup"],"maxPostsPerSource": 20,"webhookUrl": "https://hooks.zapier.com/hooks/catch/123456/abcdef/","webhookPlatform": "zapier","demoMode": false}
How to Get LinkedIn Cookies (When Required)
Only needed for profile, hashtag, keyword, and feed modes. Skip this if using auto or google_search.
Step-by-Step:
- Install a cookie export extension in Chrome:
- EditThisCookie (recommended)
- Or any "Export Cookies" extension
- Log into LinkedIn in your browser
- Click the cookie extension icon while on linkedin.com
- Click "Export" — this copies a JSON array to your clipboard
- Paste the JSON into the
cookiesfield in this actor
The exported cookies should look like this:
[{"name": "li_at", "value": "AQED...", "domain": ".linkedin.com", ...},{"name": "JSESSIONID", "value": "ajax:123...", "domain": ".linkedin.com", ...}]
Cookie Tips:
- Cookies expire after a few days — you'll need to re-export them
- Cookies are IP-locked — they may not work from Apify's servers. Use
automode instead, or try residential proxies - "Redirected to login" error means cookies are expired. Re-export from your browser
- The actor validates your cookies before scraping and will tell you if they're expired
Alternative: LinkedIn OAuth Token (Most Reliable)
If you have a LinkedIn Developer App with w_member_social permission:
{"searchType": "profile","profileUrl": "https://www.linkedin.com/in/username/","linkedinAccessToken": "your-oauth-token-here","demoMode": false}
OAuth tokens work from any IP and don't expire as quickly as cookies. This is the most reliable authentication method.
Cookie Manager Integration (Recommended)
Instead of manually exporting cookies, use the Cookie Manager actor to capture and store cookies automatically.
Step 1: Run Cookie Manager once
Run the Cookie Manager actor with:
- Mode:
capture - Platform:
linkedin - Storage Key:
linkedin-yourname
Step 2: Use the stored cookies
In this actor, just set cookieStorageKey to the same key:
{"searchType": "profile","profileUrl": "https://www.linkedin.com/in/someone/","cookieStorageKey": "linkedin-yourname","demoMode": false}
No manual cookie paste needed. Schedule Cookie Manager to run every 3 days to keep cookies fresh.
How it works
- Cookie Manager logs into LinkedIn and saves session cookies to a named Key-Value Store (
cookie-sessionsby default) - This actor reads cookies from that store using your
cookieStorageKey - If the Cookie Manager key has no cookies or the store doesn't exist, the actor falls back to any manually provided cookies or cookie-free modes
Custom store name
If you changed the Key-Value Store name in Cookie Manager, pass it here too:
{"searchType": "profile","profileUrl": "https://www.linkedin.com/in/someone/","cookieStorageKey": "linkedin-yourname","cookieKvStoreName": "my-custom-store","demoMode": false}
All Input Parameters
Search Settings
| Parameter | Type | Default | Description |
|---|---|---|---|
demoMode | boolean | true | Returns sample data. Uncheck for real scraping. |
searchType | string | auto | How to find posts: auto, google_search, profile, hashtag, keyword, feed |
profileUrl | string | — | LinkedIn profile URL (for profile mode) |
profileUsername | string | — | LinkedIn username e.g. "garyvee" (for google_search mode) |
hashtags | string[] | — | Hashtags to search (for hashtag and auto modes) |
keywords | string[] | — | Keywords to search (for keyword mode) |
Authentication (only for modes that require it)
| Parameter | Type | Description |
|---|---|---|
cookies | string | LinkedIn cookies as JSON array (see instructions above) |
cookieStorageKey | string | Storage key from Cookie Manager actor (e.g., linkedin-john). Loads cookies automatically |
cookieKvStoreName | string | KV Store name used by Cookie Manager. Default: cookie-sessions |
linkedinEmail | string | LinkedIn email for auto-login (alternative to cookies) |
linkedinPassword | string | LinkedIn password for auto-login |
linkedinAccessToken | string | OAuth 2.0 token (most reliable method) |
linkedinClientId | string | Client ID from LinkedIn Developer App (for OAuth flow) |
linkedinClientSecret | string | Client Secret from LinkedIn Developer App (for OAuth flow) |
Filtering & Limits
| Parameter | Type | Default | Description |
|---|---|---|---|
maxPostsPerSource | number | 50 | Max posts to scrape per hashtag/keyword |
minLikes | number | 100 | Only include posts with at least this many likes |
minComments | number | 10 | Only include posts with at least this many comments |
sortBy | string | top | top (most engagement) or recent (newest first) |
timeFilter | string | past_week | past_24h, past_week, past_month, or any |
activityTypes | string[] | ["posts"] | What to scrape: posts, articles, comments, or all |
Enhanced Data (Optional)
| Parameter | Type | Default | Description |
|---|---|---|---|
includeAuthorInfo | boolean | true | Include author's followers, headline, profile picture |
includeCommentText | boolean | false | Scrape actual comment text (slower, more data) |
maxCommentsPerPost | number | 10 | Max comments per post when comment scraping is on (1-50) |
includeReactionsBreakdown | boolean | false | Get breakdown by reaction type (like, celebrate, support, love, insightful, funny) |
AI Sentiment Analysis (Optional, Bring Your Own Key)
| Parameter | Type | Default | Description |
|---|---|---|---|
enableSentimentAnalysis | boolean | false | Analyze tone, emotions, and persuasion techniques with AI |
aiProvider | string | none | openai, anthropic, google, mistral, or cohere |
aiApiKey | string | — | Your AI provider API key (you pay the AI provider directly) |
aiModel | string | — | Override the default model for your provider (optional) |
Webhook Integration
| Parameter | Type | Default | Description |
|---|---|---|---|
webhookUrl | string | — | URL to POST results when scraping completes |
webhookPlatform | string | custom | zapier, make, n8n, or custom — formats payload for each platform |
webhookHeaders | object | — | Custom headers to include in webhook request |
Output Format
Each run produces an array of posts plus aggregate statistics:
{"id": "7281234567890123456","url": "https://www.linkedin.com/feed/update/urn:li:activity:7281234567890123456","text": "🚀 The #1 lesson I learned after 10 years in tech:\n\nIt's not about the code...","likes": 15234,"comments": 892,"reposts": 345,"postedAt": "2026-01-15T10:00:00.000Z","source": "marketing","hashtags": ["leadership", "growth", "marketing"],"contentType": "text","hasImage": false,"hasVideo": false,"hasCarousel": false,"hasDocument": false,"hasPoll": false,"activityType": "post","author": {"name": "Sarah Chen","headline": "CEO at TechStartup | Forbes 30 Under 30","profileUrl": "https://www.linkedin.com/in/sarahchen/","followers": 125000,"profilePicUrl": "https://media.licdn.com/..."},"commentsList": [{"author": "John Doe","authorHeadline": "VP Marketing","text": "This is so true! The soft skills matter more than the hard skills.","likes": 45,"timestamp": "2 hours ago"}],"reactionsBreakdown": {"total": 15234,"like": 8500,"celebrate": 3200,"support": 1800,"love": 1200,"insightful": 400,"funny": 134},"sentiment": {"score": 0.85,"label": "positive","confidence": 0.92,"summary": "Inspirational tech leadership post with personal storytelling","tone": "inspirational","emotionalTriggers": ["aspiration", "curiosity", "social_proof"],"persuasionTechniques": ["storytelling", "authority", "vulnerability"],"targetEmotions": ["inspired", "motivated", "curious"]}}
Stats Object (included in every run)
{"totalPosts": 150,"avgLikes": 523,"avgComments": 45,"avgReposts": 28,"topAuthors": [{ "name": "Sarah Chen", "postCount": 8, "avgLikes": 12500 }],"topHashtags": [{ "tag": "leadership", "count": 45 }],"contentTypeBreakdown": {"text": 65,"image": 42,"carousel": 23,"video": 15,"document": 5}}
Pricing (Pay-Per-Event)
| Event | Description | Price |
|---|---|---|
post_scraped | Per LinkedIn post scraped | $0.04 |
Example costs:
- 20 posts: $0.80
- 50 posts: $2.00
- 100 posts with author info: $4.00
- Demo mode: $0.00
Comments, reactions breakdown, and author info are included in the per-post price (no extra charge). AI sentiment analysis uses your own API key — you pay the AI provider directly.
Use Cases
Content Inspiration
Find what's working in your niche before writing. See which hooks, formats, and topics get the most engagement.
Voice Training / AI Writing
Collect writing samples from specific creators to train AI content generators. Use profile mode with activityTypes: ["posts", "articles"].
Trend Research
Track trending topics and content formats across hashtags. Compare engagement across different themes.
Competitor Analysis
See what content performs best for competitors. Analyze their posting cadence, content types, and engagement patterns.
Influencer Research
Analyze top creators' content strategies. Compare engagement rates, content types, and audience reactions.
Lead Generation
Find decision makers who engage with specific topics. Enable includeCommentText to see who's commenting on relevant posts.
Content Calendar Planning
Analyze timeDistribution in stats to find optimal posting times. Study which content types work best on which days.
Troubleshooting
"I'm getting sample/demo data"
Demo Mode is ON by default. Uncheck Demo Mode (set demoMode: false) to scrape real posts. You may also need to provide cookies or use auto/google_search mode.
"Redirected to login" or "auth wall" error
Your cookies are expired or IP-locked. Options:
- Re-export cookies from your browser (log into LinkedIn first)
- Switch to
automode — works without cookies - Use an OAuth token instead of cookies (most reliable)
"No posts found"
- Check your hashtag/keyword spelling (no # symbol needed)
- Try a more popular hashtag like
marketingorleadership - Lower
minLikesto0to see all posts - Try
timeFilter: "past_month"for a wider time range - Try
sortBy: "recent"instead of"top"
"Session expired" or cookie errors
LinkedIn sessions expire every few days. Re-export your cookies from your browser. The actor validates cookies before scraping and will tell you exactly what's wrong.
Actor runs but returns few posts
LinkedIn limits how many posts you can see. For better results:
- Use
automode (tries 5 different scraping methods) - Use
google_searchmode (no cookie dependency) - Lower
minLikesandminCommentsthresholds - Set
timeFilter: "any"for maximum results
"LinkedIn cookies are required"
You're using hashtag, keyword, or feed mode which requires authentication. Either:
- Switch to
autoorgoogle_searchmode (no cookies needed) - Follow the cookie export instructions above
- Provide
linkedinAccessTokenfor OAuth-based access
AI Sentiment not working
- Make sure
enableSentimentAnalysisistrue - Provide a valid
aiApiKeyfor your chosenaiProvider - Supported providers:
openai,anthropic,google,mistral,cohere
Technical Details
- Browser: Camoufox stealth browser (C++ level fingerprinting) with standard browser fallback
- Crawler: Crawlee PlaywrightCrawler with automatic retries
- Proxy: Apify residential proxies for anti-detection
- Rate Limiting: Human-like delays between actions (50-100ms typing, 1.5-2s scrolling, random mouse movements)
- Authentication: 5 methods in priority order — OAuth token → session-based proxy login → Voyager API → browser scraping → Google search fallback
- Cookie Validation: Validates cookies before scraping, provides clear error messages if expired
- Session Management: Sticky IP sessions for cookie-based scraping (same proxy IP for entire session)
- Memory: 4 GB default
- Timeout: 5 minutes default, recommended 10 minutes for large scrapes (100+ posts)
FAQ
Q: Do I need a LinkedIn Premium account?
A: No. The actor works with a free LinkedIn account. Premium may give access to more posts in search results, but it's not required.
Q: How often do cookies expire?
A: LinkedIn cookies typically last 2-7 days. If you see "redirected to login" errors, re-export your cookies. For a more stable solution, use OAuth tokens or auto mode.
Q: Can I scrape posts from any LinkedIn profile?
A: You can scrape public profiles without authentication using google_search mode. For private profiles or full post history, you need cookies or an OAuth token.
Q: Will this get my LinkedIn account banned?
A: The actor uses residential proxies, human-like delays, and stealth browser technology to minimize detection risk. However, scraping large volumes (1000+ posts) from a single account may trigger LinkedIn's rate limits. Use reasonable limits and multiple search sources.
Q: Can I schedule recurring runs?
A: Yes. Use Apify's built-in scheduling to run daily, weekly, or at custom intervals. Combine with webhooks to auto-deliver results to your CRM, spreadsheet, or automation tool.
Q: How accurate is the sentiment analysis?
A: Sentiment analysis quality depends on your AI provider. Claude (Anthropic) and GPT-4 (OpenAI) produce the best results. The analysis includes emotional triggers, persuasion techniques, and target emotions — inspired by the Foreplay ad analysis framework.
Support
- Actor Arsenal: Full Actor Catalog
- Developer: John Rippy
Built by John Rippy | Actor Arsenal