# 微博 内容详情 API (weibo.post_detail)

- Canonical page: https://everyinfra.com/weibo-api/post_detail
- Endpoint: POST /api/v1/social with {"platform": "weibo", "action": "post_detail", "params": {...}}
- Price: $0.000806 per call ($0.81 per 1,000 requests); failed and empty results are not charged
- Returns: single object
- Mode: sync; add "mode": "async" for slow tasks

微博内容详情按单条微博的 `url` 或数字 ID 读取一条微博的全部信息：长微博全文、发布时间、发布设备、转评赞数、阅读数 `view_count`（微博显示时才有）、图片和视频、视频时长，以及作者简介、粉丝数和认证说明。转发微博还带原微博 ID `original_post_id`，可以接着读原文。它回答「这条微博到底说了什么、传播得怎样」，适合舆情核查、热点溯源和给列表结果补全正文。返回的是单个对象，不翻页。

链接支持 m.weibo.cn/detail/ 和 weibo.com/UID/ 两种写法，微博 ID 或字母短码都行。也可以直接填数字微博 ID，用户内容和在用户微博里搜索的结果行里的 `id` 就是它。

## Health

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

## Parameters

| name | type | required | default | description |
|---|---|---|---|---|
| url | not declared | yes | not declared | 单条微博的链接：https://m.weibo.cn/detail/<微博ID>、https://weibo.com/<用户UID>/<微博ID 或字母短码>，也可以直接填数字微博 ID（user_posts、search 返回行的 id）。 |

## Response fields (items in `results`)

| field | meaning |
|---|---|
| id | 该记录在原平台上的唯一标识。仅在同一平台内唯一，跨平台可能重复。 |
| url | 该记录在原平台上的可访问链接。 |
| text | 正文内容，已去除 HTML 标签，全文返回、不截断（个别平台的列表结果本身只有摘要，以该平台的字段说明为准）。 |
| posted_at | 发布时间，ISO 8601 格式、UTC 时区（如 2026-08-07T12:34:56+00:00）。平台只给非标准字符串时原样透传，解析前建议做容错。null 表示平台未公开。 |
| device | 发布设备（如「iPhone客户端」）。 |
| repost_count | 转发数（区别于引用转发）。null 表示不公开。 |
| comment_count | 评论数。null 表示不公开，不等于 0。 |
| like_count | 点赞数。null 表示该平台或该接口不公开此数据，不等于 0。 |
| view_count | 阅读数（post_detail）：微博显示的这条微博被阅读的次数；多数微博不显示阅读数，这时没有这个字段；user_posts 的列表回包里没有。 |
| is_repost | 是否为转发。 |
| original_post_id | 转发微博时，被转发的原微博 ID（post_detail / user_posts）；可作为 post_detail 的 url 传入读原微博。不是转发时没有这个键。 |
| is_long_text | 是不是长微博（post_detail / user_posts）。user_posts 上长微博的 text 只有开头一段（约 140 字）。 |
| author_id | 作者在原平台的唯一 ID。 |
| author_name | 作者昵称（显示名）。 |
| author_bio | 作者简介；作者没填时没有。 |
| author_follower_count | 作者粉丝数。null 表示不公开。 |
| author_following_count | 作者关注数。 |
| author_verified | 作者是否加 V。 |
| author_verified_reason | 认证说明（如「XX公司CEO」），判断大V身份靠它；没认证时没有。 |
| author_avatar_url | 作者头像。 |
| image_urls | 图片列表；不带图的微博没有。 |
| video_url | 视频链接；不是视频微博时没有。 |
| duration_sec | 视频时长（秒，post_detail / user_posts 的视频微博）。 |
| duration_seconds | 时长，单位秒。非视频/音频内容为 null。 |
| platform | 数据来源平台标识，与请求里的 platform 一致（如 xiaohongshu、tiktok）。 |
| next_page_token | 翻页令牌（user_search、user_posts、topic_search、user_post_search）：作为下一次请求的 page_token 原样传回取下一页；同一页每行的值相同，响应顶层也有同一个 next_page_token。没有该字段即到底。 |

## 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": "weibo",
  "action": "post_detail",
  "params": {
    "url": "https://weibo.com/1659899634/5326504200510190"
  }
}'
```

```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": "weibo",
        "action": "post_detail",
        "params": {
            "url": "https://weibo.com/1659899634/5326504200510190",
        },
    },
    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": "weibo",
  "action": "post_detail",
  "results": {
    "id": …,
    "url": …,
    "text": …,
    "posted_at": …,
    "device": …,
    "repost_count": …,
    "comment_count": …,
    "like_count": …,
    "view_count": …,
    "is_repost": …,
    "original_post_id": …,
    "is_long_text": …,
    "author_id": …,
    "author_name": …,
    "author_bio": …,
    "author_follower_count": …,
    "author_following_count": …,
    "author_verified": …,
    "author_verified_reason": …,
    "author_avatar_url": …,
    "image_urls": …,
    "video_url": …,
    "duration_sec": …,
    "duration_seconds": …,
    "platform": …,
    "next_page_token": …
  },
  "billing": {
    "charged": …,
    "charged_usd": …,
    "balance_after_usd": …,
    …
  },
  "quota": { … }
}
```

## FAQ

### 用户内容里的长微博被截断了，怎么读全文？

把那条微博的 `id` 作为 `url` 传进来。用户内容列表里的长微博只有开头约 140 字，内容详情返回全文；`is_long_text` 为 true 就说明它是长微博。这里的 `text` 全文返回、不截断，已经去掉 HTML 标签，可以直接入库或做分词。全文里的图片和视频分别在 `image_urls` 和 `video_url`，没有图片或不是视频时对应字段不出现。

### 为什么有的微博没有阅读数？

多数微博本身不显示阅读数，这时没有 `view_count` 这个字段。只有微博页面上显示了阅读数，这里才会返回；用户内容的列表里则一直没有这一项。`view_count` 缺失时按字段缺失处理，不要补 0。`repost_count` 是转发数，不含引用转发；`like_count`、`comment_count` 为 null 表示不公开，不等于 0。`device` 是发布设备，核对来源时可以一起存。

### 怎么顺着转发链找到原微博？

看 `is_repost` 和 `original_post_id`：转发微博会带原微博的 ID，把它作为 `url` 再调一次内容详情，就能读到原文和原作者。原微博读回来后，它的 `author_name` 和 `author_verified_reason` 是原作者的信息，不是转发者的。`original_post_id` 只在转发微博上出现，不是转发时没有这个键，可以直接用键在不在来判断要不要往上追。

## Also

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