linkedin-cli

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

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.
当你需要通过CLI自动化LinkedIn任务时使用该工具,比如获取档案、管理人脉或创建帖子,尤其适合集成到自动化工作流中。

LinkedIn Skill

LinkedIn 自动化工具

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:
bash
npm install -g @linkedapi/linkedin-cli
你可以使用
linkedin
——一款用于LinkedIn自动化的CLI工具。通过它可以获取个人/公司档案、搜索人脉和企业、发送消息、管理人脉、创建帖子、点赞、评论等。
每个命令都会向Linked API发送请求,该API会运行一个真实的云端浏览器来在LinkedIn上执行操作。操作并非即时完成——根据复杂度不同,预计需要30秒到数分钟不等。
如果
linkedin
未安装,可执行以下命令安装:
bash
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:
bash
linkedin setup --linked-api-token=TOKEN --identification-token=TOKEN
如果命令执行失败并返回退出码2(身份验证错误),请引导用户完成账户设置:
  1. 访问app.linkedapi.io并注册或登录
  2. 关联其LinkedIn账户
  3. 从控制台复制Linked API TokenIdentification Token
用户提供令牌后,运行以下命令:
bash
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.
当你需要通过脚本或AI Agent来编排LinkedIn操作,而非手动操作网页UI时使用该工具:
  • 构建依赖LinkedIn数据和消息功能的开发拓展、调研或招聘工作流。
  • 通过批量获取个人和公司档案来丰富潜在客户或企业信息。
  • 协调多步骤的Sales Navigator或工作流运行,这类场景需要JSON输出和退出码支持。
使用自动化操作真实账户时,请务必遵守LinkedIn的服务条款、当地法规以及所在组织的合规政策。

Global Flags

全局参数

Always use
--json
and
-q
for machine-readable output:
bash
linkedin <command> --json -q
FlagDescription
--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
请始终使用
--json
-q
参数以获取机器可读的输出:
bash
linkedin <command> --json -q
参数说明
--json
输出结构化JSON格式数据
--quiet
/
-q
抑制标准错误输出中的进度消息
--fields name,url,...
选择输出中的特定字段
--no-color
禁用颜色显示
--account "Name"
为此命令使用指定的账户

Output Format

输出格式

Success:
json
{ "success": true, "data": { "name": "John Doe", "headline": "Engineer" } }
Error:
json
{
  "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 CodeMeaning
0Success (check
success
field – action may have returned an error like "person not found")
1General/unexpected error
2Missing or invalid tokens
3Subscription/plan required
4LinkedIn account issue
5Invalid arguments
6Rate limited
7Network error
8Workflow timeout (workflowId returned for recovery)
成功输出:
json
{ "success": true, "data": { "name": "John Doe", "headline": "Engineer" } }
错误输出:
json
{
  "success": false,
  "error": { "type": "personNotFound", "message": "Person not found" }
}
退出码0表示API调用成功——请始终检查
success
字段以确认操作结果。非零退出码表示基础设施错误:
退出码说明
0成功(需检查
success
字段——操作可能返回如"未找到用户"之类的业务错误)
1常规/意外错误
2令牌缺失或无效
3需要订阅/付费计划
4LinkedIn账户问题
5参数无效
6请求受限(触发频率限制)
7网络错误
8工作流超时(返回workflowId用于恢复)

Commands

命令列表

Fetch a Person Profile

获取个人档案

bash
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.
bash
undefined
bash
linkedin person fetch <url> [flags] --json -q
可选参数以获取额外数据:
  • --experience
    – 工作经历
  • --education
    – 教育经历
  • --skills
    – 技能列表
  • --languages
    – 掌握语言
  • --posts
    – 近期帖子(搭配
    --posts-limit N
    --posts-since TIMESTAMP
    使用)
  • --comments
    – 近期评论(搭配
    --comments-limit N
    --comments-since TIMESTAMP
    使用)
  • --reactions
    – 近期互动(搭配
    --reactions-limit N
    --reactions-since TIMESTAMP
    使用)
仅在需要时请求额外数据——每个参数都会增加执行时间。
bash
undefined

Basic profile

基础档案信息

linkedin person fetch https://www.linkedin.com/in/username --json -q
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
linkedin person fetch https://www.linkedin.com/in/username --experience --education --json -q

With last 5 posts

包含最近5条帖子

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

Search People

搜索人脉

bash
linkedin person search [flags] --json -q
FlagDescription
--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
bash
linkedin person search --term "product manager" --locations "San Francisco" --json -q
linkedin person search --current-companies "Google" --position "Engineer" --limit 20 --json -q
bash
linkedin person search [flags] --json -q
参数说明
--term
搜索关键词或短语
--limit
最大结果数量
--first-name
按名字过滤
--last-name
按姓氏过滤
--position
按职位过滤
--locations
逗号分隔的地区列表
--industries
逗号分隔的行业列表
--current-companies
逗号分隔的当前公司名称列表
--previous-companies
逗号分隔的过往公司名称列表
--schools
逗号分隔的学校名称列表
bash
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

获取企业档案

bash
linkedin company fetch <url> [flags] --json -q
Optional flags:
  • --employees
    – include employees
  • --dms
    – include decision makers
  • --posts
    – include company posts
Employee filters (require
--employees
):
FlagDescription
--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
FlagDescription
--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
)
bash
undefined
bash
linkedin company fetch <url> [flags] --json -q
可选参数:
  • --employees
    – 包含企业员工信息
  • --dms
    – 包含企业决策者信息
  • --posts
    – 包含企业发布的帖子
