Apinoa Docs

Posts

获取小红书的发现页推荐:当前推荐的笔记及其作者、封面和点赞数。

查看原始 .mdx
GET | POST /v1/xiaohongshu/posts

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

请求

curl "https://gateway.apinoa.com/v1/xiaohongshu/posts" \
  -H "x-api-key: $APINOA_API_KEY"

传入内容

传入读取内容说明
不传发现页小红书当前向访客推荐的笔记,约 30 条

参数

参数类型必填说明
usernamestringNot served: the profile page lists a creator's posts without their ids. Ask profile, whose ext.posts lists them.

这些参数及所有响应类型也写在OpenAPI 文档中。

响应

在 data 中返回 Post 的 Page。 真实响应的节选:数组只保留前几项,长文本已截断。

{
  "success": true,
  "data": {
    "platform": "xiaohongshu",
    "items": [
      {
        "platform": "xiaohongshu",
        "id": "6a730db50000000033011c29",
        "url": "https://www.xiaohongshu.com/explore/6a730db50000000033011c29",
        "author": {
          "platform": "xiaohongshu",
          "id": "641305180000000012012c22",
          "displayName": "干完这票就碎觉",
          "url": "https://www.xiaohongshu.com/user/profile/641305180000000012012c22",
          "avatarUrl": "https://sns-avatar-qc.rednotecdn.com/avatar/1040g2jo31pnjhj14kk005p0j0kc4ib12…",
          "ext": {
            "xsecToken": "AByHSjvm2GViDK9ORqlP8Vshbv1Tg0fd5xEEEy03JJo2k="
          }
        },
        "title": "share🫧两位数get的波点草莓刘海梳!ꈍᗜꈍ",
        "ext": {
          "type": "video",
          "cover": {
            "type": "image",
            "url": "http://sns-web-i10.rednotecdn.com/202611270748/e56035417575c2c5e7743851c3a996…",
            "width": 1290,
            "height": 1720,
            "thumbnailUrl": "http://sns-web-i10.rednotecdn.com/202611270748/ce04d5acb7f45ca2386e7ff4064f3a…",
            "variants": [
              {
                "url": "http://sns-web-i10.rednotecdn.com/202611270748/ce04d5acb7f45ca2386e7ff4064f3a…",
                "quality": "WB_PRV"
              },
              {
                "url": "http://sns-web-i10.rednotecdn.com/202611270748/e56035417575c2c5e7743851c3a996…",
                "quality": "WB_DFT"
              }
            ]
          },
          "videoDurationSec": 32,
          "metricsText": {
            "likes": "28.9K"
          },
          "translation": {
            "title": "share🫧Got this polka dot strawberry com"
          },
          "xsecToken": "ABnB-G86g96Km7WPUmitMAA99VGEbK1DDT-jTUeQI2msg="
        },
        "media": []
      },
      {
        "platform": "xiaohongshu",
        "id": "6ae89201000000002c01a61f",
        "url": "https://www.xiaohongshu.com/explore/6ae89201000000002c01a61f",
        "author": {
          "platform": "xiaohongshu",
          "id": "5746e9ea84edcd0e83e3f956",
          "displayName": "琛宝的精致小厨房",
          "url": "https://www.xiaohongshu.com/user/profile/5746e9ea84edcd0e83e3f956",
          "avatarUrl": "https://sns-avatar-qc.rednotecdn.com/avatar/1040g2jo322ipun667u0048cmtvkuluam…",
          "ext": {
            "xsecToken": "ABN3EoBxnINmkfELcjl2HIomAPJUHpWRzUgxLNhst-huo="
          }
        },
        "title": "在家自制宝宝火腿肠!巨香!巨好吃!",
        "metrics": {
          "likes": 320
        },
        "ext": {
          "type": "video",
          "cover": {
            "type": "image",
            "url": "http://sns-web-i10.rednotecdn.com/202611270748/13e65727db9498a360f057f3f6247a…",
            "width": 2880,
            "height": 3840,
            "thumbnailUrl": "http://sns-web-i10.rednotecdn.com/202611270748/14240279651d9e5f8292df0b6e6c8c…",
            "variants": [
              {
                "url": "http://sns-web-i10.rednotecdn.com/202611270748/14240279651d9e5f8292df0b6e6c8c…",
                "quality": "WB_PRV"
              },
              {
                "url": "http://sns-web-i10.rednotecdn.com/202611270748/13e65727db9498a360f057f3f6247a…",
                "quality": "WB_DFT"
              }
            ]
          },
          "videoDurationSec": 49,
          "translation": {
            "title": "DIY Baby Ham Sausages at Home! So fragra"
          },
          "xsecToken": "ABlGmzOS3GInWUNbvuM4MkcN__A92ZATOkBP30l-4SxhA="
        },
        "media": []
      }
    ]
  }
}

错误

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

全部错误代码见 Errors。失败的调用不计费。

价格

价格 每次调用 1 积分。套餐与积分

说明

  • 每条笔记与发现页显示的一致:标题、作者、封面(ext.cover)和点赞数。正文和媒体请用 post 获取。
  • 发现页只有一页,没有 cursor。
  • 不提供某个账号的笔记列表:小红书列出它们时不给 id。profile 会在 ext.posts 中以预览形式返回。

本页内容