AI Linkedin Post Scraper avatar

AI Linkedin Post Scraper

Pricing

from $0.01 / 1,000 results

Go to Apify Store
AI Linkedin Post Scraper

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

The Howlers

Maintained by Community

Actor stats

3

Bookmarked

67

Total users

25

Monthly active users

7 days ago

Last modified

Share

LinkedIn Post Scraper - Viral Content & Trending Topics

Scrape viral LinkedIn posts by hashtag, keyword, or profile. Find top-performing content for inspiration, voice training, and competitive research.

Before You Start (Read This First)

StepWhat to DoWhy
1Click Start with default settingsSee sample output (free, no setup needed)
2Decide your search modeSee "Which Mode Should I Use?" below
3Set up authentication if neededSome modes require cookies or API tokens

Demo Mode is ON by default. Your first run will return realistic sample data so you can preview the output format before setting up authentication.

Which Mode Should I Use?

ModeWhat It DoesAuth Required?Best For
autoCombines multiple methods automaticallyNo (uses residential proxies)Most users — start here
google_searchFinds LinkedIn posts indexed by GoogleNoFinding posts without cookies
profileScrapes a specific person's postsYes (cookies or OAuth token)Voice training, competitor analysis
hashtagGets posts from a specific hashtagYes (cookies)Trend research
keywordSearches posts by keywordYes (cookies)Topic research
feedScrapes your LinkedIn feedYes (cookies)Personal feed analysis

If you're not sure, use auto mode. It works without cookies.

Quick Start Examples

1. Demo Mode (Free, No Setup)

{
"demoMode": true
}

Returns sample viral posts so you can see the output format. No charges, no authentication needed.

2. Auto Mode (No Cookies Needed)

{
"searchType": "auto",
"hashtags": ["marketing", "leadership"],
"maxPostsPerSource": 20,
"demoMode": false
}

Uses residential proxies and multiple methods. No cookies or login required.

3. Google Search Mode (No Cookies Needed)

{
"searchType": "google_search",
"profileUsername": "garyvee",
"maxPostsPerSource": 20,
"demoMode": false
}

Finds LinkedIn posts indexed by Google. Good for specific people.

4. Profile Scraping (Requires Auth)

{
"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
}

5. Hashtag Scraping (Requires Cookies)

{
"searchType": "hashtag",
"hashtags": ["marketing", "AI", "leadership"],
"cookies": "[paste your cookies here]",
"maxPostsPerSource": 20,
"minLikes": 50,
"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:

  1. Install a cookie export extension in Chrome:
  2. Log into LinkedIn in your browser
  3. Click the cookie extension icon while on linkedin.com
  4. Click "Export" — this copies a JSON array to your clipboard
  5. Paste the JSON into the cookies field 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", ...}
]
  • 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 auto mode instead, or try residential proxies
  • "Redirected to login" error means cookies are expired. Re-export from your browser

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.

All Input Parameters

Search Settings

ParameterTypeDefaultDescription
demoModebooleantrueReturns sample data. Uncheck for real scraping.
searchTypestringautoHow to find posts: auto, google_search, profile, hashtag, keyword, feed
profileUrlstring-LinkedIn profile URL (for profile mode)
profileUsernamestring-LinkedIn username (for google_search mode)
hashtagsstring[]-Hashtags to search (for hashtag and auto modes)
keywordsstring[]-Keywords to search (for keyword mode)

Authentication (only for modes that require it)

ParameterTypeDescription
cookiesstringLinkedIn cookies as JSON array (see instructions above)
linkedinEmailstringLinkedIn email for auto-login (alternative to cookies)
linkedinPasswordstringLinkedIn password for auto-login
linkedinAccessTokenstringOAuth 2.0 token (most reliable method)

Filtering & Limits

ParameterTypeDefaultDescription
maxPostsPerSourcenumber50Max posts to scrape per hashtag/keyword
minLikesnumber100Only include posts with at least this many likes
minCommentsnumber10Only include posts with at least this many comments
sortBystringtoptop (most engagement) or recent (newest first)
timeFilterstringpast_weekpast_24h, past_week, past_month, or any
activityTypesstring[]["posts"]What to scrape: posts, articles, comments, or all

Enhanced Data (Optional)

ParameterTypeDefaultDescription
includeAuthorInfobooleantrueInclude author's followers, headline
includeCommentTextbooleanfalseScrape actual comment text (slower)
maxCommentsPerPostnumber10Max comments per post (1-50)
includeReactionsBreakdownbooleanfalseBreakdown by reaction type (like, celebrate, etc.)

AI Sentiment Analysis (Optional, BYOK)

ParameterTypeDefaultDescription
enableSentimentAnalysisbooleanfalseAnalyze tone and emotions with AI
aiProviderstringnoneopenai, anthropic, google, mistral, or cohere
aiApiKeystring-Your AI provider API key

Output Format

{
"posts": [
{
"id": "123",
"url": "https://linkedin.com/feed/update/...",
"text": "Post content...",
"likes": 1523,
"comments": 234,
"reposts": 89,
"postedAt": "2026-01-15T10:00:00Z",
"hashtags": ["leadership", "growth"],
"author": {
"name": "John Doe",
"headline": "CEO at Company",
"profileUrl": "https://linkedin.com/in/johndoe",
"followers": 50000
},
"hasImage": true,
"hasVideo": false,
"hasCarousel": false
}
],
"stats": {
"totalPosts": 150,
"avgLikes": 523,
"avgComments": 45,
"topAuthors": ["John Doe", "Jane Smith"],
"topHashtags": ["leadership", "growth", "mindset"]
}
}

Pricing (Pay-Per-Event)

EventPrice
Per post scraped$0.04
Demo modeFree

Example costs:

  • 20 posts: 20 x $0.04 = $0.80
  • 50 posts: 50 x $0.04 = $2.00
  • 100 posts with author info: 100 x $0.04 = $4.00

Troubleshooting

"I'm getting sample/demo data"

Demo Mode is ON by default. Uncheck Demo Mode 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:

  1. Re-export cookies from your browser (log into LinkedIn first)
  2. Switch to auto mode (no cookies needed)
  3. Use an OAuth token instead of cookies (most reliable)

"No posts found"

  • Check your hashtag/keyword spelling
  • Try a more popular hashtag like marketing or leadership
  • Lower minLikes to 0 to see all posts
  • Try timeFilter: "past_month" for a wider time range

LinkedIn sessions expire every few days. Re-export your cookies from your browser.

Actor runs but returns few posts

LinkedIn limits how many posts you can see. For better results:

  • Use auto or google_search mode (no cookie dependency)
  • Lower minLikes and minComments thresholds
  • Try sortBy: "recent" instead of "top"

"LinkedIn cookies are required"

You're using hashtag, keyword, or feed mode which requires authentication. Either:

  • Switch to auto or google_search mode (no cookies needed)
  • Follow the cookie export instructions above
  • Provide linkedinAccessToken for OAuth-based access

Use Cases

  • Content Inspiration — Find what's working in your niche before writing
  • Voice Training — Collect writing styles to train AI content generators
  • Trend Research — Track trending topics and content formats
  • Competitor Analysis — See what content performs best for competitors
  • Influencer Research — Analyze top creators' content strategies

Built by John Rippy | Actor Arsenal

2025 Zapier Automation Hero of the Year — Project Phoenix: A 95-step AI sales pipeline cutting development time by 50%.