员工过滤参数(需搭配
--employees
使用):
FlagDescription
--employees-limit
最大获取员工数量
--employees-first-name
按名字过滤
--employees-last-name
按姓氏过滤
--employees-position
按职位过滤
--employees-locations
逗号分隔的地区列表
--employees-industries
逗号分隔的行业列表
--employees-schools
逗号分隔的学校名称列表
参数说明
--dms-limit
最大获取决策者数量(需搭配
--dms
使用)
--posts-limit
最大获取帖子数量(需搭配
--posts
使用)
--posts-since
获取指定ISO时间戳之后的帖子(需搭配
--posts
使用)
bash
undefined

Basic company info

基础企业信息

linkedin company fetch https://www.linkedin.com/company/name --json -q
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
linkedin company fetch https://www.linkedin.com/company/name --employees --employees-position "Engineer" --json -q

With decision makers and posts

包含决策者和最近10条帖子

linkedin company fetch https://www.linkedin.com/company/name --dms --posts --posts-limit 10 --json -q
undefined
linkedin company fetch https://www.linkedin.com/company/name --dms --posts --posts-limit 10 --json -q
undefined

Search Companies

搜索企业

bash
linkedin company search [flags] --json -q
FlagDescription
--term
Search keyword
--limit
Max results
--sizes
Comma-separated sizes:
1-10
,
11-50
,
51-200
,
201-500
,
501-1000
,
1001-5000
,
5001-10000
,
10001+
--locations
Comma-separated locations
--industries
Comma-separated industries
bash
linkedin company search --term "fintech" --sizes "11-50,51-200" --json -q
bash
linkedin company search [flags] --json -q
参数说明
--term
搜索关键词
--limit
最大结果数量
--sizes
逗号分隔的企业规模:
1-10
,
11-50
,
51-200
,
201-500
,
501-1000
,
1001-5000
,
5001-10000
,
10001+
--locations
逗号分隔的地区列表
--industries
逗号分隔的行业列表
bash
linkedin company search --term "fintech" --sizes "11-50,51-200" --json -q

Send a Message

发送消息

bash
linkedin message send <person-url> '<text>' --json -q
Text up to 1900 characters. Wrap the message in single quotes to avoid shell interpretation issues.
bash
linkedin message send https://www.linkedin.com/in/username 'Hey, loved your latest post!' --json -q
bash
linkedin message send <person-url> '<text>' --json -q
消息文本最多1900字符。请使用单引号包裹消息文本,避免特殊字符被Shell解析。
bash
linkedin message send https://www.linkedin.com/in/username 'Hey, loved your latest post!' --json -q

Get Conversation

获取对话记录

bash
linkedin message get <person-url> [--since TIMESTAMP] --json -q
The first call for a conversation triggers a background sync and may take longer. Subsequent calls are faster.
bash
linkedin message get https://www.linkedin.com/in/username --json -q
linkedin message get https://www.linkedin.com/in/username --since 2024-01-15T10:30:00Z --json -q
bash
linkedin message get <person-url> [--since TIMESTAMP] --json -q
首次获取对话记录会触发后台同步,耗时可能较长。后续获取速度会更快。
bash
linkedin message get https://www.linkedin.com/in/username --json -q
linkedin message get https://www.linkedin.com/in/username --since 2024-01-15T10:30:00Z --json -q

