# 網路搜尋

**API:** Data API

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

**Tags:** Scholar Search

搜尋開放網路並傳回精簡的結果清單。⚠️ 儘管是 POST，參數仍放在**查詢字串**中——`query`（必填）、`max_num_results`（預設 10，最大 100），以及用於年份範圍的 `as_ylo`/`as_yhi`。不接受 JSON 請求本文。傳回搜尋 `id` 與 `results[]`，僅包含 `title`、`link` 與 `snippet`。其優點正是傳回的內容很少，適合只需要知道有什麼存在的代理程式。它不提供頁面正文——若需要內容，`searchWeb` 會在同一次呼叫中傳回。請保留 `id`：`post_scholar_search_explain` 需要它。

### 定價參考

- 計量方式：以成功請求為固定成本基礎。
- 參考請求預估：USD 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_WebSearchResponse` (`#/components/schemas/Response8Da310D1D213_WebSearchResponse`)

### 400 — 無法處理該要求。請檢查請求參數。

### 401 — 需要有效的 Felo API 金鑰。

### 402 — 由於未符合計費要求，要求無法繼續。

### 403 — 該帳戶無權執行此操作。

### 429 — 已達到要求或支出上限。

### 502 — 服務無法完成該要求。

### 503 — API 或計費服務暫時無法使用。

### 504 — 服務在處理要求時逾時。

### default — 錯誤回應；上游透傳回應可能採用供應商格式

**application/json**

Schema:

```json
{}
```

## Schema definitions

### Response8Da310D1D213_WebResult

`#/components/schemas/Response8Da310D1D213_WebResult`

```json
{
  "type": "object",
  "required": [
    "title",
    "link",
    "snippet"
  ],
  "properties": {
    "title": {
      "type": "string",
      "description": "網頁標題"
    },
    "link": {
      "type": "string",
      "format": "uri",
      "description": "存取網頁的 URL"
    },
    "snippet": {
      "type": "string",
      "description": "網頁內容的簡要總結或預覽"
    },
    "display_url": {
      "type": "string",
      "description": "方便顯示的 URL"
    },
    "published_date": {
      "type": "string",
      "format": "date-time",
      "description": "網頁發布日期"
    }
  }
}
```

### Response8Da310D1D213_WebSearchResponse

`#/components/schemas/Response8Da310D1D213_WebSearchResponse`

```json
{
  "type": "object",
  "required": [
    "id",
    "results"
  ],
  "properties": {
    "id": {
      "type": "string",
      "description": "搜尋請求的唯一識別碼"
    },
    "results": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/Response8Da310D1D213_WebResult"
      },
      "description": "網路搜尋結果清單"
    }
  }
}
```
