# 快手 关键词搜索 API (kuaishou.search)

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

快手关键词搜索按 `keyword` 检索公开视频，每条带文案 `text`、时长、点赞评论分享数、发布时间，以及作者的昵称、快手号、粉丝数和作品数；有口播转写的视频还带 `transcript`。它回答「这个话题在快手上有哪些视频、谁在做」，常用于选题调研、品牌声量抽样，以及从内容反查值得合作的创作者。

搜索的是视频，不是账号。结果里的 `author_id` 或 `author_url` 可以直接拿去读这个作者主页上的视频；`duration_ms` 的单位是毫秒，换算成秒要除以 1000。结果来自不同作者，按 `author_id` 归并，就能看出这个话题下谁发得最多。

## Health

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

## Parameters

| name | type | required | default | description |
|---|---|---|---|---|
| keyword | not declared | yes | not declared | search 的快手视频搜索词。搜索的是公开视频，不是用户账号。 |
| limit | integer (1–100) | no | 20 | 这次调用最多返回的条数，整数，1–100；不传按默认值，实际返回可能少于这个数。超过上限会在扣费前返回 422。 |

## Response fields (items in `results`)

| field | meaning |
|---|---|
| id | 该记录在原平台上的唯一标识。仅在同一平台内唯一，跨平台可能重复。 |
| url | 该记录在原平台上的可访问链接。 |
| text | 正文内容，已去除 HTML 标签，全文返回、不截断（个别平台的列表结果本身只有摘要，以该平台的字段说明为准）。 |
| duration_ms | 时长，**毫秒**。 |
| view_count | 这条热点的浏览量（hot_boards）。 |
| like_count | 点赞数。 |
| comment_count | 评论数。null 表示不公开，不等于 0。 |
| share_count | 分享/转发数。null 表示不公开，不等于 0。 |
| posted_at | 发布时间，ISO 8601 格式、UTC 时区（如 2026-08-07T12:34:56+00:00）。平台只给非标准字符串时原样透传，解析前建议做容错。null 表示平台未公开。 |
| author_id | 作者在原平台的唯一 ID。 |
| author_name | 作者昵称（显示名）。 |
| author_kwai_id | 快手号（用户自定义 ID）。 |
| author_url | 作者在原平台的主页链接。 |
| author_verified | 作者是否认证（comments 上是评论者）。 |
| follower_count | 粉丝数（search、user_posts 是作者的；user_search 是这个账号的）。 |
| video_count | 累计作品数（search、user_posts 是作者的；user_live、user_search 是这个账号的）。 |
| cover_url | 封面图（trending 上是这条热点的配图）。 |
| avatar_url | 头像图片链接。部分平台给的是带尺寸参数的 CDN 链接，可能有时效。 |
| transcript | 视频口播文案转写（有数据时返回）。 |
| 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": "search",
  "params": {
    "keyword": "露营装备"
  }
}'
```

```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": "search",
        "params": {
            "keyword": "露营装备",
        },
    },
    timeout=120,
)
print(response.status_code)
print(response.json())
```

## Response example

Real response to the example request above, captured 2026-11-07T14:47:42Z. `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": "kuaishou",
  "action": "search",
  "results": [
    {
      "id": "3xcer7y3mu6mmya",
      "url": "https://www.kuaishou.com/short-video/3xcer7y3mu6mmya",
      "text": "建议收藏！懒人露营装备，一整套厨房系统，拎包就走",
      "duration_ms": 3466,
      "view_count": 12263,
      "like_count": 46,
      "posted_at": "2026-04-05T09:39:39+00:00",
      "author_id": "•••",
      "author_name": "素•••店",
      "author_url": "https://www.kuaishou.com/•••",
      "cover_url": "http://zj66.a.kwimgs.com/upic/2026/04/05/17/BMjAyNjA0MDUxNzM5MjBfMjAyMTYxNDQwN18xOTIyNzQ0MDAwOTNfMF8z_hd_Bb9a0bacf1f0db35c06a8cab656c89035.kvif?tag=1-1794063991-sff-0-odu5fhplva-ea778ddf4e5da3b6&clientCacheKey=3xcer7y3mu6mmya_hd.kvif&di=7139ac5a&bp=10681",
      "avatar_url": "http://p1.a.yximgs.com/•••",
      "platform": "kuaishou"
    },
    {
      "id": "3xqxxjw5ejgifq9",
      "url": "https://www.kuaishou.com/short-video/3xqxxjw5ejgifq9",
      "text": "全套露营装备一包带走啦",
      "duration_ms": 268966,
      "view_count": 444130,
      "like_count": 3921,
      "posted_at": "2025-11-26T15:09:38+00:00",
      "author_id": "•••",
      "author_name": "露•••长",
      "author_url": "https://www.kuaishou.com/•••",
      "cover_url": "http://zj66.a.kwimgs.com/upic/2025/11/26/23/BMjAyNTExMjYyMzA4NTFfMzYwODMwODM2MV8xODA4NzY1NzcyMzhfMV8z_hd_B75324d0de6b33147e01ff804a2ed91b2.kvif?tag=1-1794063991-sff-0-kg6l32gson-e41c3d3409f79afc&clientCacheKey=3xqxxjw5ejgifq9_hd.kvif&di=7139ac5a&bp=10681",
      "avatar_url": "http://p4.a.yximgs.com/•••",
      "platform": "kuaishou"
    }
  ],
  "count": 20,
  "billing": {
    "charged": …,
    "charged_usd": …,
    "balance_after_usd": …,
    …
  },
  "quota": { … }
}
```

## FAQ

### 搜索结果和用户内容有什么区别？

搜索从一个词出发，结果来自很多作者，适合看一个话题的面貌；用户内容从一个账号出发，只列这个账号自己的作品，适合深挖某个创作者。通常先搜索找到人，再把 `author_id` 交给用户内容。两边返回的字段一样，只是入口不同：搜索传词，用户内容传作者标识。参数示例填的是「露营装备」这样的话题词；查某个作者或某条视频，要用各自的目标标识，不是搜索词。

### `transcript` 什么时候有？

视频有口播文案转写数据时才返回。拿到转写后可以按台词检索、统计卖点词出现的频率，比只看文案 `text` 更接近视频里实际讲了什么。`text` 是文案全文，已去掉 HTML 标签，和转写互相补充。对一批结果做台词检索时，先筛出带 `transcript` 的行，其余只能退回 `text`；入库时允许这一列为空。同一个卖点可以换几种说法分别搜，再按 `id` 合并去重。

### 能按粉丝量筛选作者吗？

请求里不能，但每条结果都带作者的 `follower_count` 和 `video_count`。拿到结果后在本地按粉丝数分档，就能把头部账号和中小创作者分开看。只想要认证作者，再按 `author_verified` 筛一遍；`follower_count` 对照 `like_count`，能找出粉丝少而点赞高的作者。`follower_count` 和 `video_count` 是作者的数，不是单条视频的数据。去重作者用 `author_id`，别用昵称 `author_name`。

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