> ## Documentation Index
> Fetch the complete documentation index at: https://mintlify-docs-automation-github-pr-review.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# 搜索文档

> 在你的文档中执行语义搜索和关键词搜索，并支持可配置的过滤和分页。

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

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


## OpenAPI

````yaml zh/discovery-openapi.json POST /v1/search/{domain}
openapi: 3.0.1
info:
  title: Mintlify Assistant API
  description: 用于将 Mintlify 的探索功能集成到你的产品中的 API。
  version: 1.0.0
servers:
  - url: https://api.mintlify.com/discovery
security:
  - bearerAuth: []
paths:
  /v1/search/{domain}:
    post:
      summary: 搜索文档
      description: 在你的文档中执行语义搜索和关键词搜索，并支持可配置的过滤和分页。
      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: 按标签筛选结果。
      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。
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        Authorization 请求头需要携带 Bearer 令牌。请使用以 `mint_dsc_` 为前缀的 AI 助手 API
        密钥。它是一个可以安全用于客户端代码的公用密钥。你可以在控制台的 [API
        密钥页面](https://dashboard.mintlify.com/settings/organization/api-keys)
        中生成它。

````