小紅書 profile API
一次 REST 呼叫取得 小紅書 profile 資料——以 FetchPI 全平台共用的穩定 JSON 結構標準化輸出。
- 1 個已發布端點
- GET /v1/xhs/users/{username}
契約摘要(英文): Get a normalized Xiaohongshu profile (capability xhs.profile)
- 標準化回應實體
- xiaohongshu/profile
- capability
- xhs.profile
每個回應都附帶新鮮度(cache / default / live)與計費中繼資料。
使用場景
- 用最新的 {{platform}} 主頁資料充實 CRM 與外聯工具——粉絲數、認證狀態與簡介,全部為結構化 JSON。
- 投放前用一致、可查詢的主頁指標篩選創作者與合作帳號。
- 定期查詢同一帳號並比對標準化欄位,持續追蹤主頁變化。
回應欄位
Xiaohongshu Profile (normalized)
Normalized Xiaohongshu (RED) creator profile. This is the ONLY upper-layer format; provider-private fields MUST NOT appear here — the Normalizer drops them. The capability id is xhs.profile (the /v1/xhs surface; the URL prefix xhs. maps to this xiaohongshu entity platform at entity resolution).
| 欄位 | 類型 | 必填 | 說明 |
|---|---|---|---|
| id | string | 必填 | Platform-stable user id (the numeric xiaohongshu user_id). |
| platform | "xiaohongshu" | 必填 | — |
| type | "profile" | 必填 | — |
| username | string | 必填 | The xiaohongshu red_id (public handle); the numeric user id when the surface omits red_id. |
| display_name | string | null | 可選 | The xiaohongshu nickname. |
| description | string | null | 可選 | The profile bio. |
| url | string | null | 可選 | — |
| profile_image_url | string | null | 可選 | — |
| verified | boolean | 必填 | Official account verification. |
| created_at | string | null | 可選 | Account creation time, UTC RFC3339; null — the platform does not expose it. |
| metrics.followers | integer | 必填 | Fans count. |
| metrics.following | integer | 必填 | — |
| metrics.posts | integer | 必填 | Note count. |
| metrics.likes | integer | 可選 | Lifetime likes received across notes; omitted when unknown. |
| fetched_at | string | 必填 | When the platform data was actually collected (UTC RFC3339). |
欄位備註為契約英文原文。
回應中繼資料
| 欄位 | 類型 | 必填 | 說明 |
|---|---|---|---|
| mode | cache | default | live | 必填 | Effective mode after merging param > max_age > source policy (D-004). |
| age_seconds | integer | null | 可選 | Age of served data; null when unknown. |
| source_layer | cache | db | upstream | 必填 | Which layer served the response (PRD §10). |
| stale | boolean | 可選 | True when stale data was served under stale_if_error / SWR (D-004). |
| billing.amount_credits | integer | 必填 | Micro-USD (1e-6 USD) actually charged for this request. |
| billing.cache_hit | boolean | 必填 | — |
欄位備註為契約英文原文。
請求與回應範例
GET
/v1/xhs/users/{username}curl -H "Authorization: Bearer $MESHDATA_API_KEY" \
"https://api.fetchpi.com/v1/xhs/users/newdev"{
"data": {
"id": "66f2a1de000000001e0167a1",
"platform": "xiaohongshu",
"type": "profile",
"username": "creatordev",
"display_name": "Creator Dev",
"description": "Notes about data APIs.",
"profile_image_url": "https://cdn.example.com/avatar/creatordev.jpg",
"verified": true,
"created_at": null,
"metrics": {
"followers": 51230,
"following": 310,
"posts": 862,
"likes": 2140000
},
"fetched_at": "2026-09-18T09:00:00Z"
},
"meta": {
"request_id": "req_01HTXQ8Z9HTQ",
"freshness": {
"mode": "default",
"age_seconds": 120,
"source_layer": "db",
"stale": false
},
"billing": {
"amount_credits": 100,
"cache_hit": false
}
}
}免費試用
註冊免費帳號、取得 API Key,即可在瀏覽器版 Playground 直接呼叫該端點。
在 Playground 試用該端點的參數表、錯誤碼與回應語義見 API 文件。
查看端點參考常見問題
小紅書 profile API 回傳什麼?
一個標準化的主頁物件——身分、簡介與受眾欄位(見下方回應欄位表),外加新鮮度與計費中繼資料。
可以免費試用該端點嗎?
可以——註冊帳號、取得 API Key 後,即可在主控台的 Playground 呼叫該端點。
profile 能力怎麼計費?
Data API 按請求以點數計費,cache/live 新鮮度有不同倍率。目前各能力的價格以價格頁為準。