# 小红书 用户搜索 API (xiaohongshu.search_users)

- Canonical page: https://everyinfra.com/xiaohongshu-api/search_users
- Endpoint: POST https://api.everyinfra.com/api/v1/social with {"platform": "xiaohongshu", "action": "search_users", "params": {...}}
- Price: $0.005556 per call ($5.56 per 1,000 requests); failed calls and empty results are not charged
- Returns: list, one page of 20 per call (limit is ignored; pass the top-level next_page_token from the response as page_token for the next page)
- Pagination: pass next_page_token back as page_token for the next page, other params unchanged; one call per page, tokens last 24 hours
- 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=xiaohongshu&action=search_users

## Parameters

| name | type | required | default | description |
|---|---|---|---|---|
| keyword | not declared | yes | not declared | 找账号的关键词，如 咖啡、品牌名或领域词；返回的是用户（博主、品牌号），不是笔记。 |
| follower_range | enum: 100_to_1k / 10k_to_100k / 1k_to_10k / over_100k / under_100 | no | not declared | search_users 按粉丝量级筛选账号：under_100 不到 100、100_to_1k 100–1000、1k_to_10k 1000–1万、10k_to_100k 1万–10万、over_100k 10万以上；不传不限。 |
| page_token | not declared | no | not declared | 翻页游标（comments、sub_comments、search、user_posts、search_users、hashtag）：把上一次返回结果行里的 next_page_token 原样传入就拿下一页；不传从第一页开始。每页算一次调用，按次计费。 |
| user_type | enum: business / general / verified_individual | no | not declared | search_users 按账号类型筛选：general 普通用户、verified_individual 个人认证、business 企业认证；不传不限。 |

## Response fields (items in `results`)

| field | meaning |
|---|---|
| user_id | 用户在原平台的唯一 ID。 |
| nickname | 用户昵称。 |
| red_id | 小红书号，用户自定义的可搜索 ID，区别于内部 user_id。 |
| avatar_url | 头像图片链接。部分平台给的是带尺寸参数的 CDN 链接，可能有时效。 |
| url | 该记录在小红书上的链接。search、note、profile、hashtag 返回的链接一般带访问令牌，未登录的浏览器也能打开（令牌有时效，过期后重新调用即可）；user_posts 返回的笔记链接不带令牌，在浏览器里打开需要令牌：用笔记 ID 调 note 能拿到可以打开的链接；search_users 返回的主页链接同样不带令牌，用 user_id 调 profile 拿能打开的链接。pgy_content_square 不带 keyword 时笔记链接带令牌，带 keyword 时不带（用笔记 ID 调 note 拿能打开的链接）。followers_list 返回的是粉丝的主页链接，同样不带令牌；note_location 返回的笔记链接带上了请求里的令牌（请求里没带就没有）。 |
| follower_count | 粉丝数。profile 里是精确值；search_users 里是从列表展示的「粉丝 1.2万」换算的近似值（1.2万 → 12000）；followers_list 里是这位粉丝自己的粉丝数。null 表示不公开或没认出来，不等于 0。 |
| is_verified | 是否为平台认证账号（蓝V等）。null 表示无法判定。 |
| verification_type | 认证类型（search_users、profile）：individual 个人认证、business 企业认证、other 其他认证；未认证的账号没有这个字段。 |
| next_page_token | 翻页游标：同一页每行的值相同，原样作为下一次请求的 page_token 就取下一页，其余参数保持不变；为空或没有这个字段表示没有下一页。能传 page_token 的是 search、user_posts、comments、sub_comments、search_users、hashtag、product_search、pgy_content_square、reviews、followers_list；comments_batch 行上也带这一项，但它本身不收 page_token。 |
| 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": "xiaohongshu",
  "action": "search_users",
  "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": "xiaohongshu",
        "action": "search_users",
        "params": {
            "keyword": "咖啡",
        },
    },
    timeout=120,
)
print(response.status_code)
print(response.json())
```

## Response example

Real response to the example request above, captured 2026-10-24T18:28:34Z. `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": "xiaohongshu",
  "action": "search_users",
  "results": [
    {
      "user_id": "•••",
      "nickname": "•••",
      "red_id": "•••",
      "avatar_url": "https://sns-avatar-qc.xhscdn.com/•••",
      "url": "https://www.xiaohongshu.com/•••",
      "follower_count": 456000,
      "is_verified": false,
      "next_page_token": "n1.p2",
      "platform": "xiaohongshu"
    },
    {
      "user_id": "•••",
      "nickname": "•••",
      "red_id": "•••",
      "avatar_url": "https://sns-avatar-qc.xhscdn.com/•••",
      "url": "https://www.xiaohongshu.com/•••",
      "follower_count": 148000,
      "is_verified": true,
      "verification_type": "business",
      "next_page_token": "n1.p2",
      "platform": "xiaohongshu"
    }
  ],
  "next_page_token": …,
  "pagination": { … },
  "count": 20,
  "billing": {
    "charged": …,
    "charged_usd": …,
    "balance_after_usd": …,
    …
  },
  "quota": { … }
}
```

## Also

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