# 執行網路搜尋並傳回依排名排列的結果。

**API:** Data API

**Endpoint:** `POST /v1/beta/firecrawl/search`

**Tags:** Firecrawl

搜尋網路並傳回依排名排列的結果。`query` 為必填；`limit` 設定數量。傳回 `success`、`creditsUsed`、請求 `id`，以及包含 `url`、`title`、`description` 與 `position` 的 `data.web[]`——**僅標題與摘要，不含頁面文字**。以下情況請改用其他工具：希望同一次呼叫取得頁面文字——`searchWeb` 會傳回文字，且耗時只有三分之一；已知 URL——`post_firecrawl_scrape`；希望依語意而非關鍵字判斷相關性——`post_exa_search`。

### 計費參考

- 計量方式：依結果筆數計量。
- 參考請求估算：0.002142 美元。
- 單位成本基準：0.001071 美元。
- 資源單位：`firecrawl_credit`。
- 參考客戶倍率：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
{
  "additionalProperties": false,
  "properties": {
    "enterprise": {
      "default": false,
      "enum": [
        false
      ],
      "type": "boolean"
    },
    "limit": {
      "default": 10,
      "maximum": 100,
      "minimum": 1,
      "type": "integer"
    },
    "query": {
      "maxLength": 2000,
      "minLength": 1,
      "type": "string"
    },
    "sources": {
      "default": [
        "web"
      ],
      "enum": [
        [
          "web"
        ]
      ],
      "items": {
        "type": "string"
      },
      "maxItems": 1,
      "minItems": 1,
      "type": "array"
    }
  },
  "required": [
    "query"
  ],
  "type": "object"
}
```

Example:

```json
{
  "enterprise": false,
  "limit": 10,
  "query": "nike",
  "sources": [
    "web"
  ]
}
```

## Responses

### 200 — 搜尋成功完成。

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

**application/json**

Schema: object

```json
{
  "type": "object",
  "properties": {
    "success": {
      "type": "boolean",
      "description": "search 成功時為 true。"
    },
    "data": {
      "type": "object",
      "properties": {
        "web": {
          "type": "array",
          "description": "排序後的網頁搜尋結果。",
          "items": {
            "type": "object",
            "properties": {
              "title": {
                "type": "string",
                "description": "結果標題。"
              },
              "url": {
                "type": "string",
                "description": "結果 URL。"
              },
              "description": {
                "type": "string",
                "description": "結果摘要。"
              }
            }
          }
        }
      }
    },
    "creditsUsed": {
      "type": "integer",
      "description": "消耗的 Firecrawl 額度（每 10 筆結果約 2 個）。"
    }
  }
}
```

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

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

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

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

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

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

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

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

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

**application/json**

Schema:

```json
{}
```
