---
title: "Post"
description: "获取小红书笔记：标题、正文、话题、全部图片或视频，以及点赞、收藏、评论和分享数。"
---

> 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/post
```

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

## 请求

```bash tab="cURL"
curl "https://gateway.apinoa.com/v1/xiaohongshu/post?id=68fd5956000000000302ff52" \
  -H "x-api-key: $APINOA_API_KEY"
```

```js tab="JavaScript"
const params = new URLSearchParams({"id":  "68fd5956000000000302ff52"});
const res = await fetch(`https://gateway.apinoa.com/v1/xiaohongshu/post?${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/post",
    params={"id": "68fd5956000000000302ff52"},
    headers={"x-api-key": os.environ["APINOA_API_KEY"]},
)
body = res.json()
```

## 传入内容

| 传入 | 读取内容 | 说明 |
|---|---|---|
| `id` | 该笔记 | 其 id（24 位十六进制字符），或其链接（xiaohongshu.com 或 rednote.com） |

## 参数

| Parameter | Type | Required | Notes |
|---|---|---|---|
| `id` | string |  | The note's id (24 hex characters), or its link. |

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

## 响应

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

```json
{
  "success": true,
  "data": {
    "platform": "xiaohongshu",
    "id": "68fd5956000000000302ff52",
    "url": "https://www.xiaohongshu.com/explore/68fd5956000000000302ff52",
    "author": {
      "platform": "xiaohongshu",
      "id": "59edb804e8ac2b09b85fad67",
      "displayName": "尖叫番茄",
      "url": "https://www.xiaohongshu.com/user/profile/59edb804e8ac2b09b85fad67",
      "avatarUrl": "https://sns-avatar-qc.rednotecdn.com/avatar/1040g2jo30n6beaha5a0049uqt2s09bb7…",
      "ext": {
        "xsecToken": "ABGGEbmpgPKViEfJZJYzWhh68w70zALirbXCO7U5O7t98="
      }
    },
    "title": "狎欧亭疑似偶遇爱豆",
    "text": "关键是立马发现我在拍照（超绝镜头感！）两个人都戴上了帽子！\n为我的偷拍道歉🙇实在是太帅了 头太小了 实在是太帅了\n\t\n#偶遇[话题]# #首尔病[话题]#…",
    "createdAt": "2025-10-25T23:12:22.000Z",
    "lang": "zh-CN",
    "media": [
      {
        "type": "image",
        "url": "http://sns-web-i10.rednotecdn.com/202611270748/b09012f51348a3b9839a5dadd46563…",
        "width": 2356,
        "height": 3142,
        "thumbnailUrl": "http://sns-web-i10.rednotecdn.com/202611270748/f306a4e03d957250c852ef331b563a…",
        "variants": [
          {
            "url": "http://sns-web-i10.rednotecdn.com/202611270748/f306a4e03d957250c852ef331b563a…",
            "quality": "WB_PRV"
          },
          {
            "url": "http://sns-web-i10.rednotecdn.com/202611270748/b09012f51348a3b9839a5dadd46563…",
            "quality": "WB_DFT"
          }
        ],
        "ext": {
          "fileId": "1040g2sg31o2ngr1vg69g49uqt2s09bb7o90g3e0",
          "livePhoto": true
        }
      },
      {
        "type": "image",
        "url": "http://sns-web-i10.rednotecdn.com/202611270748/0cc3e73ca52caf2f03fd2b4b2539a8…",
        "width": 2210,
        "height": 2945,
        "thumbnailUrl": "http://sns-web-i10.rednotecdn.com/202611270748/3c1d0c5efdfe122590cf15606d2a57…",
        "variants": [
          {
            "url": "http://sns-web-i10.rednotecdn.com/202611270748/3c1d0c5efdfe122590cf15606d2a57…",
            "quality": "WB_PRV"
          },
          {
            "url": "http://sns-web-i10.rednotecdn.com/202611270748/0cc3e73ca52caf2f03fd2b4b2539a8…",
            "quality": "WB_DFT"
          }
        ],
        "ext": {
          "fileId": "1040g2sg31o2ngr1vg69049uqt2s09bb70ef0geg",
          "livePhoto": true
        }
      }
    ],
    "metrics": {
      "saves": 3170,
      "comments": 2576
    },
    "entities": {
      "hashtags": [
        "偶遇",
        "首尔病"
      ]
    },
    "ext": {
      "type": "normal",
      "lastUpdateTime": "2025-10-26T03:15:08.000Z",
      "topicIds": [
        "5c2f65620000000009021101",
        "64f096e50000000014039021"
      ],
      "metricsText": {
        "likes": "33.2K",
        "shares": "12.3K"
      },
      "translation": {
        "title": "Think I might've spotted an idol in Apgujeong?!",
        "text": "The best part is they noticed me taking pics instantly (that camera sense tho…"
      }
    }
  }
}
```

## 错误

| 状态 | 代码 | 含义 |
|---|---|---|
| 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).

## 说明

- 每张图片的各尺寸版本在 `variants` 中；视频笔记的 `variants` 是其 mp4 流，每个流的备用地址在 `ext.backupUrls`。
- 小红书显示为约数的计数（"1.4万"）不放入 `metrics`，而按页面原样保存在 `ext.metricsText`。
- 话题（正文中的 `#…[话题]#`）在 `entities.hashtags`；小红书自带的英文翻译（如有）在 `ext.translation`。
