# 搜索笔记

按关键词搜索小红书笔记,按页翻页返回笔记列表。要取某篇笔记的正文用 xhs_note_detail_v1。

ID: native-http:social.xhs.note.search · Region: cn · Status: unknown

catalog_version: 5c920c774a55e44d7e8c709143b88a18b8b2afcef91a5d19a8c9ae5d565d9077
updated_at: 2026-10-21T12:06:16.523771+00:00

缓存资料；当前可用状态待核实。

按关键词搜索小红书笔记,按页翻页返回笔记列表。要取某篇笔记的正文用 xhs_note_detail_v1。

历史数据以数据集发布版本定义覆盖周期；实时读取反映请求时资料，不保证覆盖全部记录。

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

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

native · unknown · api_key

REST 需要客户 API Key；MCP 需要已开放的服务及现有授权；CLI 需要已发布且包含该命令的客户端。

按关键词搜索小红书笔记,按页翻页返回笔记列表。要取某篇笔记的正文用 xhs_note_detail_v1。

按成功请求计费，每次请求计一次；max_credits 限制本次费用上限。

恢复同一次原生请求时复用原 Idempotency-Key。

等待态响应提供结果/状态引用。先读取原结果；超时或结果不明时禁止自动重新提交付费执行。401/403/422 应先修正鉴权、权限或输入。

### 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): 暂无字段说明
- data.data.items (array|null): 暂无字段说明
- meta (object): 暂无字段说明
- meta.api_name (string): 暂无字段说明
- meta.request_id (string): 暂无字段说明
- meta.latency_ms (integer): 暂无字段说明
- meta.credits_charged (integer): 暂无字段说明
- meta.next_input (scalar): 暂无字段说明
- data.data.items[].model_type (string|null): 暂无字段说明
- data.data.items[].note (object|null): 暂无字段说明
- data.data.items[].note.collected_count (integer|null): 收藏数。
- data.data.items[].note.comments_count (integer|null): 评论数。
- data.data.items[].note.desc (string|null): 笔记描述或摘要。
- data.data.items[].note.id (string|null): 笔记 ID。
- data.data.items[].note.images_list (array|null): 暂无字段说明
- data.data.items[].note.images_list[].fileid (string|null): 图片文件 ID。
- data.data.items[].note.images_list[].height (integer|null): 图片高度（像素）。
- data.data.items[].note.images_list[].url (string|null): 图片 URL。
- data.data.items[].note.images_list[].width (integer|null): 图片宽度（像素）。
- data.data.items[].note.liked_count (integer|null): 点赞数。
- data.data.items[].note.timestamp (integer|null): 如响应提供则返回发布时间戳。
- data.data.items[].note.title (string|null): 笔记标题。
- data.data.items[].note.type (string|null): 笔记类型。
- data.data.items[].note.user (object|null): 暂无字段说明
- data.data.items[].note.user.nickname (string|null): 作者昵称。
- data.data.items[].note.user.red_id (string|null): 作者平台 ID。
- data.data.items[].note.user.red_official_verified (boolean|null): 作者是否认证。
- data.data.items[].note.user.red_official_verify_type (integer|null): 认证类型编码。
- data.data.items[].note.user.userid (string|null): 作者用户 ID。
- meta.next_input.note_time (string): 暂无字段说明
- meta.next_input.note_type (string): 暂无字段说明
- meta.next_input.page (integer): 暂无字段说明
- meta.next_input.query (string): 暂无字段说明
- meta.next_input.sort_type (string): 暂无字段说明

Follow up: GET /v1/native/results/{query_id}
读取已保存结果，不重复查询数据或收费。

