Skip to main content
Glama
praveen030686

@praveen030686/data-apis-mcp

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
NameRequiredDescriptionDefault
urlsYesArray of URLs to extract (max 5)

Implementation Reference

  • 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) }] };
      }
    );
  • 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)"),
    },

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/praveen030686/x402-apis-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server