# LinkedIn API 数据接口

LinkedIn API（数据接口）可以搜帖子，读帖子详情、账号资料和账号发布的帖子，不用登录 LinkedIn 账号，也不用提供 Cookie。每次调用 2 积分（约 $0.004–$0.0067），失败不扣。LinkedIn 不提供浏览量，这个字段返回 null。可以直接发 HTTP 请求，也可以通过 MCP 接到 AI 客户端里用。最近实测：2026-10-17。

- 页面：https://socialtoai.com/zh/platforms/linkedin/
- 最近更新：2026-10-17
- 最近实测：2026-10-17

## 可用的动作

| 动作 | 返回什么 | 由什么参数选中 | 价格键 | 积分 | 参数和字段 |
| --- | --- | --- | --- | --- | --- |
| `search` | 按关键词找帖子：正文、作者、点赞数、评论数和发布时间。 | — | `linkedin.search` | 2 | https://socialtoai.com/zh/linkedin-search-api.md |
| `detail` | 用编号或链接取一条帖子：正文、作者、点赞数、评论数和发布时间。 | — | `linkedin.detail` | 2 | https://socialtoai.com/zh/linkedin-detail-api.md |
| `detail` | 视频的逐字稿 | `include=transcript` | `linkedin.detail:transcript` | 2 | https://socialtoai.com/zh/linkedin-detail-api.md |
| `user_profile` | 一个账号：名称和简介。 | — | `linkedin.user_profile` | 2 | https://socialtoai.com/zh/linkedin-user-profile-api.md |
| `user_posts` | 一个账号最近发布的帖子。 | — | `linkedin.user_posts` | 2 | https://socialtoai.com/zh/linkedin-user-posts-api.md |

LinkedIn 不提供：热榜和评论。

## 调用示例

```bash
curl https://api.socialtoai.com/v1/search \
  -H "Authorization: Bearer $SOCIALTOAI_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "platform": "linkedin",
    "query": "ai agents"
  }'
```

## LinkedIn 独有的接口

每个接口用自己的 op，通过 `POST /v1/call/{op}` 调用；完整的参数和返回字段在它自己的页面。

### 广告

| 接口 | 做什么 | 价格键 | 积分 | 参数和字段 |
| --- | --- | --- | --- | --- |
| 广告详情 (预览) | 按编号或链接取 LinkedIn 广告库里的一条广告。 | `linkedin.ad_detail` | 2 | https://socialtoai.com/zh/linkedin-ad-detail-api.md |
| 广告库搜索 (预览) | 按关键词搜 LinkedIn 广告库里的广告。 | `linkedin.ad_search` | 2 | https://socialtoai.com/zh/linkedin-ad-search-api.md |

预览：这个接口还没有标为稳定，参数和返回字段之后可能调整。计费和其他调用一样，调用失败不扣积分。

## LinkedIn 给不了的字段

这些字段在对应的调用里始终是 null，并列在返回的 `unavailable` 里。

| 字段 | 哪些动作 |
| --- | --- |
| `format` | search, detail, user_posts |
| `title` | search, detail, user_posts |
| `author.id` | search, detail, user_posts |
| `author.verified` | search, detail, user_posts |
| `metrics.shares` | search, detail, user_posts |
| `metrics.collects` | search, detail, user_posts |
| `metrics.views` | search, detail, user_posts |
| `metrics.reposts` | search, detail, user_posts |
| `hashtags` | search, detail, user_posts |
| `is_pinned` | search, detail, user_posts |
| `verified` | user_profile |
| `followers` | user_profile |
| `following` | user_profile |
| `posts_count` | user_profile |
| `author.username` | user_posts |
| `author.name` | user_posts |
| `author.followers` | user_posts |
| `metrics.likes` | user_posts |
| `metrics.comments` | user_posts |
| `images` | user_posts |

## 在 AI 里直接问

- 这周 LinkedIn 上，家用咖啡和抹茶哪个更火？ → search, search: 4 积分

- 这个 LinkedIn 账号有多大？最近发了什么？ → user_profile, user_posts: 4 积分

- 查一下这个 LinkedIn 账号，告诉我它是谁。 → user_profile: 2 积分

## 能读 LinkedIn 的现成工具

- [品牌口碑](https://socialtoai.com/zh/tools/brand-buzz.md)：各平台上的态度占比、提到最多的事，以及背后的帖子
- [账号监测](https://socialtoai.com/zh/tools/account-watch.md)：每个账号最近发了什么，哪条明显好于平时
- [达人档案](https://socialtoai.com/zh/tools/creator-card.md)：这个人在其他平台的账号、各自的数据，以及是同一人的把握
- [批量链接数据](https://socialtoai.com/zh/tools/batch-stats.md)：每条链接一行，给出现在的数字；失效的链接会标出来

## 官方 API

LinkedIn 可自助开通的 API 权限只包括登录（读取用户本人的姓名、职位标题、头像和邮箱）和代用户发帖。其余接口须加入 LinkedIn 合作伙伴计划并获批准；开放权限中没有读取他人帖子的接口。

来源：[LinkedIn 官方开发者文档](https://learn.microsoft.com/en-us/linkedin/shared/authentication/getting-access)，核对于 2026-10-17。
