返回顶部
l

linkdapiLinkdAPI工具

Work with LinkdAPI Python SDK for accessing LinkedIn professional profile and company data. Use when you need to fetch profile information, company data, job listings, or search for people/jobs on LinkedIn. The skill uses uv script pattern for ephemeral Python scripts with inline dependencies.

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 1.0.0
安全检测
已通过
1,991
下载量
免费
免费
4
收藏
概述
安装方式
版本历史

linkdapi

LinkdAPI Python SDK

用于LinkdAPI的Python SDK——以企业级可靠性获取来自LinkedIn的专业个人资料和公司数据。

获取您的API密钥: https://linkdapi.com/signup?ref=K_CZJSWF

快速启动模式

使用 uv脚本模式 创建带有内联依赖的临时Python脚本:

python

/// script


dependencies = [


linkdapi,


]


///

from linkdapi import LinkdAPI

client = LinkdAPI(YOURAPIKEY)
profile = client.getprofileoverview(ryanroslansky)
print(profile)

运行方式:
bash
uv run script.py

这将自动安装依赖、运行脚本并清理——非常适合一次性任务。

为什么选择这种模式

  • - 无需全局安装:依赖按脚本管理
  • 设计为临时性:编写、运行、删除——无需清理
  • 可复现:所有需要的内容都在一个文件中
  • 快速:uv处理依赖解析和缓存

编写脚本

脚本头部格式

始终以uv脚本块开头:

python

/// script


dependencies = [


linkdapi,


# 如需更多依赖请添加(例如rich、pandas)


]


///

常见任务

获取个人资料概览:
python

/// script


dependencies = [linkdapi]


///

from linkdapi import LinkdAPI

client = LinkdAPI(YOURAPIKEY)
profile = client.getprofileoverview(ryanroslansky)

if profile.get(success):
data = profile[data]
print(f{data[fullName]} - {data.get(headline, )})
print(f位置:{data.get(location)})

获取公司信息:
python

/// script


dependencies = [linkdapi]


///

from linkdapi import LinkdAPI

client = LinkdAPI(YOURAPIKEY)
company = client.getcompanyinfo(name=google)

if company.get(success):
data = company[data]
print(f{data[name]})
print(f行业:{data.get(industry)})
print(f员工数:{data.get(employeeCount, N/A)})

搜索职位:
python

/// script


dependencies = [linkdapi]


///

from linkdapi import LinkdAPI

client = LinkdAPI(YOURAPIKEY)
result = client.search_jobs(
keyword=软件工程师,
location=加利福尼亚州旧金山,
time_posted=1week
)

if result.get(success):
for job in result[data][jobs][:5]:
print(f{job[title]} 在 {job[company]})

批量个人资料丰富(异步):
python

/// script


dependencies = [linkdapi]


///

import asyncio
from linkdapi import AsyncLinkdAPI

async def enrich():
async with AsyncLinkdAPI(YOURAPIKEY) as api:
profiles = await asyncio.gather(
api.getprofileoverview(ryanroslansky),
api.getprofileoverview(satyanadella),
api.getprofileoverview(jeffweiner08)
)
for p in profiles:
if p.get(success):
print(p[data][fullName])

asyncio.run(enrich())

代理工作流程

当用户请求LinkedIn数据时:

  1. 1. 识别任务(个人资料查询、公司数据、职位搜索等)
  2. 在工作区编写临时脚本,包含uv脚本头部
  3. 添加依赖(通常只需linkdapi,如需其他依赖可添加)
  4. 导入并使用 LinkdAPI类
  5. 使用uv run运行
  6. 捕获输出并报告给用户
  7. 使用后删除脚本(可选)

示例工作流程

用户:获取jeffweiner08的个人资料

代理:
bash
cat > /tmp/linkdapi_query.py << EOF

/// script


dependencies = [linkdapi]


///

from linkdapi import LinkdAPI
import os

client = LinkdAPI(os.getenv(LINKDAPIAPIKEY))
profile = client.getprofileoverview(jeffweiner08)

if profile.get(success):
data = profile[data]
print(f姓名:{data[fullname]})
print(f头衔:{data.get(headline, N/A)})
print(f位置:{data.get(location, N/A)})
print(f公司:{data.get(company, N/A)})
else:
print(f错误:{profile.get(message)})
EOF

uv run /tmp/linkdapi_query.py
rm /tmp/linkdapi_query.py

获取API密钥

要使用LinkdAPI,您需要一个API密钥。请在此注册:

🔗 https://linkdapi.com/signup?ref=K_CZJSWF

注册后,您将获得一个API密钥,可用于验证您的请求。

身份验证

将API密钥设置为环境变量:

bash
export LINKDAPIAPIKEY=yourapikey_here

在脚本中使用:
python
import os
from linkdapi import LinkdAPI

client = LinkdAPI(os.getenv(LINKDAPIAPIKEY))

关键API方法

个人资料

  • - getprofileoverview(username) — 基本个人资料信息
  • getprofiledetails(urn) — 详细个人资料数据
  • getcontactinfo(username) — 电子邮件、电话、网站
  • getfullprofile(username=None, urn=None) — 完整个人资料
  • getfullexperience(urn) — 工作经历
  • geteducation(urn) — 教育经历
  • getskills(urn) — 技能与认可

公司

  • - getcompanyinfo(companyid=None, name=None) — 公司详情
  • companynamelookup(query) — 按名称搜索
  • getcompanyemployeesdata(companyid) — 员工统计
  • getcompanyjobs(companyids) — 职位列表

职位

  • - searchjobs(keyword, location, ...) — 搜索职位发布
  • getjobdetails(jobid) — 详细职位信息

搜索

  • - searchpeople(keyword, title, company, ...) — 查找人员
  • searchcompanies(keyword, industry, ...) — 查找公司
  • search_posts(keyword, ...) — 查找帖子

性能提示

  • - 使用AsyncLinkdAPI进行批量操作(快40倍)
  • 在asyncio.gather()中添加return_exceptions=True以实现优雅的错误处理
  • 使用上下文管理器(async with)进行正确的资源清理

错误处理

检查响应并处理错误:

python
result = client.getprofileoverview(username)

if result.get(success):
data = result[data]
# 处理数据
else:
print(fAPI错误:{result.get(message)})

参考

完整API文档:https://linkdapi.com/docs

标签

skill ai

通过对话安装

该技能支持在以下平台通过对话安装:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 linkdapi-1776128771 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 linkdapi-1776128771 技能

通过命令行安装

skillhub install linkdapi-1776128771

下载

⬇ 下载 linkdapi v1.0.0(免费)

文件大小: 2.79 KB | 发布时间: 2026-4-15 13:14

v1.0.0 最新 2026-4-15 13:14
Initial release of the linkdapi skill.

- Provides Python SDK access to LinkedIn profile and company data via LinkdAPI.
- Supports fetching of profile information, company data, job listings, and LinkedIn searches.
- Uses the uv script pattern: ephemeral Python scripting with inline dependency management.
- Includes examples for common tasks (profile lookup, company info, job search, async batch enrichment).
- Details authentication, API methods, error handling, and workflow best practices.

Archiver·手机版·闲社网·闲社论坛·羊毛社区· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2025 闲社网·线报更新论坛·羊毛分享社区·http://xianshe.com

p2p_official_large
返回顶部