LinkedIn Profile Scraper - Real Data Extractor avatar
LinkedIn Profile Scraper - Real Data Extractor

Pricing

Pay per event

Go to Apify Store
LinkedIn Profile Scraper - Real Data Extractor

LinkedIn Profile Scraper - Real Data Extractor

Developed by

personal

personal

Maintained by Community

Extract 100% real data from LinkedIn profiles and company pages - followers, connections, posts, engagement metrics, and intelligent analysis. Cookie-based authentication.

0.0 (0)

Pricing

Pay per event

0

2

2

Last modified

6 hours ago

LinkedIn Profile Scraper - Complete Guide

A production-ready Apify actor that scrapes REAL, ACCURATE data from LinkedIn profiles and company pages using cookie authentication. Every single metric is scraped directly from the profile - no estimates, no AI generation.

βœ… What This Actor Scrapes (100% Real Data)

For Personal Profiles:

  • Profile Information
    • Full name
    • Headline
    • Location
    • About section (complete text)
    • Exact follower count
    • Exact connection count (e.g., 500+ or actual number if visible)
  • Professional Experience
    • Job titles
    • Companies
    • Duration for each position
  • Education
    • Schools attended
    • Degrees obtained
    • Years attended
  • Skills
    • All listed skills
    • Endorsement counts for each skill

For Company Pages:

  • Company name
  • Tagline
  • Complete description
  • Website URL
  • Industry
  • Company size
  • Headquarters location
  • Founded year
  • Specialties
  • Exact follower count
  • Number of employees on LinkedIn

For All Profiles (Posts & Engagement):

  • Total counts (scraped, not estimated):

    • Total number of posts
    • Total likes across all posts
    • Total comments across all posts
    • Total reposts/shares
  • Averages (calculated from real data):

    • Average likes per post
    • Average comments per post
    • Average reposts per post
  • Top 3 Posts (by engagement):

    • Post content (first 300 characters)
    • Timestamp
    • Exact like count
    • Exact comment count
    • Exact repost count
    • Whether post has media
    • Engagement score

Analysis (Based on Real Data):

  • Account type (Company/Personal)
  • Strengths (data-driven)
  • Weaknesses (data-driven)
  • Collaboration opportunities
  • Engagement quality assessment
  • Content strategy recommendations
  • Overall score (0-100)
  • Performance rating

πŸš€ Step-by-Step Deployment to Apify

Step 1: Prepare Your Files

  1. Download all the files from this project:

    • src/main.js
    • src/profileScraper.js
    • src/postScraper.js
    • src/activityScraper.js
    • src/analyzer.js
    • package.json
    • Dockerfile
    • .actor/actor.json
    • .actor/input_schema.json
  2. Create this folder structure:

    linkedin-scraper/
    β”œβ”€β”€ src/
    β”‚ β”œβ”€β”€ main.js
    β”‚ β”œβ”€β”€ profileScraper.js
    β”‚ β”œβ”€β”€ postScraper.js
    β”‚ β”œβ”€β”€ activityScraper.js
    β”‚ └── analyzer.js
    β”œβ”€β”€ .actor/
    β”‚ β”œβ”€β”€ actor.json
    β”‚ └── input_schema.json
    β”œβ”€β”€ package.json
    β”œβ”€β”€ Dockerfile
    └── README.md

Step 2: Create Apify Account

  1. Go to https://apify.com/
  2. Sign up for a free account
  3. Verify your email

Step 3: Create New Actor

  1. Log into Apify Console
  2. Click "Actors" in the left sidebar
  3. Click "Create new" button (top right)
  4. Choose "From scratch"
  5. Enter actor name: linkedin-profile-scraper
  6. Click "Create"

Step 4: Upload Files

Option A: Using Git (Recommended)

  1. Initialize git in your project folder:
    git init
    git add .
    git commit -m "Initial commit"
  2. In Apify Console, go to your actor's "Source" tab
  3. Click "Connect GitHub" or "Connect GitLab"
  4. Push your code to the repository
  5. The actor will auto-build

