# Search notes

Search Xiaohongshu notes by keyword, paging through the results. For one note's body use xhs_note_detail_v1.

ID: native-http:social.xhs.note.search · Region: global · Status: available

catalog_version: 1d0d6a1c969fdf327cc670c6e09e30955e8d31a1effc0d3a58d90184ad911f57
updated_at: 2026-10-27T04:03:01.944414+00:00

Search Xiaohongshu notes by keyword, paging through the results. For one note's body use xhs_note_detail_v1.

Dataset releases define historical periods; live reads describe request-time data and do not guarantee completeness.

Docs: https://docs.kleardata.ai/capabilities/native-http%3Asocial.xhs.note.search

## POST /v1/native/social/xhs/notes/search

native · available · api_key

REST requires a customer API Key; MCP requires an enabled authenticated server; CLI requires its published artifact and command.

Search Xiaohongshu notes by keyword, paging through the results. For one note's body use xhs_note_detail_v1.

Charge once per successful request under the approved customer price policy; max_credits bounds the charge.

Reuse the original Idempotency-Key when recovering the same native request.

Read the original task before retrying a pending or unknown outcome. Check error.code before acting on HTTP 401/402/403/422: native_upstream_* reports a source failure; keep job_id/request_id and contact support. These source errors do not establish a problem with your Asklear API Key, Credits, permissions or input. Correct Asklear authentication, permission or input errors before retrying; do not automatically resubmit paid execution.

### Input schema / 输入契约

```json
{
  "$defs": {
    "Schema1": {}
  },
  "additionalProperties": false,
  "properties": {
    "input": {
      "additionalProperties": false,
      "properties": {
        "note_time": {
          "description": "Publication window: \"\" = unrestricted, 一天内 = past day, 一周内 = past week, 半年内 = past half-year. Omitted Native input keeps 一周内; send \"\" explicitly for unrestricted results. / 发布时间：\"\" 表示不限，一天内、一周内、半年内分别筛选对应范围；当前Native省略时仍使用一周内，需要不限时须显式传入空字符串 \"\"。",
          "maxLength": 64,
          "type": "string"
        },
        "note_type": {
          "description": "Note type: \"\" = unrestricted, 普通笔记 = regular notes, 视频笔记 = video notes. Omitted Native input keeps 普通笔记; send \"\" explicitly for unrestricted results. / 笔记类型：\"\" 表示不限，普通笔记、视频笔记分别筛选对应类型；当前Native省略时仍使用普通笔记，需要不限时须显式传入空字符串 \"\"。",
          "maxLength": 64,
          "type": "string"
        },
        "page": {
          "description": "Page number, 1–50; omitted starts at 1 / 页码1–50；省略时从第1页开始。",
          "maximum": 50,
          "minimum": 1,
          "type": "integer"
        },
        "query": {
          "description": "Search keyword, 1–200 characters / 搜索关键词，1–200个字符。",
          "maxLength": 200,
          "minLength": 1,
          "type": "string"
        },
        "sort_type": {
          "description": "Sort order: general = relevance, time_descending = newest, popularity_descending = most likes, comment_descending = most comments, collect_descending = most collections; omitted uses general. / 排序：general 综合、time_descending 最新、popularity_descending 最多点赞、comment_descending 最多评论、collect_descending 最多收藏；省略时使用 general。",
          "maxLength": 64,
          "type": "string"
        }
      },
      "required": [
        "query"
      ],
      "type": "object"
    },
    "max_credits": {
      "anyOf": [
        {
          "maximum": 1000000000,
          "minimum": 0,
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "default": null
    },
    "task_query": {
      "anyOf": [
        {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Optional task attribution: when provided, write one concise, self-contained task_query in the user's language and reuse that exact value in every call for the task, including discovery, search, approval retry, results, export, and status checks. For MCP calls, when omitted, Asklear records a generic non-user-specific attribution so compatible clients can still call the tool. REST calls may omit it and remain unattributed. It is a task description, not a task identifier. Do not include hidden reasoning, credentials, or direct personal identifiers such as phone numbers, email addresses, identity numbers, or street addresses.",
          "maxLength": 300
        },
        {
          "type": "null"
        }
      ],
      "default": null
    }
  },
  "required": [
    "input"
  ],
  "type": "object"
}
```

### Synthetic request / 合成请求

```json
{
  "input": {
    "query": "example"
  }
}
```

### Response schema / 响应契约

