---
title: "Profile"
description: "获取小红书账号：昵称、小红书号、简介、IP 属地、标签和笔记数，以及最近的笔记。"
---

> Every apinoa docs page as markdown: https://apinoa.com/llms.txt (all in one file: https://apinoa.com/llms-full.txt; this API family in one file: https://apinoa.com/docs/social/llms.txt)

```http
GET | POST /v1/xiaohongshu/profile
```

参数可以用 `GET` 的查询字符串发送，也可以用 `POST` 的 JSON 请求体发送，两者等价。

## 请求

```bash tab="cURL"
curl "https://gateway.apinoa.com/v1/xiaohongshu/profile?username=59edb804e8ac2b09b85fad67" \
  -H "x-api-key: $APINOA_API_KEY"
```

```js tab="JavaScript"
const params = new URLSearchParams({"username":  "59edb804e8ac2b09b85fad67"});
const res = await fetch(`https://gateway.apinoa.com/v1/xiaohongshu/profile?${params}`, {
  headers: { "x-api-key": process.env.APINOA_API_KEY },
});
const { success, data, error } = await res.json();
```

```python tab="Python"
import os

import requests

res = requests.get(
    "https://gateway.apinoa.com/v1/xiaohongshu/profile",
    params={"username": "59edb804e8ac2b09b85fad67"},
    headers={"x-api-key": os.environ["APINOA_API_KEY"]},
)
body = res.json()
```

## 传入内容

| 传入 | 读取内容 | 说明 |
|---|---|---|
| `username` | 该账号 | 其用户 id（主页链接中的 24 位十六进制字符），或主页链接 |

## 参数

| Parameter | Type | Required | Notes |
|---|---|---|---|
| `username` | string |  | The account's user id (24 hex characters, from its profile link), or the profile link. |

The same parameters, and every response type, are in the OpenAPI document: https://apinoa.com/openapi.json

## 响应

在 `data` 中返回 [`Account`](/docs/api-reference/sns/response-schema#account)。 真实响应的节选：数组只保留前几项，长文本已截断。

```json
{
  "success": true,
  "data": {
    "platform": "xiaohongshu",
    "id": "59edb804e8ac2b09b85fad67",
    "handle": "496969443",
    "displayName": "尖叫番茄",
    "bio": "什么都发₍ᐢ..ᐢ₎ᐝ\n美甲｜购物分享｜日常 | INFJ",
    "url": "https://www.xiaohongshu.com/user/profile/59edb804e8ac2b09b85fad67",
    "avatarUrl": "https://sns-avatar-qc.rednotecdn.com/avatar/1040g2jo30n6beaha5a0049uqt2s09bb7…",
    "counts": {
      "posts": 114
    },
    "ext": {
      "redId": "496969443",
      "gender": "female",
      "ipLocation": "广东",
      "followersText": "10+",
      "followingText": "10+",
      "likesAndSavesText": "1万+",
      "likes": 76067,
      "saves": 17669,
      "bioTranslation": "Just sharing a bit of everything ₍ᐢ..ᐢ₎ᐝ\nNails | Shopping | Daily | INFJ",
      "posts": [
        {
          "title": "这次，我一定要发挥好",
          "type": "normal",
          "createdAt": "2026-11-16T14:40:34.000Z",
          "likes": 247,
          "cover": {
            "type": "image",
            "url": "http://sns-web-i10.rednotecdn.com/202611270748/daa177cb011e0c5e3f1c56ee5699ce…",
            "width": 1200,
            "height": 1600,
            "thumbnailUrl": "http://sns-web-i10.rednotecdn.com/202611270748/b06466faedff5559e3d47c364ce7b3…",
            "variants": [
              {
                "url": "http://sns-web-i10.rednotecdn.com/202611270748/b06466faedff5559e3d47c364ce7b3…",
                "quality": "WB_PRV"
              },
              {
                "url": "http://sns-web-i10.rednotecdn.com/202611270748/daa177cb011e0c5e3f1c56ee5699ce…",
                "quality": "WB_DFT"
              }
            ]
          },
          "xsecToken": "ABhu_Cqz8_LewlXka4tu0shenQuM4eqkIOCDItFOJ7ktk="
        },
        {
          "title": "马上要去日本了 我的购物欲已经按耐不住了，",
          "type": "normal",
          "createdAt": "2026-11-12T10:53:52.000Z",
          "likes": 2607,
          "cover": {
            "type": "image",
            "url": "http://sns-web-i10.rednotecdn.com/202611270748/ee46987a07ff5cc04bd10acc5f2684…",
            "width": 1200,
            "height": 1600,
            "thumbnailUrl": "http://sns-web-i10.rednotecdn.com/202611270748/6bcbbc4b72b2fcf0d0cc981f0f351f…",
            "variants": [
              {
                "url": "http://sns-web-i10.rednotecdn.com/202611270748/6bcbbc4b72b2fcf0d0cc981f0f351f…",
                "quality": "WB_PRV"
              },
              {
                "url": "http://sns-web-i10.rednotecdn.com/202611270748/ee46987a07ff5cc04bd10acc5f2684…",
                "quality": "WB_DFT"
              }
            ]
          },
          "xsecToken": "ABhu_Cqz8_LewlXka4tu0shenQuM4eqkIOCDItFOJ7ktk="
        }
      ]
    }
  }
}
```

## 错误

| 状态 | 代码 | 含义 |
|---|---|---|
| 400 | `INVALID_PARAMS` | 参数缺失、未知或超出范围。消息中会指出是哪一个。 |
| 401 | `UNAUTHORIZED` | 缺少 `x-api-key` 请求头，或密钥已吊销或未知。 |
| 402 | `INSUFFICIENT_CREDITS` | 积分不足以支付本次调用。请在控制台选择套餐或充值。 |
| 404 | `NOT_FOUND` | 账号、帖子或分组不存在，或为私密、已删除、有年龄限制。 |
| 429 | `MARKETPLACE_SATURATED` | 并发调用过多。请等待 `Retry-After` 秒后重试。 |
| 502 | `UPSTREAM_ERROR` | 平台返回了无法使用的内容。请退避后重试。 |

全部错误代码见 [Errors](/docs/errors)。失败的调用不计费。

## 价格

**Price** 1 credit per call. [Plans and credits](https://apinoa.com/en/pricing).

## 说明

- 小红书的粉丝、关注和获赞与收藏是约数（"1万+"），因此按页面原样放在 `ext` 中（`followersText`、`followingText`、`likesAndSavesText`）；`counts.posts` 与 `ext.likes`/`ext.saves` 是精确值。
- `ext.posts` 是主页列出的最近笔记：标题、类型、点赞数、封面和是否置顶。小红书在此处不提供笔记 id，所以它们是预览而不是帖子，`posts` 也不接受 `username`。
- 小红书号（`redId`）即账号的 `handle`；小红书没有可用于链接的用户名，因此 `username` 传用户 id。
