> ## Documentation Index
> Fetch the complete documentation index at: https://wiki.another-horizon.eu/llms.txt
> Use this file to discover all available pages before exploring further.

# 搜索文档

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



## OpenAPI

````yaml zh/discovery-openapi.json post /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/v1
security:
  - bearerAuth: []
paths:
  /search/{domain}:
    post:
      summary: 搜索文档
      description: 在文档中执行语义搜索和关键词搜索，支持可配置的过滤和分页。
      parameters:
        - name: domain
          in: path
          required: true
          schema:
            type: string
          description: >-
            你在 `domain.mintlify.app` URL 中的 domain 标识符。可以在控制台 URL
            的末尾找到。例如，`dashboard.mintlify.com/organization/domain` 的 domain 标识符就是
            `domain`。
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - query
              properties:
                query:
                  type: string
                  description: 将在文档内容中执行的搜索查询。
                pageSize:
                  type: number
                  default: 10
                  description: 要返回的搜索结果数量。如未指定，则默认为 10。
                filter:
                  type: object
                  description: 可选筛选参数，可用于缩小搜索结果范围。
                  properties:
                    version:
                      type: string
                      description: 根据文档版本筛选结果。
                    language:
                      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 令牌。有关如何获取 API key 的详细信息，请参阅 [Assistant API
        Key 文档](/api/introduction#assistant-api-key)。

````