Connection Management

人脉管理

Check connection status

检查人脉状态

bash
linkedin connection status <url> --json -q
bash
linkedin connection status <url> --json -q

Send connection request

发送好友请求

bash
linkedin connection send <url> [--note 'text'] [--email user@example.com] --json -q
bash
linkedin connection send <url> [--note 'text'] [--email user@example.com] --json -q

List connections

列出人脉列表

bash
linkedin connection list [flags] --json -q
FlagDescription
--limit
Max connections to return
--since
Only connections made since ISO timestamp (only works when no filter flags are used)
--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
bash
linkedin connection list --limit 50 --json -q
linkedin connection list --current-companies "Google" --position "Engineer" --json -q
linkedin connection list --since 2024-01-01T00:00:00Z --json -q
bash
linkedin connection list [flags] --json -q
参数说明
--limit
最大返回人脉数量
--since
仅返回指定ISO时间戳之后添加的人脉(仅在未使用其他过滤参数时生效)
--first-name
按名字过滤
--last-name
按姓氏过滤
--position
按职位过滤
--locations
逗号分隔的地区列表
--industries
逗号分隔的行业列表
--current-companies
逗号分隔的当前公司名称
--previous-companies
逗号分隔的过往公司名称
--schools
逗号分隔的学校名称
bash
linkedin connection list --limit 50 --json -q
linkedin connection list --current-companies "Google" --position "Engineer" --json -q
linkedin connection list --since 2024-01-01T00:00:00Z --json -q

List pending outgoing requests

列出待处理的好友请求

bash
linkedin connection pending --json -q
bash
linkedin connection pending --json -q

Withdraw a pending request

撤回待处理的好友请求

bash
linkedin connection withdraw <url> [--no-unfollow] --json -q
By default, withdrawing also unfollows the person. Use
--no-unfollow
to keep following.
bash
linkedin connection withdraw <url> [--no-unfollow] --json -q
默认情况下,撤回请求同时会取消关注对方。使用
--no-unfollow
参数可保持关注状态。

Remove a connection

删除人脉

bash
linkedin connection remove <url> --json -q
bash
linkedin connection remove <url> --json -q

Posts

帖子管理

Fetch a post

获取单条帖子

bash
linkedin post fetch <url> [flags] --json -q
FlagDescription
--comments
Include comments
--reactions
Include reactions
--comments-limit
Max comments to retrieve (requires
--comments
)
--comments-sort
Sort order:
mostRelevant
or
mostRecent
(requires
--comments
)
--comments-replies
Include replies to comments (requires
--comments
)
--reactions-limit
Max reactions to retrieve (requires
--reactions
)
bash
linkedin post fetch https://www.linkedin.com/posts/username_activity-123 --json -q
bash
linkedin post fetch <url> [flags] --json -q
参数说明
--comments
包含帖子评论
--reactions
包含帖子互动
--comments-limit
最大获取评论数量(需搭配
--comments
使用)
--comments-sort
评论排序方式:
mostRelevant
mostRecent
(需搭配
--comments
使用)
--comments-replies
包含评论的回复内容(需搭配
--comments
使用)
--reactions-limit
最大获取互动数量(需搭配
--reactions
使用)
bash
linkedin post fetch https://www.linkedin.com/posts/username_activity-123 --json -q

With comments sorted by most recent, including replies

包含按最新排序的评论及回复

linkedin post fetch https://www.linkedin.com/posts/username_activity-123
--comments --comments-sort mostRecent --comments-replies --json -q
undefined
linkedin post fetch https://www.linkedin.com/posts/username_activity-123
--comments --comments-sort mostRecent --comments-replies --json -q
undefined

Create a post

创建帖子

