# LinkedIn 内容详情 API (linkedin.post_detail)

- Canonical page: [https://everyinfra.com/linkedin-api/post_detail](https://everyinfra.com/linkedin-api/post_detail?utm_medium=ai_doc&utm_campaign=page_md)
- Endpoint: POST https://api.everyinfra.com/api/v1/social with {"platform": "linkedin", "action": "post_detail", "params": {...}}
- Price: $0.000792 per call ($0.79 per 1,000 requests); failed calls and empty results are not charged
- Returns: single object
- Mode: sync; add "mode": "async" for slow tasks

## Health

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

## Parameters

| name | type | required | default | description |
|---|---|---|---|---|
| url | not declared | yes | not declared | 一条 LinkedIn 帖子：帖子链接（https://www.linkedin.com/posts/<名字>-activity-<编号>-<后缀>）、动态链接（https://www.linkedin.com/feed/update/urn:li:activity:<编号>/）、urn:li:activity:<编号>，或 15 到 25 位的 activity 编号。链接和 urn 里 activity 换成 ugcPost 或 share 的写法也收，链接后面的查询串会被忽略。领英文章链接（https://www.linkedin.com/pulse/<标题短名>）也收，文章另带 title。公司主页、个人主页和职位链接不是帖子，返回 422，不扣费。 |

## Response fields (items in `results`)

| field | meaning |
|---|---|
| id | 该记录在原平台上的唯一标识。仅在同一平台内唯一，跨平台可能重复。 |
| url | 该记录在原平台上的可访问链接。 |
| title | 标题。平台无标题概念时（如纯文本帖）为 null。 |
| text | 正文内容，已去除 HTML 标签，全文返回、不截断（个别平台的列表结果本身只有摘要，以该平台的字段说明为准）。 |
| posted_at | 发布时间，ISO 8601 格式、UTC 时区（如 2026-08-07T12:34:56+00:00）。平台只给非标准字符串时原样透传，解析前建议做容错。null 表示平台未公开。 |
| is_edited | 帖子是否被编辑过。 |
| like_count | 点赞数。null 表示该平台或该接口不公开此数据，不等于 0。 |
| comment_count | 评论数。null 表示不公开，不等于 0。 |
| media_type | 帖子带的内容类型（post_detail）：text 纯文字 / image 图片 / video 视频 / article 带文章链接 / document 带文档。 |
| image_urls | 图片链接数组，按平台展示顺序；没有图片时不出现这个字段。 |
| video_url | 视频地址（post_detail）；只有视频帖有这个字段。 |
| thumbnail_url | 缩略图链接，分辨率低于 image_url。 |
| links | 正文里的站外链接数组（post_detail）；没有时没有这个字段。 |
| mentions | 正文里提到的账号的短名数组（post_detail），如 microsoft；没有时没有这个字段。 |
| hashtags | 公司/帖子的话题标签列表。 |
| author_name | 作者昵称（显示名）。 |
| author_username | 作者用户名（@handle），通常可用于拼 URL。 |
| author_url | 作者在原平台的主页链接。 |
| author_avatar_url | 帖子作者头像链接（search、post_detail）。 |
| author_headline | 内容作者的 headline（帖子/评论里用）。 |
| author_type | 帖子作者类型：profile（个人）/ company（公司）。 |
| author_follower_count | 作者粉丝数。null 表示不公开。 |
| reshared_post | 被转发的那一条帖子（post_detail）：id、url、text、posted_at、author_name、author_username、author_url、author_type；只在这条帖子是转发时有。 |
| 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": "post_detail",
  "params": {
    "url": "https://www.linkedin.com/feed/update/urn:li:activity:7529230174937169921/"
  }
}'
```

```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": "post_detail",
        "params": {
            "url": "https://www.linkedin.com/feed/update/urn:li:activity:7529230174937169921/",
        },
    },
    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": "post_detail",
  "results": {
    "id": …,
    "url": …,
    "title": …,
    "text": …,
    "posted_at": …,
    "is_edited": …,
    "like_count": …,
    "comment_count": …,
    "media_type": …,
    "image_urls": …,
    "video_url": …,
    "thumbnail_url": …,
    "links": …,
    "mentions": …,
    "hashtags": …,
    "author_name": …,
    "author_username": …,
    "author_url": …,
    "author_avatar_url": …,
    "author_headline": …,
    "author_type": …,
    "author_follower_count": …,
    "reshared_post": …,
    "platform": …
  },
  "billing": {
    "charged": …,
    "charged_usd": …,
    "balance_after_usd": …,
    …
  },
  "quota": { … }
}
```

## 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
