Receber por email
← Voltar para o catálogo

linkedin-cli

Use when automating LinkedIn via CLI: fetch profiles, search people/companies, send messages, manage connections, create posts, and Sales Navigator.

141estrelas
Atualizado há 4 meses

Ver no GitHub ↗ Licença: MIT

Como adicionar

/plugin marketplace add lingxling/awesome-skills-cn

O comando exato pode variar conforme o repositório. Confira o README no GitHub.

Para o autor da skill

Cole no README do seu repo

Mostra que sua skill está catalogada na Skillteca, gera backlink e tráfego rastreável.

[![Skillteca](https://www.skillteca.com.br/api/badge/linkedin-cli-mpsryphs/svg)](https://www.skillteca.com.br/skills/linkedin-cli-mpsryphs)

Alerta por categoria

Receba novas skills de Design e Frontend toda segunda

1 email curto, só com as skills novas de Design e Frontend. 4 minutos de leitura, sem spam, cancela com 1 clique.

Você confirma o email no primeiro envio. Sem spam. Cancela com 1 clique.

Ler descrição completa

When to Use

Use this skill when you need to automate LinkedIn tasks such as profile fetching, connection management, or post creation via CLI, especially when integrated into automated workflows.

LinkedIn Skill

You have access to linkedin – a CLI tool for LinkedIn automation. Use it to fetch profiles, search people and companies, send messages, manage connections, create posts, react, comment, and more.

Each command sends a request to Linked API, which runs a real cloud browser to perform the action on LinkedIn. Operations are not instant – expect 30 seconds to several minutes depending on complexity.

If linkedin is not available, install it:

npm install -g @linkedapi/linkedin-cli

Authentication

If a command fails with exit code 2 (authentication error), ask the user to set up their account:

  1. Go to app.linkedapi.io and sign up or log in
  2. Connect their LinkedIn account
  3. Copy the Linked API Token and Identification Token from the dashboard

Once the user provides the tokens, run:

linkedin setup --linked-api-token=TOKEN --identification-token=TOKEN

When to Use

Use this skill when you need to orchestrate LinkedIn actions from scripts or an AI agent instead of clicking through the web UI:

  • Building outreach, research, or recruiting workflows that rely on LinkedIn data and messaging.
  • Enriching leads or accounts by fetching people and company profiles in bulk.
  • Coordinating multi-step Sales Navigator or workflow runs where JSON output and exit codes are required.

Always respect LinkedIn’s terms of service, local regulations, and your organisation’s compliance policies when using automation against real accounts.

Global Flags

Always use --json and -q for machine-readable output:

linkedin <command> --json -q

| Flag | Description | | ----------------------- | --------------------------------------- | | --json | Structured JSON output | | --quiet / -q | Suppress stderr progress messages | | --fields name,url,... | Select specific fields in output | | --no-color | Disable colors | | --account "Name" | Use a specific account for this command |

Output Format

Success:

{ "success": true, "data": { "name": "John Doe", "headline": "Engineer" } }

Error:

{
  "success": false,
  "error": { "type": "personNotFound", "message": "Person not found" }
}

Exit code 0 means the API call succeeded – always check the success field for the action outcome. Non-zero exit codes indicate infrastructure errors:

| Exit Code | Meaning | | --------- | ------------------------------------------------------------------------------------------- | | 0 | Success (check success field – action may have returned an error like "person not found") | | 1 | General/unexpected error | | 2 | Missing or invalid tokens | | 3 | Subscription/plan required | | 4 | LinkedIn account issue | | 5 | Invalid arguments | | 6 | Rate limited | | 7 | Network error | | 8 | Workflow timeout (workflowId returned for recovery) |

Commands

Fetch a Person Profile

linkedin person fetch <url> [flags] --json -q

Optional flags to include additional data:

  • --experience – work history
  • --education – education history
  • --skills – skills list
  • --languages – languages
  • --posts – recent posts (with --posts-limit N, --posts-since TIMESTAMP)
  • --comments – recent comments (with --comments-limit N, --comments-since TIMESTAMP)
  • --reactions – recent reactions (with --reactions-limit N, --reactions-since TIMESTAMP)

Only request additional data when needed – each flag increases execution time.

# Basic profile
linkedin person fetch https://www.linkedin.com/in/username --json -q

# With experience and education
linkedin person fetch https://www.linkedin.com/in/username --experience --education --json -q

# With last 5 posts
linkedin person fetch https://www.linkedin.com/in/username --posts --posts-limit 5 --json -q

Search People

linkedin person search [flags] --json -q

| Flag | Description | | ---------------------- | -------------------------------------- | | --term | Search keyword or phrase | | --limit | Max results | | --first-name | Filter by first name | | --last-name | Filter by last name | | --position | Filter by job position | | --locations | Comma-separated locations | | --industries | Comma-separated industries | | --current-companies | Comma-separated current company names | | --previous-companies | Comma-separated previous company names | | --schools | Comma-separated school names |

linkedin person search --term "product manager" --locations "San Francisco" --json -q
linkedin person search --current-companies "Google" --position "Engineer" --limit 20 --json -q

Fetch a Company

linkedin company fetch <url> [flags] --json -q

Optional flags:

  • --employees – include employees
  • --dms – include decision makers
  • --posts – include company posts

Employee filters (require --employees):

| Flag | Description | | ------------------------ | ---------------------------- | | --employees-limit | Max employees to retrieve | | --employees-first-name | Filter by first name | | --employees-last-name | Filter by last name | | --employees-position | Filter by position | | --employees-locations | Comma-separated locations | | --employees-industries | Comma-separated industries | | --employees-schools | Comma-separated school names |

| Flag | Description | | --------------- | -------------------------------------------------- | | --dms-limit | Max decision makers to retrieve (requires --dms) | | --posts-limit | Max posts to retrieve (requires --posts) | | --posts-since | Posts since ISO timestamp (requires --posts) |

# Basic company info
linkedin company fetch https://www.linkedin.com/company/name --json -q

# With employees filtered by position
linkedin company fetch https://www.linkedin.com/company/name --employees --employees-position "Engineer" --json -q

# With decision makers and posts
linkedin company fetch https://www.linkedin.com/company/name --dms --posts --posts-limit 10 --json -q

Search Companies

linkedin company search [flags] --json -q

| Flag | Description | | -------------- | ------------------------------------------------------------------------------------------------------------ | | --term | Search keyword | | --limit | Ma

Compartilhar X LinkedIn