```json
{
  "$defs": {
    "Schema1": {},
    "Schema2": {
      "properties": {
        "api_name": {
          "type": "string"
        },
        "credits_charged": {
          "minimum": 0,
          "type": "integer"
        },
        "latency_ms": {
          "minimum": 0,
          "type": "integer"
        },
        "next_input": {
          "anyOf": [
            {
              "additionalProperties": false,
              "properties": {
                "note_time": {
                  "maxLength": 64,
                  "type": "string"
                },
                "note_type": {
                  "maxLength": 64,
                  "type": "string"
                },
                "page": {
                  "maximum": 50,
                  "minimum": 1,
                  "type": "integer"
                },
                "query": {
                  "maxLength": 200,
                  "minLength": 1,
                  "type": "string"
                },
                "sort_type": {
                  "maxLength": 64,
                  "type": "string"
                }
              },
              "required": [
                "query"
              ],
              "type": "object"
            },
            {
              "type": "null"
            }
          ]
        },
        "request_id": {
          "type": "string"
        }
      },
      "required": [
        "api_name",
        "request_id",
        "latency_ms",
        "credits_charged",
        "next_input"
      ],
      "type": "object"
    }
  },
  "properties": {
    "data": {
      "additionalProperties": true,
      "description": "Known optional fields from sanitized offline fixtures; conditional fields may be null. Additional business fields are retained.",
      "properties": {
        "data": {
          "additionalProperties": true,
          "properties": {
            "items": {
              "items": {
                "additionalProperties": true,
                "properties": {
                  "model_type": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "note": {
                    "additionalProperties": true,
                    "properties": {
                      "collected_count": {
                        "type": [
                          "integer",
                          "null"
                        ]
                      },
                      "comments_count": {
                        "type": [
                          "integer",
                          "null"
                        ]
                      },
                      "desc": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "id": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "images_list": {
                        "items": {
                          "additionalProperties": true,
                          "properties": {
                            "fileid": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "height": {
                              "type": [
                                "integer",
                                "null"
                              ]
                            },
                            "url": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "width": {
                              "type": [
                                "integer",
                                "null"
                              ]
                            }
                          },
                          "type": [
                            "object",
                            "null"
                          ]
                        },
                        "type": [
                          "array",
                          "null"
                        ]
                      },
                      "liked_count": {
                        "type": [
                          "integer",
                          "null"
                        ]
                      },
                      "timestamp": {
                        "type": [
                          "integer",
                          "null"
                        ]
                      },
                      "title": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "type": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "user": {
                        "additionalProperties": true,
                        "properties": {
                          "nickname": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "red_id": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "red_official_verified": {
                            "type": [
                              "boolean",
                              "null"
                            ]
                          },
                          "red_official_verify_type": {
                            "type": [
                              "integer",
                              "null"
                            ]
                          },
                          "userid": {
                            "type": [
                              "string",
                              "null"
                            ]
                          }
                        },
                        "type": [
                          "object",
                          "null"
                        ]
                      }
                    },
                    "type": [
                      "object",
                      "null"
                    ]
                  }
                },
                "type": [
                  "object",
                  "null"
                ]
              },
              "type": [
                "array",
                "null"
              ]
            }
          },
          "type": [
            "object",
            "null"
          ]
        }
      },
      "type": "object"
    },
    "meta": {
      "$ref": "#/$defs/Schema2"
    }
  },
  "required": [
    "data",
    "meta"
  ],
  "type": "object"
}
```

### Synthetic response / 合成响应

```json
{
  "data": {
    "data": {
      "items": [
        {
          "model_type": "note",
          "note": {
            "collected_count": 3,
            "comments_count": 2,
            "desc": "轻量的夜间护肤步骤",
            "id": "note-001",
            "images_list": [
              {
                "fileid": "img-001",
                "height": 600,
                "url": "https://img.example/note-001.jpg",
                "width": 800
              }
            ],
            "liked_count": 12,
            "timestamp": 1700000000,
            "title": "日常护肤记录",
            "type": "normal",
            "user": {
              "nickname": "小林",
              "red_id": "red-001",
              "red_official_verified": false,
              "red_official_verify_type": 0,
              "userid": "user-001"
            }
          }
        }
      ]
    }
  },
  "meta": {
    "api_name": "social.xhs.note.search",
    "credits_charged": 8,
    "latency_ms": 12,
    "next_input": {
      "page": 2,
      "query": "护肤"
    },
    "request_id": "asklear-example"
  }
}
```

- data (object): Known optional fields from sanitized offline fixtures; conditional fields may be null. Additional business fields are retained.
- data.data (object|null): No field description available
- data.data.items (array|null): No field description available
- meta (object): No field description available
- meta.api_name (string): No field description available
- meta.request_id (string): No field description available
- meta.latency_ms (integer): No field description available
- meta.credits_charged (integer): No field description available
- meta.next_input (scalar): No field description available
- data.data.items[].model_type (string|null): No field description available
- data.data.items[].note (object|null): No field description available
- data.data.items[].note.collected_count (integer|null): Collection count.
- data.data.items[].note.comments_count (integer|null): Comment count.
- data.data.items[].note.desc (string|null): Note description or excerpt.
- data.data.items[].note.id (string|null): Note identifier.
- data.data.items[].note.images_list (array|null): No field description available
- data.data.items[].note.images_list[].fileid (string|null): Image file identifier.
- data.data.items[].note.images_list[].height (integer|null): Image height in pixels.
- data.data.items[].note.images_list[].url (string|null): Image URL.
- data.data.items[].note.images_list[].width (integer|null): Image width in pixels.
- data.data.items[].note.liked_count (integer|null): Like count.
- data.data.items[].note.timestamp (integer|null): Publish timestamp when supplied.
- data.data.items[].note.title (string|null): Note title.
- data.data.items[].note.type (string|null): Note type.
- data.data.items[].note.user (object|null): No field description available
- data.data.items[].note.user.nickname (string|null): Author nickname.
- data.data.items[].note.user.red_id (string|null): Author platform identifier.
- data.data.items[].note.user.red_official_verified (boolean|null): Whether the author is verified.
- data.data.items[].note.user.red_official_verify_type (integer|null): Verification type code.
- data.data.items[].note.user.userid (string|null): Author user identifier.
- meta.next_input.note_time (string): No field description available
- meta.next_input.note_type (string): No field description available
- meta.next_input.page (integer): No field description available
- meta.next_input.query (string): No field description available
- meta.next_input.sort_type (string): No field description available

Follow up: GET /v1/native/results/{query_id}
Read the saved result without another source call.

