# Felo 網頁搜尋

POST /api/v1/data/web/search

搜尋網頁，並將來源頁面提供給你的應用程式處理。若要取得帶來源的生成答案，請使用[Chat](https://openapi.felo.ai/zh-TW/docs/data-api/guides/felo-chat.md)。

所有範例都使用來自[總覽](https://openapi.felo.ai/zh-TW/docs/data-api/guides/felo-overview.md)的 `FELO_API_KEY`。呼叫會使用 **平台餘額**，不是 Felo Pro 點數。回應範例僅供說明；實際內容與可選欄位會有所不同。

## 端點

`POST /api/v1/data/web/search`

## 請求

| 欄位 | 類型 | 必填 | 意義 |
|---|---|---|---|
| `query` | string | 是 | 搜尋查詢，1–4,000 個字元 |
| `count` | integer | 否 | 要求的結果數量，1–50；預設 10 |

```bash
curl -sS --request POST "https://openapi.felo.ai/api/v1/data/web/search" \
  -H "Authorization: Bearer $FELO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"query":"retrieval augmented generation","count":3}'
```

## 回應

HTTP 200 會在 JSON 根層回傳結果：

```json
{
  "resources": [
    {"title":"Example guide","link":"https://example.com/guide","snippet":"An introduction to retrieval augmented generation."}
  ],
  "total": 1
}
```

| 欄位 | 意義 |
|---|---|
| `resources` | 回傳的頁面；每個都包含 `title`、`link` 與 `snippet` |
| `total` | 回傳的資源數量，不是網際網路上的總頁面數 |

`count` 是要求的數量，並不保證一定存在足夠的相符結果。這個端點沒有 cursor 參數。若要完整閱讀來源，請將其 `link` 傳給[網頁讀取](https://openapi.felo.ai/zh-TW/docs/data-api/guides/felo-web-read.md)。

## 計費與失敗

計費單位是一次請求（`web.search`），不是每個回傳頁面。請閱讀[目前價格](https://openapi.felo.ai/api/v1/data/prices)。餘額或配額錯誤必須與空的成功結果分開處理；請參閱[計費與錯誤](https://openapi.felo.ai/zh-TW/docs/data-api/guides/felo-billing.md)。
