Skip to content

lxgicstudios/linkedin-cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

1 Commit
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

linkedin-cli

LinkedIn data extraction CLI. Fetch profiles, companies, jobs, and posts. Professional networking OSINT tool with structured JSON output.

npm version License: MIT

Features

  • πŸ‘€ Profile extraction - Full profile data, experience, education, skills
  • 🏒 Company info - About, employees, open positions
  • πŸ’Ό Job search - Filter by location, remote, experience level
  • πŸ“ Posts & activity - User's posts with reactions
  • πŸ” People search - Find professionals by criteria
  • πŸ›‘οΈ Rate limiting - Built-in protection against blocks
  • πŸ“ Multiple formats - JSON, CSV, table output

Installation

npm install -g linkedin-cli

Setup

LinkedIn requires authentication:

# Interactive setup
linkedin-cli auth

# Or set environment variable
export LINKEDIN_COOKIE="your-li_at-cookie-value"

Getting Your Cookie

  1. Log in to LinkedIn in your browser
  2. Open DevTools (F12) β†’ Application β†’ Cookies
  3. Find li_at cookie
  4. Copy the value

Quick Start

# Profile lookup
linkedin-cli profile satyanadella

# Company info
linkedin-cli company microsoft

# Job search
linkedin-cli jobs "software engineer" --location "San Francisco"

# Posts from a user
linkedin-cli posts elonmusk --limit 20

Commands

profile <username>

Get LinkedIn profile data.

linkedin-cli profile satyanadella
linkedin-cli profile username --experience   # Include work history
linkedin-cli profile username --education    # Include education
linkedin-cli profile username --skills       # Include skills
linkedin-cli profile username --full         # Everything

Options:

  • --experience - Include work experience
  • --education - Include education history
  • --skills - Include skills & endorsements
  • --full - Include all sections

Returns: Name, headline, location, about, experience, education, skills, connections.

company <name>

Get company information.

linkedin-cli company microsoft
linkedin-cli company google --employees      # List employees
linkedin-cli company startup-name --jobs     # Open positions
linkedin-cli company amazon --about          # Full details

Options:

  • --employees - List company employees (limited)
  • --jobs - Show open positions
  • --about - Company details and stats

jobs <query>

Search for jobs.

linkedin-cli jobs "react developer"
linkedin-cli jobs "data scientist" --location "New York"
linkedin-cli jobs "devops" --remote
linkedin-cli jobs "product manager" --experience senior
linkedin-cli jobs "engineer" --posted week

Options:

  • --location <place> - Filter by location
  • --remote - Remote jobs only
  • --experience <level> - entry, associate, mid, senior, director
  • --posted <time> - 24h, week, month
  • --limit <n> - Number of results (default: 20)

posts <username>

Get user's posts and activity.

linkedin-cli posts satyanadella
linkedin-cli posts username --limit 50
linkedin-cli posts username --reactions      # Include reaction counts

Options:

  • --limit <n> - Number of posts (default: 20)
  • --reactions - Include reaction breakdown

search <query>

Search for people.

linkedin-cli search "software engineer"
linkedin-cli search "CTO" --company google
linkedin-cli search "recruiter" --location "Austin"
linkedin-cli search "designer" --limit 100

Options:

  • --company <name> - Filter by company
  • --location <place> - Filter by location
  • --limit <n> - Number of results

Output Formats

# JSON (default)
linkedin-cli profile username

# Table view
linkedin-cli jobs "developer" -o table

# CSV (spreadsheet-friendly)
linkedin-cli search "engineer" -o csv

# Save to file
linkedin-cli company microsoft --save company.json

Example Output

{
  "profile": {
    "name": "Satya Nadella",
    "headline": "Chairman and CEO at Microsoft",
    "location": "Greater Seattle Area",
    "connections": "500+",
    "followers": "10M",
    "about": "I am the Chairman and CEO of Microsoft...",
    "experience": [
      {
        "title": "Chairman and CEO",
        "company": "Microsoft",
        "duration": "10 yrs",
        "location": "Redmond, Washington",
        "description": "..."
      }
    ],
    "education": [
      {
        "school": "University of Wisconsin-Milwaukee",
        "degree": "Master of Science - MS",
        "field": "Computer Science"
      }
    ]
  }
}

Rate Limiting

LinkedIn has strict rate limits. Built-in protections:

# Custom delay between requests
linkedin-cli search "developer" --delay 3000  # 3s between requests

# Configure global rate limit
linkedin-cli config --rate-limit 30

Use Cases

  • Recruiting - Find candidates matching criteria
  • Sales prospecting - Build lead lists
  • Competitive intelligence - Track company changes
  • Career research - Analyze career paths
  • Market research - Industry trends

Batch Processing

# Multiple profiles
cat usernames.txt | xargs -I {} linkedin-cli profile {}

# Export job listings
linkedin-cli jobs "engineer" --limit 500 --save jobs.json

Security & Privacy

  • Credentials stored locally only
  • No data sent to third parties
  • Respects rate limits
  • For personal/research use only

Why linkedin-cli?

  • Powerful - Profiles, companies, jobs, posts, search
  • Structured data - Clean JSON output for processing
  • Scriptable - Perfect for automation workflows
  • Multiple formats - JSON, CSV, table output
  • Rate-limit safe - Built-in protections

⚠️ Important Notes

  • Requires valid LinkedIn session cookie
  • Respect LinkedIn's Terms of Service
  • Use reasonable rate limits
  • For personal/research use only

Built by LXGIC Studios

πŸ”— GitHub Β· Twitter Β· npm

About

LinkedIn data extraction CLI. Fetch profiles, companies, jobs, posts. Professional OSINT tool.

Topics

Resources

License

Stars

1 star

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors