# 快手 直播榜 API (kuaishou.live_rank)

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

快手直播榜用 `category` 选分类：总榜 `all`（默认）、音乐、舞蹈、颜值、国艺、相亲、游戏、二次元、故事、团播、九宫格，每次返回这一类的整张榜，每行带名次、主播昵称、快手用户 ID、头像、直播间标题 `subtitle`、人气值和正在进行的直播场次 ID。它回答「此刻快手上哪些直播间最火」，适合公会和经纪机构找主播、品牌挑选直播合作对象，或研究不同品类直播的热度。

`popularity` 是快手自有的人气指标，只在同一张榜里比较，不同分类之间不能直接对比。

## Health

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

## Parameters

| name | type | required | default | description |
|---|---|---|---|---|
| category | enum: all / anime / chinese_art / dance / dating / gaming / group_live / looks / multi_host / music / story | no | not declared | 直播榜分类：all 总榜（默认）/ music 音乐 / dance 舞蹈 / looks 颜值 / chinese_art 国艺 / dating 相亲 / gaming 游戏 / anime 二次元 / story 故事 / group_live 团播 / multi_host 九宫格。每次给这一类的整个榜（最多 50 个主播）。 |
| limit | integer (1–50) | no | 50 | 这次调用最多返回的条数，整数，1–50；不传按默认值，实际返回可能少于这个数。超过上限照收，按上限返回。 |

## Response fields (items in `results`)

| field | meaning |
|---|---|
| rank | 榜单名次，从 1 开始，按快手榜单顺序（trending、hot_boards：置顶的那条排第 1）。 |
| name | 上榜对象的名字（live_rank、shopping_rank、brand_rank、hot_person_board）：主播 / 品牌账号昵称，带货榜商品行是商品标题。 |
| type | 上榜对象的类型（rank 类能力）：user 账号（主播、品牌、人物）/ product 商品（只有 shopping_rank 的 products 榜）。 |
| user_id | 快手数字用户 ID（rank 类能力、user_search、user_live），可传 user_live 查直播状态。 |
| avatar_url | 头像图片链接。部分平台给的是带尺寸参数的 CDN 链接，可能有时效。 |
| subtitle | 榜单上名字下面那行字（live_rank 是直播间标题，hot_person_board 没有这一项，见 reason）。 |
| live_stream_id | 正在进行的直播场次 ID（live_rank、shopping_rank、brand_rank 的主播行；没在播时没有）。 |
| popularity | 榜单上显示的人气 / 热度，换成整数（「15.5万人气」→ 155000），快手自有指标，只在同一个榜里比较。 |
| 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": "kuaishou",
  "action": "live_rank",
  "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": "kuaishou",
        "action": "live_rank",
        "params": {},
    },
    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": "kuaishou",
  "action": "live_rank",
  "results": [
    {
      "rank": …,
      "name": …,
      "type": …,
      "user_id": …,
      "avatar_url": …,
      "subtitle": …,
      "live_stream_id": …,
      "popularity": …,
      "platform": …
    }
  ],
  "count": …,
  "billing": {
    "charged": …,
    "charged_usd": …,
    "balance_after_usd": …,
    …
  },
  "quota": { … }
}
```

## FAQ

### 直播榜能看出直播间在播什么吗？

能大致看出。`subtitle` 是直播间标题；配合请求时选的 `category`，能大致判断这场直播的内容方向。

### 怎么找到适合合作的主播？

读你关心的分类榜，按 `popularity` 和上榜频次挑出主播，再用 `user_id` 去读他们的作品，看内容风格和观众互动是否合适。定时读榜能区分稳定在榜的主播和偶尔冲上来的主播。

### 直播榜和带货榜有什么不同？

直播榜按内容品类排主播，看的是人气；带货榜看电商，分热门主播和热销商品两张，商品行带价格和小店商品 ID。做娱乐直播合作看直播榜，找带货主播看带货榜。

## Also

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