> ## Documentation Index
> Fetch the complete documentation index at: https://mintlify.manicule.dev/zh/llms.txt
> Use this file to discover all available pages before exploring further.
> For every page in one file, fetch https://mintlify.manicule.dev/zh/llms-full.txt (large).
> To search and read these docs as tools, connect the MCP server at https://mintlify.manicule.dev/api/mcp.
> Every agent surface: https://mintlify.manicule.dev/.well-known/llms-manifest.json

# 搜索文档 (/zh/api/assistant/search)

<!-- agent-signals: reading_time_min: 1 · est_tokens: 842 · updated: 2026-07-31 -->
Related: [创建 assistant 消息](/zh/api/assistant/create-assistant-message-v2.md), [获取页面内容](/zh/api/assistant/get-page-content.md)

<div id="rate-limits">
  ## 速率限制
</div>

* 每个 Mintlify 组织每小时 10,000 次请求

`POST /v1/search/{domain}`

> 在你的文档中执行语义搜索和关键词搜索，并支持可配置的过滤和分页。
>
> 使用 assistant API 密钥进行身份验证。搜索请求不消耗额度。

Base URL: `https://api.mintlify.com/discovery`

## OpenAPI

```json
{
  "servers": [
    {
      "url": "https://api.mintlify.com/discovery"
    }
  ],
  "security": [
    {
      "bearerAuth": []
    }
  ],
  "securitySchemes": {
    "bearerAuth": {
      "type": "http",
      "scheme": "bearer",
      "description": "Authorization 请求头需要携带 Bearer 令牌。请使用 assistant API 密钥。你可以在控制台的 [API 密钥页面](https://dashboard.mintlify.com/settings/organization/api-keys) 中生成一个。在生产环境中，请通过你的后端代理请求，而不是将密钥嵌入到客户端代码中。"
    }
  },
  "parameters": [
    {
      "name": "domain",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string"
      },
      "description": "来自你的 `domain.mintlify.site` URL 的域名标识符。可以在控制台 URL 的末尾找到。例如，`dashboard.mintlify.com/organization/domain` 的域名标识符就是 `domain`。"
    }
  ],
  "requestBody": {
    "required": true,
    "content": {
      "application/json": {
        "schema": {
          "type": "object",
          "required": [
            "query"
          ],
          "properties": {
            "query": {
              "type": "string",
              "description": "在文档内容中要执行的搜索查询。"
            },
            "pageSize": {
              "type": "integer",
              "default": 10,
              "minimum": 1,
              "maximum": 50,
              "description": "要返回的搜索结果数量。必须在 1 到 50 之间。若未指定，默认为 10。"
            },
            "scoreThreshold": {
              "type": "number",
              "minimum": 0,
              "maximum": 1,
              "description": "结果的最低相关性分数。仅返回分数等于或高于此阈值的结果。必须介于 0 和 1 之间。"
            },
            "filter": {
              "type": "object",
              "description": "用于缩小搜索结果范围的可选过滤参数。",
              "properties": {
                "version": {
                  "type": "string",
                  "description": "按文档版本筛选结果。"
                },
                "language": {
                  "type": "string",
                  "description": "按内容语言筛选结果。"
                },
                "tag": {
                  "type": "string",
                  "description": "按标签筛选结果。"
                },
                "groups": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  },
                  "description": "调用方获授权访问的可选文档分组。当部署启用 `auth` 或 `userAuth` 时，结果仅限于指定分组可查看的页面。在受保护的部署上如果省略或为空，则结果仅包含公开页面。"
                }
              }
            }
          }
        }
      }
    }
  },
  "responses": {
    "200": {
      "description": "搜索结果",
      "content": {
        "application/json": {
          "schema": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "content": {
                  "type": "string",
                  "description": "来自文档中匹配的内容。"
                },
                "path": {
                  "type": "string",
                  "description": "源文档所在的路径或 URL。"
                },
                "metadata": {
                  "type": "object",
                  "description": "与搜索结果相关的附加 metadata。"
                }
              }
            }
          }
        }
      }
    }
  }
}
```
