{
  "openapi": "3.1.0",
  "info": {
    "title": "小红书笔记搜索 API (V2)",
    "version": "v0",
    "description": "通过关键词搜索小红书（RedNote）笔记，支持分页以及排序、笔记类型和发布时间筛选。用于支持主题研究、内容发现和监控关键词相关帖子。"
  },
  "servers": [
    {
      "url": "https://api.justoneapi.com",
      "description": "全球生产 API（默认）"
    }
  ],
  "tags": [
    {
      "name": "小红书",
      "description": "小红书笔记、评论、用户、搜索和链接解析，用于内容监控和创作者研究。",
      "x-platform-id": "xiaohongshu-rednote",
      "x-platform-aliases": [
        "Xiaohongshu",
        "RedNote",
        "小红书"
      ],
      "x-platform-detection-aliases": [
        "Xiaohongshu",
        "RedNote",
        "小红书"
      ]
    }
  ],
  "paths": {
    "/api/xiaohongshu/search-note/v2": {
      "get": {
        "tags": [
          "小红书"
        ],
        "summary": "笔记搜索",
        "description": "通过关键词搜索小红书（RedNote）笔记，支持分页以及排序、笔记类型和发布时间筛选。用于支持主题研究、内容发现和监控关键词相关帖子。",
        "operationId": "getApiXiaohongshuSearchNoteV2",
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "description": "此 API 服务的访问令牌。",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "keyword",
            "in": "query",
            "description": "搜索关键词。",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "description": "用于分页的页码。",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 1
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "结果集的排序方式。\n\n可选值：\n- `general`：综合排序\n- `popularity_descending`：热度降序\n- `time_descending`：时间降序\n- `comment_descending`：评论数降序\n- `collect_descending`：收藏数降序",
            "required": false,
            "schema": {
              "type": "string",
              "default": "general",
              "description": "结果集的排序方式。",
              "enum": [
                "general",
                "popularity_descending",
                "time_descending",
                "comment_descending",
                "collect_descending"
              ]
            }
          },
          {
            "name": "noteType",
            "in": "query",
            "description": "笔记类型过滤器。\n\n可用值：\n- `_0`: 通用\n- `_1`: 视频\n- `_2`: 普通",
            "required": false,
            "schema": {
              "type": "string",
              "default": "_0",
              "description": "小红书搜索笔记类型",
              "enum": [
                "_0",
                "_1",
                "_2"
              ]
            }
          },
          {
            "name": "noteTime",
            "in": "query",
            "description": "笔记发布时间筛选。结果可能包含超出所选时间范围的笔记。\n\n可选值：\n- `ONE_DAY`：一天内\n- `ONE_WEEK`：一周内\n- `HALF_YEAR`：半年内",
            "required": false,
            "schema": {
              "type": "string",
              "description": "小红书搜索笔记发布时间筛选",
              "enum": [
                "ONE_DAY",
                "ONE_WEEK",
                "HALF_YEAR"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "好的",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "format": "int32",
                      "enum": [
                        0,
                        100,
                        101,
                        202,
                        300,
                        301,
                        302,
                        303,
                        400,
                        404,
                        500,
                        503,
                        600,
                        601,
                        602
                      ]
                    },
                    "message": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "data": {},
                    "recordTime": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "requestId": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "code",
                    "data",
                    "message",
                    "recordTime"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "请求参数或请求体无效",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "format": "int32",
                      "enum": [
                        0,
                        100,
                        101,
                        202,
                        300,
                        301,
                        302,
                        303,
                        400,
                        404,
                        500,
                        503,
                        600,
                        601,
                        602
                      ]
                    },
                    "message": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "data": {},
                    "recordTime": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "requestId": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "code",
                    "data",
                    "message",
                    "recordTime"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "访问令牌无效或未激活",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "format": "int32",
                      "enum": [
                        0,
                        100,
                        101,
                        202,
                        300,
                        301,
                        302,
                        303,
                        400,
                        404,
                        500,
                        503,
                        600,
                        601,
                        602
                      ]
                    },
                    "message": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "data": {},
                    "recordTime": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "requestId": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "code",
                    "data",
                    "message",
                    "recordTime"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "权限不足",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "format": "int32",
                      "enum": [
                        0,
                        100,
                        101,
                        202,
                        300,
                        301,
                        302,
                        303,
                        400,
                        404,
                        500,
                        503,
                        600,
                        601,
                        602
                      ]
                    },
                    "message": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "data": {},
                    "recordTime": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "requestId": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "code",
                    "data",
                    "message",
                    "recordTime"
                  ]
                }
              }
            }
          },
          "429": {
            "description": "请求速率或每日配额已超限",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "format": "int32",
                      "enum": [
                        0,
                        100,
                        101,
                        202,
                        300,
                        301,
                        302,
                        303,
                        400,
                        404,
                        500,
                        503,
                        600,
                        601,
                        602
                      ]
                    },
                    "message": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "data": {},
                    "recordTime": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "requestId": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "code",
                    "data",
                    "message",
                    "recordTime"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "服务器内部错误",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "format": "int32",
                      "enum": [
                        0,
                        100,
                        101,
                        202,
                        300,
                        301,
                        302,
                        303,
                        400,
                        404,
                        500,
                        503,
                        600,
                        601,
                        602
                      ]
                    },
                    "message": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "data": {},
                    "recordTime": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "requestId": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "code",
                    "data",
                    "message",
                    "recordTime"
                  ]
                }
              }
            }
          },
          "503": {
            "description": "服务暂时不可用",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "format": "int32",
                      "enum": [
                        0,
                        100,
                        101,
                        202,
                        300,
                        301,
                        302,
                        303,
                        400,
                        404,
                        500,
                        503,
                        600,
                        601,
                        602
                      ]
                    },
                    "message": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "data": {},
                    "recordTime": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "requestId": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "code",
                    "data",
                    "message",
                    "recordTime"
                  ]
                }
              }
            }
          }
        },
        "x-order": "12001100",
        "x-api-version": "v2",
        "x-search-aliases": [
          "Xiaohongshu note search API",
          "RedNote keyword note search",
          "Xiaohongshu content search v2",
          "小红书笔记搜索接口",
          "小红书关键词搜笔记",
          "小红书内容搜索 V2"
        ],
        "x-highlights": [
          {
            "type": "warning",
            "kind": "GUIDANCE",
            "content": "`noteTime` 筛选不精确。例如，请求过去一天的笔记可能仍会返回超出该时间范围的笔记。如需更准确的发布时间筛选，请使用 [V4](./note-search-v4)。"
          }
        ],
        "x-endpoint-family": "xiaohongshu_search_note"
      }
    }
  }
}