# 擷取單一頁面，並以 markdown 傳回其主體內容。

**API:** Data API

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

**Tags:** Firecrawl

擷取單一 URL，並以 markdown 傳回其主體內容。`url` 與 `proxy` 均為必填——在計量方案下 `proxy` 必須為 `basic`——`formats` 用於選擇輸出格式。傳回 `success` 與 `data`，其中包含 `markdown` 以及一個較大的 `metadata` 物件，帶有頁面的 og: 與 twitter: 標籤、`statusCode`、`sourceURL` 與 `language`。⚠️ URL 必須為 HTTPS，且不能指向 PDF；兩者都會直接遭拒，而不是盡力處理。當你已有 URL 並需要文字時使用它。若需同時處理多個 URL，`post_firecrawl_batch_scrape` 會將它們作為單一背景任務執行，而 `extractWebContent` 可同步處理小批次。若要先找出 URL，請用 `post_firecrawl_map`。

### 計費參考

- 計量方式：方案資源單位。
- 參考請求估算：0.001071 美元。
- 單位成本基準：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": {
    "formats": {
      "enum": [
        [
          "markdown"
        ]
      ],
      "items": {
        "type": "string"
      },
      "maxItems": 1,
      "minItems": 1,
      "type": "array"
    },
    "onlyCleanContent": {
      "enum": [
        false
      ],
      "type": "boolean"
    },
    "proxy": {
      "enum": [
        "basic"
      ],
      "type": "string"
    },
    "url": {
      "format": "https_url",
      "type": "string",
      "description": "不支援的後綴：.pdf。"
    }
  },
  "required": [
    "proxy",
    "url"
  ],
  "type": "object"
}
```

Example:

```json
{
  "proxy": "basic",
  "url": "https://example.com"
}
```

## Responses

### 200 — 擷取成功完成。

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

**application/json**

Schema: object

```json
{
  "type": "object",
  "properties": {
    "success": {
      "type": "boolean",
      "description": "scrape 成功時為 true。"
    },
    "data": {
      "type": "object",
      "properties": {
        "markdown": {
          "type": "string",
          "description": "以 Markdown 表示的擷取頁面內容。"
        },
        "metadata": {
          "type": "object",
          "description": "頁面中繼資料，例如標題、描述、來源 URL 與 HTTP 狀態。",
          "properties": {
            "title": {
              "type": "string"
            },
            "description": {
              "type": "string"
            },
            "sourceURL": {
              "type": "string"
            },
            "statusCode": {
              "type": "integer"
            }
          }
        }
      }
    },
    "creditsUsed": {
      "type": "integer",
      "description": "此請求消耗的 Firecrawl 額度（每頁 1 個）。"
    }
  }
}
```

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

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

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

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

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

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

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

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

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

**application/json**

Schema:

```json
{}
```
