跳到主要内容
小红书

xiaohongshu.notes.detail@v1

小红书笔记详情

笔记详情

用笔记 ID 和公开 Web 安全令牌读取一条图文或视频笔记的正文、作者、媒体与互动快照。

POST/v1/xiaohongshu/notes/detail

英文名称: Xiaohongshu note detail · Note · Detail
Read the text, author, media, and public interaction snapshot for one image or video note using its ID and public Web security token.

适合什么任务

  • 已从小红书 Web 分享或 Web 发现结果取得笔记 ID 与 xsec_token。

不适合什么任务

  • 不用于搜索、评论、蒲公英商业指标或私密内容。

请求参数

字段note_id类型string约束与默认值pattern: "^[a-z0-9]{8,64}$"必填性必填
字段xsec_token类型string约束与默认值minLength: 8 · maxLength: 512必填性必填
完整请求 JSON Schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "note_id": {
      "type": "string",
      "pattern": "^[a-z0-9]{8,64}$"
    },
    "xsec_token": {
      "type": "string",
      "minLength": 8,
      "maxLength": 512
    }
  },
  "required": [
    "note_id",
    "xsec_token"
  ],
  "additionalProperties": false
}

静态响应样例

application/json
{
  "code": 200,
  "request_id": "req_example_xhs_note_detail_01",
  "message": "success",
  "data": {
    "item": {
      "id": "6a642d07000000001b01e343",
      "title": "Public note example",
      "body": "Public note body",
      "note_type": "image",
      "created_at": "2026-08-01T12:00:00.000Z",
      "updated_at": "2026-08-01T12:05:00.000Z",
      "author": {
        "id": "creator-01",
        "name": "Example creator",
        "avatar_url": "https://ci.xiaohongshu.com/avatar"
      },
      "media": {
        "images": [
          {
            "url": "https://ci.xiaohongshu.com/image",
            "width": 1200,
            "height": 1600
          }
        ],
        "video": null
      },
      "metrics": {
        "likes": 52,
        "collects": 18,
        "comments": 7,
        "shares": 3
      },
      "topics": [
        {
          "id": "topic-01",
          "name": "Example topic"
        }
      ]
    }
  },
  "page": {
    "next_cursor": null
  },
  "warnings": [],
  "meta": {
    "result_status": "complete",
    "balance_after": "0.81",
    "listing_id": "xiaohongshu.notes.detail",
    "version": "v1",
    "catalog_release_id": "catalog-production-2026-09-17.1",
    "price_book_version": "pricebook-production-2026-09-17.1",
    "charged_amount": "0.19",
    "currency": "CNY"
  }
}

实时运行

完整结果和确认空结果收费;失败不收费。

安全验证

正在加载安全验证…

正在确认实时执行状态…

执行结果

// Result

响应 Contract

字段摘要用于快速浏览;完整 JSON Schema 是稳定输出 Contract。

