> ## Documentation Index
> Fetch the complete documentation index at: https://aisa.one/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# 智能搜索

> 结合网页和学术结果的智能搜索

运行可在一个响应中结合网络结果和学术结果的混合搜索。

**最适合：** 同时需要学术论文和更广泛网络背景的研究任务。

<Note>
  Scholar 搜索端点使用 `POST`，参数位于查询字符串中。请勿将 `query` 或 `max_num_results` 作为 JSON 或表单请求正文发送。
</Note>

## 示例

```bash theme={null}
curl -X POST "https://api.aisa.one/apis/v1/scholar/search/mixed?query=self-correcting%20agent%20frameworks&max_num_results=5" \
  -H "Authorization: Bearer ${AISA_API_KEY}"
```

## 响应

返回一个搜索 `id` 和一个 `results` 数组。根据所选来源，结果对象可能包含网络字段、学术字段或同时包含两者。


## OpenAPI

````yaml openapi/zh/platform-txyz-openapi.json POST /scholar/search/mixed
openapi: 3.0.0
info:
  title: TXYZ Platform API
  version: 1.0.0
  description: platform.txyz.ai 服务的 API 文档，包括学术搜索功能
  contact:
    email: support@txyz.ai
  license:
    name: Proprietary
servers:
  - url: https://api.aisa.one/apis/v1
security:
  - BearerAuth: []
paths:
  /scholar/search/mixed:
    post:
      tags:
        - Search
        - Smart
      summary: 结合网页和学术结果的智能搜索
      description: 执行结合网页和学术结果的智能搜索。参数以查询参数形式接收；此操作不支持请求正文。
      operationId: searchSmart
      parameters:
        - name: query
          in: query
          required: true
          description: 学术资料搜索查询
          schema:
            type: string
            example: machine learning
        - name: max_num_results
          in: query
          description: 返回的搜索结果最大数量，最多 100 条
          schema:
            type: integer
            minimum: 1
            maximum: 100
            default: 10
        - name: as_ylo
          in: query
          description: 出版年份下限
          schema:
            type: integer
            nullable: true
            minimum: 1900
            maximum: 2030
        - name: as_yhi
          in: query
          description: 出版年份上限
          schema:
            type: integer
            nullable: true
            minimum: 1900
            maximum: 2030
      responses:
        '200':
          description: 搜索成功响应
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SmartSearchResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '500':
          $ref: '#/components/responses/InternalError'
      security:
        - BearerAuth: []
components:
  schemas:
    SmartSearchResponse:
      type: object
      required:
        - id
        - results
      properties:
        id:
          type: string
          description: 搜索请求的唯一标识符
        results:
          type: array
          items:
            $ref: '#/components/schemas/SmartResult'
          description: 融合网页和学术内容的智能搜索结果列表
        search_type:
          type: string
          enum:
            - web
            - academic
            - hybrid
          description: 包含的搜索结果类型
    SmartResult:
      type: object
      required:
        - title
        - link
        - snippet
      properties:
        title:
          type: string
          description: 结果标题
        link:
          type: string
          format: uri
          description: 用于访问内容的 URL
        snippet:
          type: string
          description: 简要摘要
        authors:
          type: array
          items:
            type: string
          description: 作者列表（用于学术内容）
        number_of_citations:
          type: integer
          minimum: 0
          description: 引用数量（针对学术内容）
        type:
          type: string
          enum:
            - web
            - academic
          description: 结果类型
        relevance_score:
          type: number
          minimum: 0
          maximum: 1
          description: 结果的相关性评分
    ErrorResponse:
      type: object
      properties:
        error:
          type: string
          description: 描述错误原因的错误消息
        code:
          type: integer
          description: HTTP 状态码
        details:
          type: string
          description: 其他错误详情
  responses:
    BadRequest:
      description: 错误请求 - 参数无效
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    Unauthorized:
      description: 未授权 - API 密钥无效或缺失
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    TooManyRequests:
      description: 超出速率限制
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    InternalError:
      description: 内部服务器错误
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````