# 面向 AI 的即時網路搜尋。

**API:** Data API

**Endpoint:** `POST /v1/beta/byteplus/web-search`

**Tags:** BytePlus

執行專為 AI 代理打造的即時網路搜尋，傳回依相關度排序的結果清單，包含標題、連結與摘要。`Query` 為必填；可用 `Count`（≤ 20）、`Filter`（限定 `Sites` 或排除 `BlockHosts`）、`Language` 與 `TimeRange` 縮小結果集。回應包裝了 `ResponseMetadata.RequestId` 與網路結果的 `Result` 清單。適用於 RAG 檢索增強、競品與公關監測、事實查核與內容取材；可將每個結果 URL 搭配 `post_byteplus_fetch` 取得完整頁面內容。

### 定價參考

- 計量方式：以成功請求為固定成本基礎。
- 參考請求預估：USD 0.0048。
- 參考客戶乘數：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`)

## Request body

Required: **yes**

### application/json

Schema:

```json
{
  "type": "object",
  "properties": {
    "Query": {
      "type": "string",
      "description": "搜尋查詢。必填。最多 400 個字元；上游引擎實際上還會限制在約 50 個詞。",
      "example": "OpenAI news",
      "maxLength": 400
    },
    "Count": {
      "type": "integer",
      "description": "要傳回的結果數量。選用；預設 10，最大 20。",
      "maximum": 20,
      "example": 10,
      "default": 10
    },
    "Filter": {
      "type": "object",
      "description": "選用的結果篩選。兩個欄位都是以豎線分隔的完整網域字串（各最多 5 個）。",
      "properties": {
        "Sites": {
          "type": "string",
          "description": "將結果限定為這些完整網域。以豎線分隔，最多 5 個，例如「bytedance.com|byteplus.com」。（傳送陣列會傳回 10400 Invalid Parameter。）",
          "example": "bytedance.com|byteplus.com"
        },
        "BlockHosts": {
          "type": "string",
          "description": "排除來自這些完整網域的結果。以豎線分隔，最多 5 個，例如「reddit.com|quora.com」。",
          "example": "reddit.com|quora.com"
        }
      }
    },
    "Language": {
      "type": "string",
      "description": "選用的語言提示，採用上游格式，例如 EN、ZH-HANS、ZH-HANT。",
      "example": "EN"
    },
    "TimeRange": {
      "description": "選用的時間範圍。可取命名範圍 OneDay / OneWeek / OneMonth / OneYear 之一，或自訂範圍「YYYY-MM-DD..YYYY-MM-DD」。省略則不進行時間篩選。注意：像「week」/「month」這樣的值會被上游靜默忽略。",
      "oneOf": [
        {
          "type": "string",
          "enum": [
            "OneDay",
            "OneWeek",
            "OneMonth",
            "OneYear"
          ]
        },
        {
          "type": "string",
          "pattern": "^\\d{4}-\\d{2}-\\d{2}\\.\\.\\d{4}-\\d{2}-\\d{2}$",
          "description": "自訂範圍，例如 2026-08-01..2026-09-01。"
        }
      ],
      "example": "OneWeek"
    }
  },
  "required": [
    "Query"
  ]
}
```

Example:

```json
{
  "Query": "OpenAI news"
}
```

## Responses

### 200 — 搜尋成功完成。`Result` 包含排序後的網路結果。

Headers:
- `X-Request-Id` (string) — 聯絡 Felo 支援時需提供的請求識別碼。

**application/json**

Schema: object

```json
{
  "type": "object",
  "properties": {
    "ResponseMetadata": {
      "type": "object",
      "description": "上游請求中繼資料。",
      "properties": {
        "RequestId": {
          "type": "string",
          "description": "此請求的唯一識別碼。"
        },
        "Action": {
          "type": "string"
        },
        "Version": {
          "type": "string"
        },
        "Service": {
          "type": "string"
        },
        "Region": {
          "type": "string"
        }
      }
    },
    "Result": {
      "type": "object",
      "description": "搜尋結果內容。",
      "properties": {
        "ResultCount": {
          "type": "integer",
          "description": "傳回的網路結果數量。"
        },
        "WebResults": {
          "type": "array",
          "description": "排序後的網路結果清單。",
          "items": {
            "type": "object",
            "properties": {
              "Id": {
                "type": "string",
                "description": "不透明的結果 ID。"
              },
              "SortId": {
                "type": "integer",
                "description": "結果的排名（從 1 開始）。"
              },
              "Title": {
                "type": "string",
                "description": "結果標題。"
              },
              "SiteName": {
                "type": "string",
                "description": "來源網站名稱（可能為空）。"
              },
              "Url": {
                "type": "string",
                "description": "結果 URL。"
              },
              "Snippet": {
                "type": "string",
                "description": "來自頁面的簡短文字片段。"
              },
              "Summary": {
                "type": "string",
                "description": "頁面內容的較長摘要。"
              },
              "PublishTime": {
                "type": "string",
                "description": "ISO 8601 格式的發布時間（可能為空）。"
              },
              "PublishTimeUnix": {
                "type": "integer",
                "description": "發布時間，Unix 秒（未知時為 0）。"
              },
              "LogoUrl": {
                "type": "string",
                "description": "已簽章的網站標誌 URL（有時效）。"
              }
            }
          }
        },
        "SearchContext": {
          "type": "object",
          "description": "已解析查詢情境的回顯。",
          "properties": {
            "OriginQuery": {
              "type": "string"
            },
            "SearchType": {
              "type": "string"
            }
          }
        },
        "TimeCost": {
          "type": "integer",
          "description": "上游處理時間，單位為毫秒。"
        },
        "LogId": {
          "type": "string",
          "description": "上游日誌 ID（等於 ResponseMetadata.RequestId）。"
        },
        "Choices": {
          "type": [
            "array",
            "null"
          ],
          "description": "保留欄位；不適用時為 null。",
          "items": {
            "type": "object"
          }
        },
        "Usage": {
          "type": [
            "object",
            "null"
          ],
          "description": "保留欄位；不適用時為 null。"
        }
      }
    }
  }
}
```

Example:

```json
{
  "ResponseMetadata": {
    "RequestId": "20260904155503A787EC832774768DC56F",
    "Action": "",
    "Version": "",
    "Service": "",
    "Region": ""
  },
  "Result": {
    "ResultCount": 3,
    "WebResults": [
      {
        "Id": "19b903d59c017bbb04c7832574500d49",
        "SortId": 1,
        "Title": "OpenAI News | OpenAI",
        "SiteName": "OpenAI",
        "Url": "https://openai.com/news/",
        "Snippet": "Stay up to speed on the rapid advancement of AI technology and the benefits it offers to humanity.",
        "Summary": "Stay up to speed on the rapid advancement of AI technology and the benefits it offers to humanity.",
        "PublishTime": "2026-09-03T07:50:20+08:00",
        "PublishTimeUnix": 1788393020,
        "LogoUrl": "https://p16-bpsearch-sign.ibyteimg.com/...<signed>"
      }
    ],
    "SearchContext": {
      "OriginQuery": "OpenAI latest news",
      "SearchType": "web"
    },
    "TimeCost": 935,
    "LogId": "20260904155503A787EC832774768DC56F",
    "Choices": null,
    "Usage": null
  }
}
```

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

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

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

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

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

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

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

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

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

**application/json**

Schema:

```json
{}
```