bash
linkedin post create '<text>' [flags] --json -q
FlagDescription
--company-url
Post on behalf of a company page (requires admin access)
--attachments
Attachment as
url:type
or
url:type:name
. Types:
image
,
video
,
document
. Can be specified multiple times.
Attachment limits: up to 9 images, or 1 video, or 1 document. Cannot mix types.
bash
linkedin post create 'Excited to share our latest update!' --json -q
bash
linkedin post create '<text>' [flags] --json -q
参数说明
--company-url
代表企业账号发布帖子(需拥有企业账号管理员权限)
--attachments
附件格式为
url:type
url:type:name
。支持的类型:
image
video
document
。可多次指定该参数添加多个附件。
附件限制:最多9张图片,或1个视频,或1份文档。不可混合不同类型的附件。
bash
linkedin post create 'Excited to share our latest update!' --json -q

With a document

附带文档

linkedin post create 'Our Q4 report'
--attachments "https://example.com/report.pdf:document:Q4 Report" --json -q
linkedin post create 'Our Q4 report'
--attachments "https://example.com/report.pdf:document:Q4 Report" --json -q

Post as a company

以企业账号发布

linkedin post create 'Company announcement'
--company-url https://www.linkedin.com/company/name --json -q
undefined
linkedin post create 'Company announcement'
--company-url https://www.linkedin.com/company/name --json -q
undefined

React to a post

互动帖子

bash
linkedin post react <url> --type <reaction> [--company-url <url>] --json -q
Reaction types:
like
,
love
,
support
,
celebrate
,
insightful
,
funny
.
bash
linkedin post react https://www.linkedin.com/posts/username_activity-123 --type like --json -q
bash
linkedin post react <url> --type <reaction> [--company-url <url>] --json -q
支持的互动类型:
like
love
support
celebrate
insightful
funny
bash
linkedin post react https://www.linkedin.com/posts/username_activity-123 --type like --json -q

React on behalf of a company

以企业账号互动

linkedin post react https://www.linkedin.com/posts/username_activity-123 --type celebrate
--company-url https://www.linkedin.com/company/name --json -q
undefined
linkedin post react https://www.linkedin.com/posts/username_activity-123 --type celebrate
--company-url https://www.linkedin.com/company/name --json -q
undefined

Comment on a post

评论帖子

bash
linkedin post comment <url> '<text>' [--company-url <url>] --json -q
Text up to 1000 characters.
bash
linkedin post comment https://www.linkedin.com/posts/username_activity-123 'Great insights!' --json -q
bash
linkedin post comment <url> '<text>' [--company-url <url>] --json -q
评论文本最多1000字符。
bash
linkedin post comment https://www.linkedin.com/posts/username_activity-123 'Great insights!' --json -q

Comment on behalf of a company

以企业账号评论

linkedin post comment https://www.linkedin.com/posts/username_activity-123 'Well said!'
--company-url https://www.linkedin.com/company/name --json -q
undefined
linkedin post comment https://www.linkedin.com/posts/username_activity-123 'Well said!'
--company-url https://www.linkedin.com/company/name --json -q
undefined

Statistics

数据统计

bash
undefined
bash
undefined

Social Selling Index

社交销售指数(SSI)

linkedin stats ssi --json -q
linkedin stats ssi --json -q

Performance analytics (profile views, post impressions, search appearances)

账号表现分析(档案浏览量、帖子曝光量、搜索出现次数)

linkedin stats performance --json -q
linkedin stats performance --json -q

API usage for a date range

指定日期范围内的API使用统计

linkedin stats usage --start 2024-01-01T00:00:00Z --end 2024-01-31T00:00:00Z --json -q
undefined
linkedin stats usage --start 2024-01-01T00:00:00Z --end 2024-01-31T00:00:00Z --json -q
undefined

Sales Navigator

Sales Navigator 功能

Requires a LinkedIn Sales Navigator subscription. Uses hashed URLs for person/company lookups.
需要LinkedIn Sales Navigator订阅权限。使用哈希URL进行用户/企业查询。

Fetch person

获取Sales Navigator用户档案

bash
linkedin navigator person fetch <hashed-url> --json -q
bash
linkedin navigator person fetch <hashed-url> --json -q

Search people

搜索Sales Navigator用户