Option B: Using Apify CLI

  1. Install Apify CLI:
    $npm install -g apify-cli
  2. Login to Apify:
    $apify login
  3. Navigate to your project folder:
    $cd linkedin-scraper
  4. Push to Apify:
    $apify push

Option C: Manual Upload

  1. In Apify Console, go to your actor's "Source" tab
  2. Select "Source files" tab
  3. Manually create each file and copy/paste the content
  4. Make sure to maintain the folder structure

Step 5: Build the Actor

  1. After uploading files, click "Build" button (top right)
  2. Wait for build to complete (usually 2-3 minutes)
  3. Check the build log for any errors
  4. If successful, you'll see "Build succeeded"

πŸ”‘ How to Get LinkedIn Cookies

LinkedIn requires authentication to view profile data. Here's how to get your cookies:

Method 1: Using Browser DevTools (Chrome)

  1. Login to LinkedIn in Chrome

  2. Press F12 to open DevTools

  3. Go to "Application" tab

  4. In the left sidebar, expand "Cookies"

  5. Click on https://www.linkedin.com

  6. You'll see all cookies - you need to export these important ones:

    • li_at (most important - session token)
    • JSESSIONID
    • li_a
    • Any other cookies you see
  7. For each cookie, note down:

    • Name
    • Value
    • Domain
    • Path
  1. Install "Cookie-Editor" extension for Chrome/Firefox
  2. Login to LinkedIn
  3. Click the Cookie-Editor icon
  4. Click "Export" β†’ "JSON"
  5. Copy the JSON array
[
{
"name": "li_at",
"value": "AQEDATEqwer...(long string)",
"domain": ".linkedin.com",
"path": "/",
"secure": true,
"httpOnly": true
},
{
"name": "JSESSIONID",
"value": "ajax:1234567890",
"domain": ".linkedin.com",
"path": "/",
"secure": true
}
]

⚠️ IMPORTANT:

  • Keep these cookies PRIVATE - they give access to your account
  • Cookies expire after some time (usually weeks) - you'll need to refresh them
  • Never share your cookies publicly

πŸ“ How to Run the Actor

Step 1: Prepare Input

  1. Go to your actor in Apify Console
  2. Click "Console" tab (or "Run" tab)
  3. You'll see an input form

Step 2: Fill in the Input

Example Input for Personal Profile:

{
"profileUrl": "https://www.linkedin.com/in/williamhgates/",
"cookies": [
{
"name": "li_at",
"value": "YOUR_LI_AT_COOKIE_VALUE_HERE",
"domain": ".linkedin.com",
"path": "/"
},
{
"name": "JSESSIONID",
"value": "YOUR_JSESSIONID_VALUE_HERE",
"domain": ".linkedin.com",
"path": "/"
}
]
}

Example Input for Company Page:

{
"profileUrl": "https://www.linkedin.com/company/microsoft/",
"cookies": [
{
"name": "li_at",
"value": "YOUR_LI_AT_COOKIE_VALUE_HERE",
"domain": ".linkedin.com",
"path": "/"
}
]
}

Step 3: Run the Actor

  1. Click "Start" button (bottom right)
  2. The actor will start running
  3. You can monitor progress in the "Log" tab
  4. Wait for completion (usually 1-3 minutes)

Step 4: View Results

  1. Once completed, go to "Dataset" tab
  2. Click on the first item to see full results
  3. You can download as:
    • JSON
    • CSV
    • Excel
    • RSS

πŸ“Š Understanding the Output

The actor returns a comprehensive JSON object with all scraped data:

