# 抓取单个页面，并以 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
{}
```
