LinkedIn 账号搜索 API
接口健康状态
- 24h 健康值
- 正常
- 健康 / 正常
- 可用
- 少量可用
- 基本不可用
24 小时趋势
30 天趋势
账号搜索:返回列表,默认 10 条、单次最多 100 条;主要字段 id、username、name、url、headline、location。
请求发到 POST https://api.everyinfra.com/api/v1/social,platform 填 linkedin,action 填 profile_search。 单价 $0.56 / 千次(每次 $0.000556),失败和空结果都不收费。 同步返回;慢任务可在请求体加 "mode": "async",先拿 job_id 再轮询。
LinkedIn 账号搜索按当前职位头衔查找公开的个人档案,可以用 location 限定所在地,每行带姓名、用户名、主页链接、一句话标签、所在地、当前公司和职位、头像,以及是否付费会员、是否开放主页。它回答「某个地方做这类工作的有哪些人」,适合招聘方寻找候选人,销售团队按职位圈定潜在客户,以及调研人才分布。
keyword 填职位头衔,例如 software engineer,不能按姓名或邮箱精确查人。headline 是本人自填的标签,按职位或公司筛选时用 current_title 和 current_company 更直接。要看完整资料,把结果里的 url 传给 LinkedIn 个人职业资料。
AI 提示词
#请帮我用 EveryInfra 的「LinkedIn 账号搜索」接口(linkedin/profile_search)写一个数据采集脚本。
接口约定:
- 请求:POST https://api.everyinfra.com/api/v1/social,请求头 Authorization: Bearer <API Key>;Key 从环境变量 EVERYINFRA_API_KEY 读取,不要写进代码。
- 请求体里 platform 填 linkedin,action 填 profile_search,参数放在 params 里。
- 必填参数:
- keyword:search 为帖子关键词,profile_search 为当前职位头衔,jobs 为岗位搜索词或完整职位搜索 URL。搜人并不等同于按人物姓名或邮箱精确查询。
- 可选参数:
- location:profile_search 的人物所在地文本;jobs 中为岗位地点,keyword 已是完整 URL 时不再追加;person_profile 不按它筛选。
- locations:地点数组兼容输入,建议改用 location;它不保证与 location 效果相同,也不能用来做跨国家批量搜索。
- limit:这次调用最多返回的条数,整数,1–100;不传按默认值,实际返回可能少于这个数。超过上限会在扣费前返回 422。(默认 10)
- 返回一组记录,每条记录的主要字段:id、username、name、url、headline(个人主页一句话标签)、location、current_company(当前公司)、current_title(当前职位)、avatar_url、is_premium(是否为付费会员)、is_open_profile(是否开启开放主页(非人脉也能私信))、email(邮箱);一共 22 个字段,完整列表见 https://api.everyinfra.com/api/v1/social/catalog?platform=linkedin。
- 示例请求体:
{
"platform": "linkedin",
"action": "profile_search",
"params": {
"keyword": "software engineer"
}
}
- 计费:$0.56 / 千次;失败和空结果不扣费。
- 一次要采几十上百个时,在请求体加 "mode": "async":先拿到 job_id,再轮询 GET https://api.everyinfra.com/api/v1/jobs/{job_id} 取结果。
- 返回 422 时,按错误信息里的候选参数和允许值修正;返回 429 或 503 时,按 Retry-After 等待后重试。
写代码前,先问清楚我要采哪些对象、一共多少个、需要哪些字段、结果存成什么格式,再把方案和大概花费讲给我确认。请求参数
#| 参数名 | 位置 | 类型 | 必填 | 默认值 | 说明 |
|---|---|---|---|---|---|
Authorization | header | string | 是 | - | Bearer 加你的 API Key。在控制台创建;不要放进网址或代码仓库。 |
platform | body | string | 是 | linkedin | 平台标识,固定值。 |
action | body | string | 是 | profile_search | 能力标识,固定值。 |
keyword | body.params | string | 是 | - | search 为帖子关键词,profile_search 为当前职位头衔,jobs 为岗位搜索词或完整职位搜索 URL。搜人并不等同于按人物姓名或邮箱精确查询。 |
location | body.params | string | 否 | - | profile_search 的人物所在地文本;jobs 中为岗位地点,keyword 已是完整 URL 时不再追加;person_profile 不按它筛选。 |
locations | body.params | array | 否 | - | 地点数组兼容输入,建议改用 location;它不保证与 location 效果相同,也不能用来做跨国家批量搜索。 |
limit | body.params | integer (1–100) | 否 | 10 | 这次调用最多返回的条数,整数,1–100;不传按默认值,实际返回可能少于这个数。超过上限会在扣费前返回 422。 |
代码示例
#curl -X POST 'https://api.everyinfra.com/api/v1/social' \
-H "Authorization: Bearer $EVERYINFRA_API_KEY" \
-H 'Content-Type: application/json' \
--data-raw '{
"platform": "linkedin",
"action": "profile_search",
"params": {
"keyword": "software engineer"
}
}'OpenAPI 定义 (JSON)示例从环境变量 EVERYINFRA_API_KEY 读取 Key,复制出去的代码不含你的 Key。
响应示例
#{ "id": "req_…", "platform": "linkedin", "action": "profile_search", "results": [ { "id": "•••", "username": "•••", "name": "•••", "url": "https://linkedin.com/•••", "headline": "•••", "location": "•••", "avatar_url": "https://media.licdn.com/•••", "is_premium": false, "is_open_profile": false, "platform": "linkedin" }, { "id": "•••", "username": "•••", "name": "•••", "url": "https://linkedin.com/•••", "headline": "•••", "location": "•••", "avatar_url": "https://media.licdn.com/•••", "is_premium": false, "is_open_profile": false, "platform": "linkedin" } ], "count": 10, "billing": { "charged": …, "charged_usd": …, "balance_after_usd": …, … }, "quota": { … }}
返回字段
#业务数据在 results 里;下表是每条记录可能包含的字段,平台没有提供的值不会被编造。
| 字段 | 含义 |
|---|---|
id | 该记录在原平台上的唯一标识。仅在同一平台内唯一,跨平台可能重复。 |
username | 用户名(@handle)。 |
name | 名称。用于账号/商品/商家类能力,指该对象本身的名字。 |
url | 该记录在原平台上的可访问链接。 |
headline | 个人主页一句话标签,用户自填。 |
location | 地理位置描述,原文透传,格式随平台而异。 |
current_company | 当前公司。 |
current_title | 当前职位。 |
avatar_url | 头像图片链接。部分平台给的是带尺寸参数的 CDN 链接,可能有时效。 |
is_premium | 是否为付费会员。 |
is_open_profile | 是否开启开放主页(非人脉也能私信)。 |
email | 邮箱。person_profile、profile_search 是按公开资料推测并校验的工作邮箱,employees 只在平台有公开时返回;可能为空,不代表对方同意营销联系。 |
about | 个人简介长文。 |
follower_count | 粉丝数。null 表示不公开,不等于 0。 |
connection_count | 人脉连接数。1st/2nd 度人脉规模的直接体现。 |
is_verified | 是否为平台认证账号(蓝V等)。null 表示无法判定。 |
is_creator | 是否为创作者模式主页。 |
is_influencer | 是否为 LinkedIn 认证影响者。 |
is_top_voice | 是否为 LinkedIn Top Voice(金色徽章)。 |
current_company_url | 当前公司的 LinkedIn 主页链接。 |
experience | 工作经历列表(person_profile、profile_search):每项含职位、公司、公司主页链接、起止时间与时长文本,有时另有 location(地点)、description(描述)、employment_type(雇佣类型)、skills(技能)。 |
education | 教育经历列表(person_profile、profile_search):每项含学校、学校主页链接、起止时间与时长文本。 |
platform | 数据来源平台标识,与请求里的 platform 一致(如 xiaohongshu、tiktok)。 |
常见问题
#keyword 能填人名或邮箱吗?
#不能。keyword 是当前职位头衔,例如 software engineer 或 product manager,用来按头衔找人,不是按姓名或邮箱精确查找。已经知道某人的主页时,用 LinkedIn 个人职业资料直接读取,它接受 /in/ 路径里的用户名或完整的个人主页链接。
location 和 locations 有什么区别?
#location 是人物所在地的文本,例如 London,用来限定搜索范围。locations 是地点数组的兼容写法,效果不一定和 location 一致,也不能当成一次搜多个国家的办法;一般只传 location。
is_open_profile 有什么用?
#is_open_profile 为真表示对方开启了开放主页,不是人脉也能直接私信;is_premium 标出付费会员。招聘或销售触达时,可以先从开放主页的人开始,再看 headline 和 current_title 判断是否合适。
错误与计费
#- 401
- 缺少 Key 或 Key 无效。
- 402
- 余额不足,先充值。
- 422
- 参数名或取值不对,按错误信息给的候选改;不扣费。
- 429
- 超过每分钟请求上限,按 Retry-After 等待后再试。
- 503
- 暂时无法完成,预扣的费用退回;结果未知时先核对,不要直接重发。
- 200 空结果
- 没有数据,不扣费。