{
"profile": {
"accountType": "Personal",
"name": "Bill Gates",
"headline": "Co-chair, Bill & Melinda Gates Foundation",
"location": "Seattle, Washington",
"about": "Full about text...",
"connections": 500,
"followers": 35287456,
"experience": [...],
"education": [...],
"skills": [...]
},
"activity": {
"profileViews": 12345,
"searchAppearances": 5678
},
"posts": {
"totalPosts": 47,
"totalLikes": 125000,
"totalComments": 3500,
"totalReposts": 850,
"averageLikesPerPost": 2659,
"averageCommentsPerPost": 74,
"averageRepostsPerPost": 18,
"top3Posts": [
{
"content": "Post content here...",
"timestamp": "1w ago",
"likes": 15000,
"comments": 450,
"reposts": 120,
"hasMedia": true,
"engagementScore": 2370
}
]
},
"analysis": {
"accountType": "Personal",
"strengths": [
"Extensive network: 500+ connections",
"Strong thought leadership: 35,287,456 followers",
"Active content creator: 47 recent posts"
],
"weaknesses": [],
"collaborationOpportunities": [
"Consulting opportunities in...",
"Thought leadership partnerships"
],
"engagementQuality": "Excellent - Posts generate meaningful discussions",
"contentStrategy": "Visual content performs well...",
"overallScore": 95,
"performanceRating": "Excellent"
},
"metadata": {
"scrapedAt": "2025-10-28T10:30:00.000Z",
"profileUrl": "https://www.linkedin.com/in/williamhgates/",
"accountType": "Personal"
}
}

πŸ”§ Troubleshooting

"Authentication failed" Error

Problem: Cookies are invalid or expired

Solution:

  1. Get fresh cookies from LinkedIn (follow the guide above)
  2. Make sure you're logged into LinkedIn when exporting cookies
  3. Include the li_at cookie - this is the most important one
  4. Try adding more cookies (JSESSIONID, li_a, etc.)

"Cannot read profile" Error

Problem: Profile URL is incorrect or inaccessible

Solution:

  1. Verify the URL format:
    • Personal: https://www.linkedin.com/in/username/
    • Company: https://www.linkedin.com/company/companyname/
  2. Make sure the profile is public or you have access
  3. Try accessing the URL in your browser while logged in

No Posts Data

Problem: Profile has no recent posts or posts aren't loading

Solution:

  • This is expected if the profile hasn't posted recently
  • Some profiles have restricted post visibility
  • The actor will still return other profile data

Build Fails

Problem: Actor doesn't build successfully

Solution:

  1. Check all files are uploaded correctly
  2. Verify folder structure matches the guide
  3. Check the build log for specific errors
  4. Make sure package.json has correct dependencies

🎯 Use Cases

This actor is perfect for:

  1. Competitive Analysis

    • Track competitor engagement metrics
    • Analyze content strategy
    • Monitor follower growth
  2. Lead Generation

    • Qualify leads based on profile completeness
    • Identify collaboration opportunities
    • Find high-engagement profiles
  3. Recruitment

    • Verify candidate information
    • Assess professional presence
    • Check engagement quality
  4. Market Research

    • Company analysis
    • Industry insights
    • Trend identification
  5. Personal Branding

    • Audit your own profile
    • Identify improvement areas
    • Track growth over time

⚑ Performance

  • Speed: 1-3 minutes per profile
  • Accuracy: 100% - all data scraped directly
  • Cost: ~$0.02-0.05 per run (Apify pricing)
  • Rate Limit: Recommended 1 profile every 30 seconds

πŸ”’ Privacy & Ethics

Please use responsibly:

  • Only scrape publicly available information
  • Respect LinkedIn's Terms of Service
  • Don't use for spam or harassment
  • Keep your cookies secure
  • Don't scrape at high volume (rate limiting exists for a reason)
  • Use this for legitimate business purposes only

πŸ“ž Support

If you encounter issues:

  1. Check the troubleshooting section above
  2. Review the Apify actor logs for detailed error messages
  3. Verify your cookies are fresh and valid
  4. Test with a simple profile first (like a public figure)

πŸ“„ License

Apache-2.0


πŸŽ‰ You're Ready!

Follow the steps above and you'll have a working LinkedIn scraper in under 30 minutes. Every number, every metric, every piece of data is scraped directly from LinkedIn - no estimates, no AI generation, just real data.

Happy scraping! πŸš€