Skip to content
Xiaohongshu

xiaohongshu.notes.comments@v1

Xiaohongshu note comments

CommentList

Read one page of public top-level comments by note ID or share text.

POST/v1/xiaohongshu/notes/comments

Chinese name: 小红书笔记评论 · 评论 · 列表
按笔记 ID 或分享文本读取一页公开一级评论。

Use it when

  • Use it to read top-level comments for a known public note.

Do not use it for

  • Do not use it for replies, private content, or exhaustive recall.

Request parameters

The request body must match one of these parameter sets.

Input option 1

Fieldnote_idTypestringConstraints and defaultspattern: "^[a-z0-9]{8,64}$"RequirementRequired
FieldsortTypestringConstraints and defaultsconst: "latest_v2" · default: "latest_v2"RequirementOptional
FieldcursorTypestringConstraints and defaultsminLength: 1RequirementOptional

Input option 2

Fieldshare_textTypestringConstraints and defaultsminLength: 8 · maxLength: 2048RequirementRequired
FieldsortTypestringConstraints and defaultsconst: "latest_v2" · default: "latest_v2"RequirementOptional
FieldcursorTypestringConstraints and defaultsminLength: 1RequirementOptional
Full request JSON Schema
{
  "type": "object",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "anyOf": [
    {
      "type": "object",
      "properties": {
        "note_id": {
          "type": "string",
          "pattern": "^[a-z0-9]{8,64}$"
        },
        "share_text": {
          "not": {}
        },
        "sort": {
          "default": "latest_v2",
          "type": "string",
          "const": "latest_v2"
        },
        "cursor": {
          "type": "string",
          "minLength": 1
        }
      },
      "required": [
        "note_id"
      ],
      "additionalProperties": false
    },
    {
      "type": "object",
      "properties": {
        "share_text": {
          "type": "string",
          "minLength": 8,
          "maxLength": 2048
        },
        "note_id": {
          "not": {}
        },
        "sort": {
          "default": "latest_v2",
          "type": "string",
          "const": "latest_v2"
        },
        "cursor": {
          "type": "string",
          "minLength": 1
        }
      },
      "required": [
        "share_text"
      ],
      "additionalProperties": false
    }
  ]
}

Static response example

application/json
{
  "code": 200,
  "request_id": "req_example_xhs_comments_01",
  "message": "success",
  "data": {
    "items": [
      {
        "id": "comment-01",
        "note_id": "note0001",
        "parent_comment_id": null,
        "root_comment_id": "comment-01",
        "body": "Public comment",
        "created_at": "2026-08-01T12:00:00.000Z",
        "author": {
          "id": "user-01",
          "name": "Example user",
          "avatar_url": "https://ci.xiaohongshu.com/avatar"
        },
        "likes": 3,
        "reply_count": 1
      }
    ]
  },
  "page": {
    "next_cursor": "opaque-cursor"
  },
  "warnings": [],
  "meta": {
    "result_status": "complete",
    "balance_after": "0.81",
    "listing_id": "xiaohongshu.notes.comments",
    "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"
  }
}

Run live

Complete and empty results are charged; partial results and failures are not.

Security check

Loading the security check…

Checking live execution status…

Execution result

// Result

Response contract

The field summary is for scanning; the full JSON Schema is the stable output contract.

FieldcodeTypenumberConstraints and defaultsconst: 200RequirementRequired
Fieldrequest_idTypestringConstraints and defaultsNo additional constraintsRequirementRequired
FieldmessageTypestringConstraints and defaultsconst: "success"RequirementRequired
FielddataTypeobjectConstraints and defaultsNo additional constraintsRequirementRequired
FieldpageTypeobjectConstraints and defaultsNo additional constraintsRequirementRequired
FieldwarningsTypearrayConstraints and defaultsNo additional constraintsRequirementRequired
FieldmetaTypeobjectConstraints and defaultsNo additional constraintsRequirementRequired
Full response 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": {
        "items": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "minLength": 1
              },
              "note_id": {
                "type": "string",
                "minLength": 1
              },
              "parent_comment_id": {
                "anyOf": [
                  {
                    "type": "string",
                    "minLength": 1
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "root_comment_id": {
                "anyOf": [
                  {
                    "type": "string",
                    "minLength": 1
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "body": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "created_at": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "author": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "minLength": 1
                  },
                  "name": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "avatar_url": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "id",
                  "name",
                  "avatar_url"
                ],
                "additionalProperties": false
              },
              "likes": {
                "anyOf": [
                  {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "reply_count": {
                "anyOf": [
                  {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "id",
              "note_id",
              "parent_comment_id",
              "root_comment_id",
              "body",
              "created_at",
              "author",
              "likes",
              "reply_count"
            ],
            "additionalProperties": false
          }
        }
      },
      "required": [
        "items"
      ],
      "additionalProperties": false
    },
    "page": {
      "type": "object",
      "properties": {
        "next_cursor": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": [
        "next_cursor"
      ],
      "additionalProperties": false
    },
    "warnings": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "meta": {
      "type": "object",
      "properties": {
        "listing_id": {
          "type": "string",
          "const": "xiaohongshu.notes.comments"
        },
        "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",
            "partial"
          ]
        },
        "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
}

Known limitations

  • V1 uses latest_v2 ordering and returns only top-level comments.
  • Continue only with this Listing's Cursor; exhaustive recall is not guaranteed.

Integration example

REST (cURL)

curl -X POST https://api.dataxapi.com/v1/xiaohongshu/notes/comments \
  -H "Authorization: Bearer $DATAXAPI_API_KEY" \
  -H "Idempotency-Key: your-stable-intent-key" \
  -H "Content-Type: application/json" \
  -d '{"note_id":"68e8b88400000000050106d7","sort":"latest_v2"}'

Exact MCP Preview (Codex config)

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

The same API key exposes only the precise tools in its scope. Keep the key in an environment variable, never in the config file. Reuse an explicit idempotency_key for safe retries.

View client compatibility →

Catalog release: catalog-production-2026-09-17.1 · PriceBook: pricebook-production-2026-09-17.1