# 小红书 评价 API (xiaohongshu.reviews)

- Canonical page: https://everyinfra.com/xiaohongshu-api/reviews
- Endpoint: POST /api/v1/social with {"platform": "xiaohongshu", "action": "reviews", "params": {...}}
- Price: $0.005556 per call ($5.56 per 1,000 requests); failed 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=reviews

## Parameters

| name | type | required | default | description |
|---|---|---|---|---|
| product_id | not declared | yes | not declared | 商品 ID（24 位，product_search 返回行的 id），或商品链接 https://www.xiaohongshu.com/goods-detail/<ID>。ID 格式不对时请求直接被拒、不扣费。 |
| page_token | not declared | no | not declared | 翻页令牌。第一页不传；之后把上一页响应里的 next_page_token 原样传回取下一页，其余参数不变。每页最多 20 条评价，每页算一次调用；翻到底时响应里没有 next_page_token。 |
| sort | enum: default / newest | no | not declared | 评价排序：default 商城默认的综合排序（不传时同此）、newest 最新在前。翻页时保持同一个取值。 |

## Response fields (items in `results`)

| field | meaning |
|---|---|
| id | 该记录在原平台上的唯一标识。仅在同一平台内唯一，跨平台可能重复。 |
| product_id | 这条评价所属的商品 ID（reviews），即请求里的 product_id。 |
| text | 笔记正文或评论内容。note、hashtag 返回笔记全文；search、user_posts 返回的笔记正文可能是截断的摘要（分别约 60 字、100 字以内），要全文用笔记 ID 调 note。reviews 是商品评价的全文。 |
| rating | 评分。**分制随平台而异**，同一行的 `rating_scale` 给出该平台满分 (多数是 5，Booking/豆瓣/爱奇艺/NAVER 是 10)。跨平台比较前必须先按 rating_scale 换算 —— 直接比数字会得出反的结论。 |
| rating_scale | 上一列 `rating` 的满分。5 表示五星制、10 表示十分制。只在该行有 rating 时出现。 |
| service_rating | 买家给的服务评分（reviews），5 分制；没打这一项时没有这个字段。 |
| logistics_rating | 买家给的物流评分（reviews），5 分制；没打这一项时没有这个字段。 |
| like_count | 点赞数。笔记、评论类结果是这条内容的点赞数；reviews 是这条商品评价被点「有用」的次数；profile 里是该账号所有笔记累计获得的点赞数。null 表示不公开或这次没拿到，不等于 0。 |
| reply_count | 回复数，通常用于评论的子回复。null 表示不公开。 |
| images | 图片链接列表。note、hashtag、search、user_posts 是笔记的全部图片（按原顺序）；评论类结果（comments、comments_batch、sub_comments）是评论所附的图片，含表情包贴图，没有图片时为空数组；reviews 是买家晒的图，没有晒图时为空数组。null 表示这次没拿到这一项。 |
| tags | 标签列表：note 是笔记的话题标签；profile 是主页上展示的个人标签（如星座、地区）；reviews 是这条评价被打上的评价标签（如 质量很好），没有时没有这个字段。按页面原文。 |
| sku | 买家买的规格（reviews），按商品页原文「规格名: 规格值」，多项用「；」隔开，如 颜色: 白色；尺码: M。 |
| posted_date | 评价日期（reviews，YYYY-MM-DD，北京时间）。商城只显示「06-12」「3天前」这类文字，按北京时间换算成日期；认不出时没有这个字段。评价人的 ID、昵称、头像一律不返回。 |
| 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": "reviews",
  "params": {
    "product_id": "6a4629ef7d09bf0001a45876"
  }
}'
```

```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": "reviews",
        "params": {
            "product_id": "6a4629ef7d09bf0001a45876",
        },
    },
    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": "xiaohongshu",
  "action": "reviews",
  "results": [
    {
      "id": …,
      "product_id": …,
      "text": …,
      "rating": …,
      "rating_scale": …,
      "service_rating": …,
      "logistics_rating": …,
      "like_count": …,
      "reply_count": …,
      "images": …,
      "tags": …,
      "sku": …,
      "posted_date": …,
      "next_page_token": …,
      "platform": …
    }
  ],
  "next_page_token": …,
  "pagination": { … },
  "count": …,
  "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
