web_batch
Fetches a batch of URLs concurrently through the complete tiered scraping pipeline, returning one result per URL. Handles anti-bot, login, and JS rendering with per-URL token budgets.
Instructions
并发抓取一批 URL,各自走完整分级链路,返回逐个结果。
Args: urls: 目标 URL 列表(最多 batch_max_urls 个,默认 20)。 max_tokens: 每个 URL 的正文 token 预算上限。 link_policy: 同 web_fetch。 format: 同 web_fetch(markdown / text / json)。 headers: 所有 URL 共用的自定义请求头;传入时不走共享缓存。 cookies: 所有 URL 共用的自定义 cookie;传入时不走共享缓存。 timeout: 单次请求超时秒数。 deadline_ms: 整批共用的总预算(毫秒),不传表示不限。预算耗尽后还没开始的 子任务直接返回 timeout(diagnostics 为 deadline:exceeded),不再占用网络与浏览器。 bypass_cache: 跳过并绕过响应缓存。 debug: 每条结果附带 diagnostics(决策轨迹与计数,不含页面内容)。 session: 登录态会话名(默认 default);对该批所有 URL 生效。 proxy: 该批所有 URL 共用的代理;不传则按代理池分配,未配池时沿用全局配置。 显式传入代理时该批不读也不写共享缓存。 ctx: MCP 上下文,由框架注入,用于逐条上报进度(客户端请求进度时才发通知)。
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| urls | Yes | ||
| debug | No | ||
| proxy | No | ||
| format | No | markdown | |
| cookies | No | ||
| headers | No | ||
| session | No | default | |
| timeout | No | ||
| max_tokens | No | ||
| deadline_ms | No | ||
| link_policy | No | internal | |
| bypass_cache | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |