LinkedIn CLI

LinkedIn CLI gives AI agents and developers full LinkedIn capabilities through simple shell commands. Built for Claude Code, Cursor, Codex, and any AI agent that can execute shell commands.

Source code available on GitHub.

After setup: every command is listed in Commands; global flags, the JSON output format and exit codes are in Flags, Output and Exit Codes; running any workflow JSON is in Custom Workflows. How results represent LinkedIn data – UTC timestamps, normalized URLs, null for missing fields – is in Data Conventions.

Quick start

bash
# 1. Install
npm install -g @linkedapi/linkedin-cli

# 2. Save your tokens (get them at app.linkedapi.io)
linkedin setup

# 3. Fetch a profile
linkedin person fetch https://www.linkedin.com/in/vprudnikoff --json

# 4. Search for people
linkedin person search --term "revops engineer" --current-companies "Linked API" --json

# 5. Send a message
linkedin message send https://www.linkedin.com/in/vprudnikoff "Hey, loved your latest post!"

Install

bash
npm install -g @linkedapi/linkedin-cli

Setup

bash
linkedin setup

The CLI will ask for your Linked API Token and Identification Token. Get them at app.linkedapi.io.

For non-interactive environments (CI, scripts):

bash
linkedin setup --linked-api-token=xxx --identification-token=yyy
FlagDescription
--linked-api-tokenLinked API Token (skips prompt)
--identification-tokenIdentification Token (skips prompt)

Multiple accounts

Run linkedin setup again with different tokens to add more accounts. The last added account becomes active.

bash
# List all accounts (* marks active)
linkedin account list

# Switch active account
linkedin account switch "Vlad"

# Update tokens for active account (e.g. after regenerating tokens on the dashboard)
linkedin account update

# Update tokens for a specific account
linkedin account update "Vlad"

# Rename a saved account
linkedin account rename "Vlad" --name "My Work Account"

# Use a specific account for one command
linkedin person fetch https://www.linkedin.com/in/... --account "Vlad"

# Remove active account (auto-switches to next)
linkedin reset

# Remove all accounts
linkedin reset --all

Updating tokens

If your tokens were regenerated on the dashboard, update them in the CLI without removing the account:

bash
linkedin account update

This prompts for new tokens, verifies them, and updates the saved account in place. To update a specific account:

bash
linkedin account update "Account Name"

For non-interactive environments:

bash
linkedin account update --linked-api-token=xxx --identification-token=yyy
FlagDescription
--linked-api-tokenNew Linked API Token (skips prompt)
--identification-tokenNew Identification Token (skips prompt)

Changelog

Read the public Linked API changelog from the terminal. It needs no setup and no tokens.

bash
# Every release, newest first
linkedin changelog

# Only the releases for the week of a date and later
linkedin changelog --since 2026-10-01

# The raw changelog response as JSON
linkedin changelog --since 2026-10-01T12:00:00Z --json

In a terminal it prints each release date followed by its items, each with a title, a description and a link to its documentation. With --json, or when stdout is not a terminal, it prints the changelog response itself rather than the usual success envelope. --since takes an ISO date or an instant with a time zone; an invalid value exits with code 5 and the server's message. Releases are weekly, so --since also returns the release for the week it falls in – see how releases are dated.

Feedback

Send a bug report, a feature request or praise straight to the Linked API team. It reaches the team within a minute.

bash
# Report a defect with the run that shows it
linkedin feedback "person fetch returns an empty experience list for public profiles" \
  --type bug --severity high --surface "person fetch" \
  --workflow-id account-12345-abcde --error "unexpectedError"

# Ask for something that does not exist yet
linkedin feedback "would be great to filter connections by company size" --type feature
FlagDescription
--typebug, feature, praise or other (default: other)
--severitylow, medium or high – how badly it blocks you
--surfaceThe command the feedback is about, e.g. person fetch
--workflow-idThe workflowId of the run the feedback is about
--operation-nameThe operationName of the failing call, e.g. st.sendMessage
--errorThe error message or unexpected payload, verbatim
--contextAny extra detail as a JSON object, e.g. '{"attempts": 3}' – never tokens or other secrets

Attach --workflow-id and --error when the feedback is about a failed or wrong result: that lets the team replay the exact run. Token, authentication and subscription errors are account settings rather than defects – fix them on the dashboard.