bash
linkedin navigator person search [flags] --json -q
FlagDescription
--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
--years-of-experience
Comma-separated ranges:
lessThanOne
,
oneToTwo
,
threeToFive
,
sixToTen
,
moreThanTen
bash
linkedin navigator person search --term "VP Marketing" --locations "United States" --json -q
linkedin navigator person search --years-of-experience "moreThanTen" --position "CEO" --json -q
bash
linkedin navigator person search [flags] --json -q
参数说明
--term
搜索关键词或短语
--limit
最大结果数量
--first-name
按名字过滤
--last-name
按姓氏过滤
--position
按职位过滤
--locations
逗号分隔的地区列表
--industries
逗号分隔的行业列表
--current-companies
逗号分隔的当前公司名称
--previous-companies
逗号分隔的过往公司名称
--schools
逗号分隔的学校名称列表
--years-of-experience
逗号分隔的经验范围:
lessThanOne
,
oneToTwo
,
threeToFive
,
sixToTen
,
moreThanTen
bash
linkedin navigator person search --term "VP Marketing" --locations "United States" --json -q
linkedin navigator person search --years-of-experience "moreThanTen" --position "CEO" --json -q

Fetch company

获取Sales Navigator企业档案

bash
linkedin navigator company fetch <hashed-url> [flags] --json -q
Optional flags:
  • --employees
    – include employees
  • --dms
    – include decision makers
Employee filters (require
--employees
):
FlagDescription
--employees-limit
Max employees to retrieve
--employees-first-name
Filter by first name
--employees-last-name
Filter by last name
--employees-positions
Comma-separated positions
--employees-locations
Comma-separated locations
--employees-industries
Comma-separated industries
--employees-schools
Comma-separated school names
--employees-years-of-experience
Comma-separated experience ranges
--dms-limit
Max decision makers to retrieve (requires
--dms
)
bash
linkedin navigator company fetch https://www.linkedin.com/sales/company/97ural --employees --dms --json -q
linkedin navigator company fetch https://www.linkedin.com/sales/company/97ural \
  --employees --employees-positions "Engineer,Designer" --employees-locations "Europe" --json -q
bash
linkedin navigator company fetch <hashed-url> [flags] --json -q
可选参数:
  • --employees
    – 包含企业员工信息
  • --dms
    – 包含企业决策者信息
员工过滤参数(需搭配
--employees
使用):
参数说明
--employees-limit
最大获取员工数量
--employees-first-name
按名字过滤
--employees-last-name
按姓氏过滤
--employees-positions
逗号分隔的职位列表
--employees-locations
逗号分隔的地区列表
--employees-industries
逗号分隔的行业列表
--employees-schools
逗号分隔的学校名称列表
--employees-years-of-experience
逗号分隔的经验范围
--dms-limit
最大获取决策者数量(需搭配
--dms
使用)
bash
linkedin navigator company fetch https://www.linkedin.com/sales/company/97ural --employees --dms --json -q
linkedin navigator company fetch https://www.linkedin.com/sales/company/97ural \
  --employees --employees-positions "Engineer,Designer" --employees-locations "Europe" --json -q

Search companies

搜索Sales Navigator企业

bash
linkedin navigator company search [flags] --json -q
FlagDescription
--term
Search keyword
--limit
Max results
--sizes
Comma-separated sizes:
1-10
,
11-50
,
51-200
,
201-500
,
501-1000
,
1001-5000
,
5001-10000
,
10001+
--locations
Comma-separated locations
--industries
Comma-separated industries
--revenue-min
Min annual revenue in M USD:
0
,
0.5
,
1
,
2.5
,
5
,
10
,
20
,
50
,
100
,
500
,
1000
--revenue-max
Max annual revenue in M USD:
0.5
,
1
,
2.5
,
5
,
10
,
20
,
50
,
100
,
500
,
1000
,
1000+
bash
linkedin navigator company search --term "fintech" --sizes "11-50,51-200" --json -q
linkedin navigator company search --revenue-min 10 --revenue-max 100 --locations "United States" --json -q
bash
linkedin navigator company search [flags] --json -q
参数说明
--term
搜索关键词
--limit
最大结果数量
--sizes
逗号分隔的企业规模:
1-10
,
11-50
,
51-200
,
201-500
,
501-1000
,
1001-5000
,
5001-10000
,
10001+
--locations
逗号分隔的地区列表
--industries
逗号分隔的行业列表
--revenue-min
最小年收入(百万美元):
0
,
0.5
,
1
,
2.5
,
5
,
10
,
20
,
50
,
100
,
500
,
1000
--revenue-max
最大年收入(百万美元):
0.5
,
1
,
2.5
,
5
,
10
,
20
,
50
,
100
,
500
,
1000
,
1000+
bash
linkedin navigator company search --term "fintech" --sizes "11-50,51-200" --json -q
linkedin navigator company search --revenue-min 10 --revenue-max 100 --locations "United States" --json -q

