# 微博 热榜 API (weibo.trending)

- Canonical page: https://everyinfra.com/weibo-api/trending
- Endpoint: POST https://api.everyinfra.com/api/v1/social with {"platform": "weibo", "action": "trending", "params": {...}}
- Price: $0.000556 per call ($0.56 per 1,000 requests); failed calls and empty results are not charged
- Returns: list, default 20, max 200 per call
- 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=weibo&action=trending

## Parameters

| name | type | required | default | description |
|---|---|---|---|---|
| limit | integer (1–200) | no | 20 | 这次调用最多返回的条数，整数，1–200；不传按默认值，实际返回可能少于这个数。超过上限会在扣费前返回 422。 |

## Response fields (items in `results`)

| field | meaning |
|---|---|
| rank | 热搜排名。 |
| title | 标题。平台无标题概念时（如纯文本帖）为 null。 |
| category | 分类名称，取值为原平台的分类体系，未做跨平台归一。 |
| hot_value | 热搜热度值。微博自有指标，只在榜单内可比。 |
| label | 热搜标签（爆/热/新）。 |
| is_hot | 是否为热门。 |
| is_new | 是否为新上榜。 |
| url | 该记录在原平台上的可访问链接。 |
| 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": "weibo",
  "action": "trending",
  "params": {}
}'
```

```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": "trending",
        "params": {},
    },
    timeout=120,
)
print(response.status_code)
print(response.json())
```

## Response example

Real response to the example request above, captured 2026-09-26T08:56:04Z. `results` and `count` are real with personal information (names, handles, avatars, profile links, contact details) removed; the list keeps the first 2 of 20. `id`, `billing` and `quota` differ on every call, so only their shape is shown.

```text
{
  "id": "req_…",
  "platform": "weibo",
  "action": "trending",
  "results": [
    {
      "rank": 1,
      "title": "中美达成八点成果共识",
      "hot_value": 2135066,
      "is_hot": false,
      "is_new": false,
      "url": "https://s.weibo.com/weibo?q=%23中美达成八点成果共识%23",
      "platform": "weibo"
    },
    {
      "rank": 2,
      "title": "张本智和淘汰",
      "hot_value": 8092453,
      "label": "爆",
      "is_hot": true,
      "is_new": false,
      "url": "https://s.weibo.com/weibo?q=张本智和淘汰",
      "platform": "weibo"
    }
  ],
  "count": 20,
  "billing": {
    "charged": …,
    "charged_usd": …,
    "balance_after_usd": …,
    …
  },
  "quota": { … }
}
```

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