字段code类型number约束与默认值const: 200必填性必填
字段request_id类型string约束与默认值无额外约束必填性必填
字段message类型string约束与默认值const: "success"必填性必填
字段data类型object约束与默认值无额外约束必填性必填
字段page类型object约束与默认值无额外约束必填性必填
字段warnings类型array约束与默认值无额外约束必填性必填
字段meta类型object约束与默认值无额外约束必填性必填
完整响应 JSON Schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "code": {
      "type": "number",
      "const": 200
    },
    "request_id": {
      "type": "string"
    },
    "message": {
      "type": "string",
      "const": "success"
    },
    "data": {
      "type": "object",
      "properties": {
        "item": {
          "anyOf": [
            {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "title": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "body": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "note_type": {
                  "type": "string",
                  "enum": [
                    "image",
                    "video"
                  ]
                },
                "created_at": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "updated_at": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "author": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "name": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "avatar_url": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "id",
                    "name",
                    "avatar_url"
                  ],
                  "additionalProperties": false
                },
                "media": {
                  "type": "object",
                  "properties": {
                    "images": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "url": {
                            "type": "string"
                          },
                          "width": {
                            "anyOf": [
                              {
                                "type": "integer",
                                "exclusiveMinimum": 0,
                                "maximum": 9007199254740991
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "height": {
                            "anyOf": [
                              {
                                "type": "integer",
                                "exclusiveMinimum": 0,
                                "maximum": 9007199254740991
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "url",
                          "width",
                          "height"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "video": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "url": {
                              "type": "string"
                            },
                            "cover_url": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "duration_seconds": {
                              "anyOf": [
                                {
                                  "type": "number",
                                  "minimum": 0
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "width": {
                              "anyOf": [
                                {
                                  "type": "integer",
                                  "exclusiveMinimum": 0,
                                  "maximum": 9007199254740991
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "height": {
                              "anyOf": [
                                {
                                  "type": "integer",
                                  "exclusiveMinimum": 0,
                                  "maximum": 9007199254740991
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          },
                          "required": [
                            "url",
                            "cover_url",
                            "duration_seconds",
                            "width",
                            "height"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "images",
                    "video"
                  ],
                  "additionalProperties": false
                },
                "metrics": {
                  "type": "object",
                  "properties": {
                    "likes": {
                      "anyOf": [
                        {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "collects": {
                      "anyOf": [
                        {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "comments": {
                      "anyOf": [
                        {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "shares": {
                      "anyOf": [
                        {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "likes",
                    "collects",
                    "comments",
                    "shares"
                  ],
                  "additionalProperties": false
                },
                "topics": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "name": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "id",
                      "name"
                    ],
                    "additionalProperties": false
                  }
                }
              },
              "required": [
                "id",
                "title",
                "body",
                "note_type",
                "created_at",
                "updated_at",
                "author",
                "media",
                "metrics",
                "topics"
              ],
              "additionalProperties": false
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": [
        "item"
      ],
      "additionalProperties": false
    },
    "page": {
      "type": "object",
      "properties": {
        "next_cursor": {
          "type": "null"
        }
      },
      "required": [
        "next_cursor"
      ],
      "additionalProperties": false
    },
    "warnings": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "meta": {
      "type": "object",
      "properties": {
        "listing_id": {
          "type": "string",
          "const": "xiaohongshu.notes.detail"
        },
        "version": {
          "type": "string",
          "const": "v1"
        },
        "catalog_release_id": {
          "type": "string",
          "minLength": 1
        },
        "price_book_version": {
          "type": "string",
          "minLength": 1
        },
        "result_status": {
          "type": "string",
          "enum": [
            "complete",
            "empty"
          ]
        },
        "charged_amount": {
          "type": "string"
        },
        "balance_after": {
          "type": "string"
        },
        "currency": {
          "type": "string",
          "const": "CNY"
        }
      },
      "required": [
        "listing_id",
        "version",
        "catalog_release_id",
        "price_book_version",
        "result_status",
        "charged_amount",
        "balance_after",
        "currency"
      ],
      "additionalProperties": false
    }
  },
  "required": [
    "code",
    "request_id",
    "message",
    "data",
    "page",
    "warnings",
    "meta"
  ],
  "additionalProperties": false
}

已知限制

  • 必须同时提供笔记 ID 与来自小红书 Web 分享或 Web 发现结果的 xsec_token。
  • App 搜索结果的 xsec_token 与本 Web 详情 Endpoint 不兼容。
  • 媒体地址可能过期;V1 不下载或永久托管媒体。

接入示例

REST(cURL)

curl -X POST https://api.dataxapi.com/v1/xiaohongshu/notes/detail \
  -H "Authorization: Bearer $DATAXAPI_API_KEY" \
  -H "Idempotency-Key: your-stable-intent-key" \
  -H "Content-Type: application/json" \
  -d '{"note_id":"6a642d07000000001b01e343","xsec_token":"public-web-xsec-token"}'

Exact MCP Preview(Codex 配置)

[mcp_servers.dataxapi]
url = "https://api.dataxapi.com/mcp"
bearer_token_env_var = "DATAXAPI_API_KEY"

同一个 API Key 只会暴露其 Scope 内的精确 Tool。请把 Key 放在环境变量中,不要写入配置文件。需要安全重试时,请显式复用 idempotency_key。

查看客户端兼容状态 →

目录发布物: catalog-production-2026-09-17.1 · PriceBook: pricebook-production-2026-09-17.1