# 结合网络与学术结果的智能搜索

**API:** Data API

**Endpoint:** `POST /v1/beta/scholar/search/mixed`

**Tags:** Scholar Search

同时搜索网络和学术来源，适用于横跨两者的疑问。⚠️ 参数放在**查询字符串**中：`query`（必填）、`max_num_results`、`as_ylo`/`as_yhi`。返回搜索 `id` 和 `results[]`；**条目结构因来源而异**——每条结果都有 `title`、`link` 和 `snippet`，学术结果还额外带有 `authors` 和 `number_of_citations`，因此请将这两项视为可选，而不要假定它们一定存在。当无法预先判断哪类来源能回答时使用。若已能判断，`post_scholar_search_web` 或 `post_scholar_search_scholar` 更可预测。请保留 `id`，供 `post_scholar_search_explain` 使用。

### 计费参考

- 计量方式：按成功请求的固定成本计费。
- 参考请求估算：0.01 美元。
- 参考客户倍率：1.0。不得对已结算的客户金额再次应用。

仅供参考的元数据，不是账户报价、保证价格或消费上限。资源额度不同于 Felo 额度。最终扣费以 Felo 计费记录为准。

## Base URL

- `https://openapi.felo.ai`

## Authentication

- `FeloBearerAuth` (http bearer, bearer format Felo API Key)
- `FeloApiKey` (apiKey in header `X-API-Key`)

## Parameters

| Name | In | Required | Type | Description |
| --- | --- | --- | --- | --- |
| `as_yhi` | query | no | integer \| null | 出版年份上限 |
| `as_ylo` | query | no | integer \| null | 出版年份下限 |
| `max_num_results` | query | no | integer, default: 10 | 要返回的最大搜索结果数，最多 100 |
| `query` | query | yes | string | 学术资料的搜索查询 |

## Responses

### 200 — 搜索成功响应

Headers:
- `X-Request-Id` (string) — 联系 Felo 支持时需提供的请求标识符。

**application/json**

Schema: `Response8Da310D1D213_SmartSearchResponse` (`#/components/schemas/Response8Da310D1D213_SmartSearchResponse`)

### 400 — 无法处理该请求。请检查请求参数。

### 401 — 需要有效的 Felo API 密钥。

### 402 — 由于未满足计费要求，请求无法继续。

### 403 — 该账户无权执行此操作。

### 429 — 已达到请求或支出限额。

### 502 — 服务无法完成该请求。

### 503 — API 或计费服务暂时不可用。

### 504 — 服务在处理请求时超时。

### default — 错误响应；上游透传响应可能采用提供方格式

**application/json**

Schema:

```json
{}
```

## Schema definitions

### Response8Da310D1D213_SmartResult

`#/components/schemas/Response8Da310D1D213_SmartResult`

```json
{
  "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": "结果的相关性评分"
    }
  }
}
```

### Response8Da310D1D213_SmartSearchResponse

`#/components/schemas/Response8Da310D1D213_SmartSearchResponse`

```json
{
  "type": "object",
  "required": [
    "id",
    "results"
  ],
  "properties": {
    "id": {
      "type": "string",
      "description": "搜索请求的唯一标识符"
    },
    "results": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/Response8Da310D1D213_SmartResult"
      },
      "description": "结合网络与学术内容的智能搜索结果列表"
    },
    "search_type": {
      "type": "string",
      "enum": [
        "web",
        "academic",
        "hybrid"
      ],
      "description": "所包含的搜索结果类型"
    }
  }
}
```
