Skill

Automate LinkedIn Profile and Company Data Extraction

LinkedIn CLI for cloud-browser automation: profile/company fetch, search, messaging, connections, posts, and Sales Navigator.

Works with linkedin

75
Spark score
out of 100
Updated last month
Version 13.3.0

Add to Favorites

Why it matters

Orchestrate LinkedIn actions from scripts or an AI agent, automating profile fetching, connection management, and post creation via CLI for enhanced outreach and data enrichment.

Outcomes

What it gets done

01

Fetch detailed LinkedIn person profiles including experience, education, and posts.

02

Search for people and companies on LinkedIn using various filters.

03

Automate company data retrieval, including employees and decision-makers.

04

Integrate LinkedIn actions into automated workflows for sales, recruiting, and research.

Install

Add it to your toolbox

Run in your project directory:

curl -fsSL https://spark.entire.vc/get/ag-linkedin-cli | bash

Overview

LinkedIn Skill

A LinkedIn CLI backed by Linked API's cloud browser, covering profile/company fetch and search, messaging, connection management, post creation/reaction/commenting, Sales Navigator searches and InMail, and custom JSON-defined workflows with structured exit-code error handling. Use when orchestrating LinkedIn actions from scripts or an agent - outreach, lead enrichment, or Sales Navigator workflows - rather than manual UI use.

What it does

Provides the linkedin CLI - a LinkedIn automation tool backed by Linked API, which runs a real cloud browser to perform actions on LinkedIn (profile fetching, connection management, messaging, post creation, reactions, comments, and Sales Navigator operations). Because a real browser drives each action, operations are not instant - expect 30 seconds to several minutes depending on complexity, and all operations for an account execute sequentially, queuing when multiple requests come in.

When to use - and when NOT to

Use this skill to orchestrate LinkedIn actions from scripts or an AI agent instead of clicking through the web UI - building outreach/research/recruiting workflows, bulk-enriching leads or accounts with profile data, or coordinating multi-step Sales Navigator runs needing JSON output and exit codes. Always respect LinkedIn's terms of service, local regulations, and organizational compliance policies when automating against real accounts.

Inputs and outputs

Install if missing:

npm install -g @linkedapi/linkedin-cli

Authentication: an exit code 2 means missing/invalid tokens - the user signs up at app.linkedapi.io, connects their LinkedIn account, and copies the Linked API Token and Identification Token for linkedin setup --linked-api-token=TOKEN --identification-token=TOKEN.

Always use --json -q for machine-readable output. Every response wraps {"success": true/false, ...} - exit code 0 only means the API call itself succeeded, not that the requested action found what it was looking for (check the success field separately). Other exit codes map to specific failure classes: 2 (bad tokens), 3 (subscription required), 4 (LinkedIn account issue), 5 (invalid arguments), 6 (rate limited), 7 (network error), 8 (workflow timeout, with a workflowId for recovery).

Core commands span: person fetch/person search (profiles with optional experience/education/skills/posts/comments/reactions detail, each flag adding execution time); company fetch/company search (with employee, decision-maker, and post filters); message send/message get (1900-char limit, first conversation fetch triggers a background sync); connection management (status, send, list with rich filters, pending, withdraw, remove); post operations (fetch with comments/reactions, create with up to 9 images or 1 video/document attachment, react with six reaction types, comment up to 1000 chars, all optionally on behalf of a company page); and stats (Social Selling Index, performance analytics, API usage by date range).

Sales Navigator commands (requiring a subscription, using hashed URLs) mirror standard person/company fetch and search with added filters like years-of-experience ranges and revenue-min/max, plus InMail sending via navigator message send (1900-char body, 80-char subject).

Custom workflows execute a JSON action sequence from a file, stdin, or inline via linkedin workflow run, with linkedin workflow status <id> --wait for polling completion - full schema documented at linkedapi.io's Building Workflows guide.

Account management supports multiple connected accounts: account list, account switch, account rename, and reset/reset --all to remove accounts.

Key behavioral notes: all timestamps are UTC; text arguments should be single-quoted to avoid shell interpretation issues; per-account action limits are configurable on the platform and surface as limitExceeded; response URLs are normalized to https://www.linkedin.com/... without trailing slashes; and unavailable fields return null/[] rather than being omitted.

Integrations

Built on Linked API (app.linkedapi.io), which executes actions via a managed cloud browser against real LinkedIn sessions, including Sales Navigator subscription features.

Who it's for

Growth, sales, and recruiting teams automating LinkedIn outreach, research, or lead enrichment from scripts or AI agents, who need structured JSON output, exit-code-based error handling, and Sales Navigator support rather than manual UI interaction - always within LinkedIn's terms of service and applicable compliance policy.

FAQ

Common questions

Discussion

Questions & comments · 0

Sign In Sign in to leave a comment.