# LinkedIn 个人动态 API (linkedin.person_posts)

- Canonical page: https://everyinfra.com/linkedin-api/person_posts
- Endpoint: POST /api/v1/social with {"platform": "linkedin", "action": "person_posts", "params": {...}}
- Price: $0.004 per call ($4 per 1,000 requests); failed and empty results are not charged
- Returns: list, default 10, max 50 per call (larger values are capped)
- Mode: sync; add "mode": "async" for slow tasks

领英个人动态按 `username` 读取一位职场人士最近在 LinkedIn 上发的帖子，从新到旧，每条带正文、发布时间、评论与转发数，以及按表情类型拆开的 `reactions`。它回答「这个人最近在公开谈什么、哪些话题有人回应」，适合销售在第一次联系前做功课、招聘方了解候选人的公开表达，或者持续跟踪行业意见领袖的观点变化。

`username` 填个人主页 /in/ 后面那段，也可以贴完整主页链接；只给姓名认不出是谁，会在扣费前被拒。要看公司主页发了什么，换公司动态，那边填公司短名。`author_headline` 是发帖人的 headline，读个人帖时可以拿它和 `author_name` 一起核对是不是要找的那个人。

## Health

- Live health (24h percent, hourly and daily trends): https://api.everyinfra.com/api/v1/social/availability?platform=linkedin&action=person_posts

## Parameters

| name | type | required | default | description |
|---|---|---|---|---|
| username | not declared | yes | not declared | 要读动态的个人：LinkedIn 个人主页 /in/ 后面那段（如 williamhgates），或完整主页链接；只给姓名认不出来，扣费前拒。 |
| limit | integer (1–50) | no | 10 | 这次调用最多返回的条数，整数，1–50；不传按默认值，实际返回可能少于这个数。超过上限照收，按上限返回。 |

## Response fields (items in `results`)

| field | meaning |
|---|---|
| id | 该记录在原平台上的唯一标识。仅在同一平台内唯一，跨平台可能重复。 |
| url | 该记录在原平台上的可访问链接。 |
| text | 正文内容，已去除 HTML 标签，全文返回、不截断（个别平台的列表结果本身只有摘要，以该平台的字段说明为准）。 |
| author_name | 作者昵称（显示名）。 |
| author_username | 作者用户名（@handle），通常可用于拼 URL。 |
| author_headline | 内容作者的 headline（帖子/评论里用）。 |
| author_id | 帖子作者的数字成员 ID（search）。 |
| author_url | 作者在原平台的主页链接。 |
| author_avatar_url | 帖子作者头像链接（search）。 |
| author_type | 帖子作者类型：profile（个人）/ company（公司）。 |
| reactions | 各类反应数（search）：每项 type（like、appreciation、empathy 等）与 count。 |
| attachment | 帖子附带的卡片（search）：type（如 job、article）、title、description、subtitle、url、image_url。 |
| like_count | 点赞数。null 表示该平台或该接口不公开此数据，不等于 0。 |
| comment_count | 评论数。null 表示不公开，不等于 0。 |
| share_count | 帖子被转发的次数。 |
| hashtags | 公司/帖子的话题标签列表。 |
| is_reshare | 帖子是否为转发。 |
| posted_at | 发布时间，ISO 8601 格式、UTC 时区（如 2026-08-07T12:34:56+00:00）。平台只给非标准字符串时原样透传，解析前建议做容错。null 表示平台未公开。 |
| platform | 数据来源平台标识，与请求里的 platform 一致（如 xiaohongshu、tiktok）。 |

## Example

```bash
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": "person_posts",
  "params": {
    "username": "williamhgates"
  }
}'
```

```python
import os
import requests

response = requests.post(
    "https://api.everyinfra.com/api/v1/social",
    headers={"Authorization": f"Bearer {os.environ['EVERYINFRA_API_KEY']}"},
    json={
        "platform": "linkedin",
        "action": "person_posts",
        "params": {
            "username": "williamhgates",
        },
    },
    timeout=120,
)
print(response.status_code)
print(response.json())
```

## Response example

No real sample for these example parameters yet: structure only, every value is a placeholder (…).

```text
{
  "id": "req_…",
  "platform": "linkedin",
  "action": "person_posts",
  "results": [
    {
      "id": …,
      "url": …,
      "text": …,
      "author_name": …,
      "author_username": …,
      "author_headline": …,
      "author_id": …,
      "author_url": …,
      "author_avatar_url": …,
      "author_type": …,
      "reactions": …,
      "attachment": …,
      "like_count": …,
      "comment_count": …,
      "share_count": …,
      "hashtags": …,
      "is_reshare": …,
      "posted_at": …,
      "platform": …
    }
  ],
  "count": …,
  "billing": {
    "charged": …,
    "charged_usd": …,
    "balance_after_usd": …,
    …
  },
  "quota": { … }
}
```

## FAQ

### `is_reshare` 为真的帖子算这个人的原创吗？

不算。`is_reshare` 为真表示这条是转发别人的内容，不是本人写的。做观点分析或统计发帖频率时，建议先按它把转发过滤掉，只看原创帖的 `text`，结论会更贴近这个人自己的表达。按 `is_reshare` 分成两组后，可以各自统计 `like_count` 和 `comment_count`，看原创帖和转发帖哪一种更有人回应。

### `reactions` 和 `like_count` 有什么区别？

`like_count` 是这条帖子收到的表情反应总数；`reactions` 把它按类型拆开，每一项是一种反应（点赞、庆祝、支持、有见地等）和对应次数。只比较热度看 `like_count` 就够，想知道读者是认同还是被打动，看 `reactions` 的构成。`share_count` 是帖子被转发的次数，和 `is_reshare` 是两回事：前者是别人转了这条帖，后者是这条帖是不是转发。`like_count` 和 `comment_count` 为 null 表示不公开，不等于 0。

### 能一直往前读到更早的帖子吗？

不能翻页。每次调用都从最新一条往回取，`limit` 决定取几条，到上限为止。要长期留存一个人的全部动态，可以定期调用，按 `id` 去重后累积到自己的库里，这样新帖不会漏，旧帖也不会重复计数。`limit` 给多大都不会超过 50 条。`posted_at` 可能是平台给的非标准字符串，会原样透传，解析前要做好容错；为 null 表示平台未公开。`id` 只在 LinkedIn 内唯一，跨平台合并时要连同 `platform` 一起当键。

## Also

- Capability catalog (no key): https://api.everyinfra.com/api/v1/social/catalog?platform=linkedin
- OpenAPI: https://everyinfra.com/openapi.json · Agents guide: https://everyinfra.com/agents.md
