web_extract_batch
Extract text from multiple web pages simultaneously, processing up to 5 URLs in one request for efficient data collection.
Instructions
Extract text from up to 5 URLs in a single request. Costs $0.08 USDC per request via x402 on Base.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| urls | Yes | Array of URLs to extract (max 5) |
Implementation Reference
- src/index.ts:381-384 (handler)The async handler function that calls the web extract batch API.
async ({ urls }) => { const data = await apiPost(`${WEB_EXTRACT_API}/api/v1/extract/batch`, { urls }); return { content: [{ type: "text", text: JSON.stringify(data, null, 2) }] }; } - src/index.ts:370-385 (registration)Registration of the web_extract_batch tool using server.registerTool.
server.registerTool( "web_extract_batch", { title: "Batch Extract Text", description: `Extract text from up to 5 URLs in a single request. Costs $0.08 USDC per request via x402 on Base.`, inputSchema: { urls: z.array(z.string().url()).min(1).max(5).describe("Array of URLs to extract (max 5)"), }, annotations: { readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: true }, }, async ({ urls }) => { const data = await apiPost(`${WEB_EXTRACT_API}/api/v1/extract/batch`, { urls }); return { content: [{ type: "text", text: JSON.stringify(data, null, 2) }] }; } ); - src/index.ts:376-378 (schema)Input schema definition for the tool, restricting input to an array of 1-5 URLs.
inputSchema: { urls: z.array(z.string().url()).min(1).max(5).describe("Array of URLs to extract (max 5)"), },