# 网页采集

按 URL 批量采集多个公开网页,也适用于 Agent 本地 fetch 无法读取的已知页面;返回整页 Markdown 或结构化元素。需要登录或点击翻页的页面用本地浏览器 MCP,不是这个任务。

ID: native-http:web.raw_html.capture · Region: cn · Status: available

catalog_version: 5c920c774a55e44d7e8c709143b88a18b8b2afcef91a5d19a8c9ae5d565d9077
updated_at: 2026-10-21T12:06:16.523771+00:00

按 URL 批量采集多个公开网页,也适用于 Agent 本地 fetch 无法读取的已知页面;返回整页 Markdown 或结构化元素。需要登录或点击翻页的页面用本地浏览器 MCP,不是这个任务。

历史数据以数据集发布版本定义覆盖周期；实时读取反映请求时资料，不保证覆盖全部记录。

Docs: https://docs.asklear.cn/capabilities/native-http%3Aweb.raw_html.capture

## POST /v1/native/web/raw-html/capture

native · available · api_key

REST 需要客户 API Key；MCP 需要已开放的服务及现有授权；CLI 需要已发布且包含该命令的客户端。

按 URL 批量采集多个公开网页,也适用于 Agent 本地 fetch 无法读取的已知页面;返回整页 Markdown 或结构化元素。需要登录或点击翻页的页面用本地浏览器 MCP,不是这个任务。

按成功处理的链接计费，失败链接不收费；费用受报价和 max_credits 限制。

恢复同一次原生请求时复用原 Idempotency-Key。

等待态响应提供结果/状态引用。先读取原结果；超时或结果不明时禁止自动重新提交付费执行。401/403/422 应先修正鉴权、权限或输入。

### Input schema / 输入契约

```json
{
  "$defs": {
    "Schema1": {}
  },
  "additionalProperties": false,
  "properties": {
    "input": {
      "additionalProperties": false,
      "properties": {
        "output_format": {
          "default": "markdown",
          "enum": [
            "markdown",
            "json"
          ],
          "type": "string"
        },
        "urls": {
          "items": {
            "type": "string"
          },
          "maxItems": 10,
          "minItems": 1,
          "type": "array"
        }
      },
      "required": [
        "urls"
      ],
      "type": "object"
    },
    "max_credits": {
      "anyOf": [
        {
          "maximum": 1000000000,
          "minimum": 0,
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "default": null
    },
    "task_query": {
      "anyOf": [
        {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Optional task attribution: when provided, write one concise, self-contained task_query in the user's language and reuse that exact value in every call for the task, including discovery, search, approval retry, results, export, and status checks. For MCP calls, when omitted, Asklear records a generic non-user-specific attribution so compatible clients can still call the tool. REST calls may omit it and remain unattributed. It is a task description, not a task identifier. Do not include hidden reasoning, credentials, or direct personal identifiers such as phone numbers, email addresses, identity numbers, or street addresses.",
          "maxLength": 300
        },
        {
          "type": "null"
        }
      ],
      "default": null
    }
  },
  "required": [
    "input"
  ],
  "type": "object"
}
```

### Synthetic request / 合成请求

```json
{
  "input": {
    "urls": [
      "https://example.com/public-content"
    ]
  }
}
```

### Response schema / 响应契约

```json
{
  "$defs": {
    "Schema1": {},
    "Schema2": {
      "properties": {
        "api_name": {
          "type": "string"
        },
        "credits_charged": {
          "minimum": 0,
          "type": "integer"
        },
        "latency_ms": {
          "minimum": 0,
          "type": "integer"
        },
        "request_id": {
          "type": "string"
        }
      },
      "required": [
        "api_name",
        "request_id",
        "latency_ms",
        "credits_charged"
      ],
      "type": "object"
    },
    "Schema3": {
      "additionalProperties": false,
      "properties": {
        "api_name": {
          "maxLength": 128,
          "minLength": 1,
          "pattern": "^[\\x21-\\x7e]+$",
          "type": "string"
        },
        "credits_charged": {
          "maximum": 30,
          "minimum": 1,
          "type": "integer"
        },
        "latency_ms": {
          "maximum": 120000,
          "minimum": 0,
          "type": "integer"
        },
        "request_id": {
          "maxLength": 128,
          "minLength": 1,
          "pattern": "^[\\x21-\\x7e]+$",
          "type": "string"
        }
      },
      "required": [
        "request_id",
        "api_name",
        "latency_ms",
        "credits_charged"
      ],
      "type": "object"
    }
  },
  "properties": {
    "data": {
      "additionalProperties": false,
      "properties": {
        "data": {
          "additionalProperties": true,
          "type": "object"
        },
        "meta": {
          "$ref": "#/$defs/Schema3"
        }
      },
      "required": [
        "data",
        "meta"
      ],
      "type": "object"
    },
    "meta": {
      "$ref": "#/$defs/Schema2"
    }
  },
  "required": [
    "data",
    "meta"
  ],
  "type": "object"
}
```

### Synthetic response / 合成响应

```json
{
  "data": {
    "data": {
      "documents": [
        {
          "content": "# Complete page\n\nBody and footer remain.",
          "format": "markdown",
          "status": "succeeded",
          "url": "https://example.com/page"
        }
      ]
    },
    "meta": {
      "api_name": "raw_html_v1",
      "credits_charged": 3,
      "latency_ms": 1,
      "request_id": "asklear-synthetic-raw-html"
    }
  },
  "meta": {
    "api_name": "web.raw_html.capture",
    "credits_charged": 3,
    "latency_ms": 12,
    "request_id": "asklear-example"
  }
}
```

- data (object): 暂无字段说明
- data.data (object): 暂无字段说明
- data.meta (object): 暂无字段说明
- data.meta.request_id (string): 暂无字段说明
- data.meta.api_name (string): 暂无字段说明
- data.meta.latency_ms (integer): 暂无字段说明
- data.meta.credits_charged (integer): 暂无字段说明
- meta (object): 暂无字段说明
- meta.api_name (string): 暂无字段说明
- meta.request_id (string): 暂无字段说明
- meta.latency_ms (integer): 暂无字段说明
- meta.credits_charged (integer): 暂无字段说明

Follow up: GET /v1/native/results/{query_id}
读取已保存结果，不重复查询数据或收费。