Send InMail

发送InMail

bash
linkedin navigator message send <person-url> '<text>' --subject '<subject>' --json -q
Text up to 1900 characters. Subject up to 80 characters.
bash
linkedin navigator message send https://www.linkedin.com/in/username \
  'Would love to chat about API integrations' --subject 'Partnership Opportunity' --json -q
bash
linkedin navigator message send <person-url> '<text>' --subject '<subject>' --json -q
消息文本最多1900字符。主题最多80字符。
bash
linkedin navigator message send https://www.linkedin.com/in/username \
  'Would love to chat about API integrations' --subject 'Partnership Opportunity' --json -q

Get Sales Navigator conversation

获取Sales Navigator对话记录

bash
linkedin navigator message get <person-url> [--since TIMESTAMP] --json -q
bash
linkedin navigator message get <person-url> [--since TIMESTAMP] --json -q

Custom Workflows

自定义工作流

Execute a custom workflow definition from a file, stdin, or inline:
bash
undefined
从文件、标准输入或内联定义执行自定义工作流:
bash
undefined

From file

从文件加载工作流

linkedin workflow run --file workflow.json --json -q
linkedin workflow run --file workflow.json --json -q

From stdin

从标准输入加载工作流

cat workflow.json | linkedin workflow run --json -q
cat workflow.json | linkedin workflow run --json -q

Inline

内联工作流定义

echo '{"actions":[...]}' | linkedin workflow run --json -q

Check workflow status or wait for completion:

```bash
linkedin workflow status <id> --json -q
linkedin workflow status <id> --wait --json -q
See Building Workflows for the workflow JSON schema.
echo '{"actions":[...]}' | linkedin workflow run --json -q

查询工作流状态或等待工作流完成:

```bash
linkedin workflow status <id> --json -q
linkedin workflow status <id> --wait --json -q
工作流JSON schema请参考Building Workflows

Account Management

账号管理

bash
linkedin account list                            # List accounts (* = active)
linkedin account switch "Name"                   # Switch active account
linkedin account rename "Name" --name "New Name" # Rename account
linkedin reset                                   # Remove active account
linkedin reset --all                             # Remove all accounts
bash
linkedin account list                            # 列出所有关联账号(* = 当前活跃账号)
linkedin account switch "Name"                   # 切换活跃账号
linkedin account rename "Name" --name "New Name" # 重命名账号
linkedin reset                                   # 移除当前活跃账号
linkedin reset --all                             # 移除所有关联账号

Important Behavior

重要注意事项

  • Sequential execution. All operations for an account run one at a time. Multiple requests queue up.
  • Not instant. A real browser navigates LinkedIn – expect 30 seconds to several minutes per operation.
  • Timestamps in UTC. All dates and times are in UTC.
  • Single quotes for text arguments. Use single quotes around message text, post text, and comments to avoid shell interpretation issues with special characters.
  • Action limits. Per-account limits are configurable on the platform. A
    limitExceeded
    error means the limit was reached.
  • URL normalization. All LinkedIn URLs in responses are normalized to
    https://www.linkedin.com/...
    format without trailing slashes.
  • Null fields. Fields that are unavailable are returned as
    null
    or
    []
    , not omitted.
  • 顺序执行:同一账号的所有操作会按顺序执行,多个请求会进入队列等待。
  • 非即时执行:通过真实浏览器访问LinkedIn——每个操作预计需要30秒到数分钟不等。
  • 时间戳为UTC时区:所有日期和时间均使用UTC时区。
  • 文本参数使用单引号:消息、帖子、评论等文本参数请使用单引号包裹,避免特殊字符被Shell解析。
  • 操作限制:每个账号的操作限制可在平台配置。若返回
    limitExceeded
    错误,表示已达到限制。
  • URL标准化:响应中所有LinkedIn URL都会被标准化为
    https://www.linkedin.com/...
    格式,且无末尾斜杠。
  • 空字段处理:无法获取的字段会返回
    null
    []
    ,不会被省略。