Skip to main content
Glama
yantrix-ai

@praveen030686/data-apis-mcp

web_extract_product

Extract product details like name, price, reviews, and ratings from product pages using AI-powered web scraping.

Instructions

Extract product information: name, price, reviews, ratings from any product page. Costs $0.05 USDC per request via x402 on Base.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlYesProduct page URL to extract data from

Implementation Reference

  • The implementation of the 'web_extract_product' tool, which calls the 'apiPost' function to extract product information from the provided URL.
    async ({ url }) => {
      const data = await apiPost(`${WEB_EXTRACT_API}/api/v1/extract/product`, { url });
      return { content: [{ type: "text", text: JSON.stringify(data, null, 2) }] };
    }
  • src/index.ts:353-368 (registration)
    Registration of the 'web_extract_product' tool, including its title, description, and input schema.
    server.registerTool(
      "web_extract_product",
      {
        title: "Extract Product Data",
        description: `Extract product information: name, price, reviews, ratings from any product page.
    Costs $0.05 USDC per request via x402 on Base.`,
        inputSchema: {
          url: z.string().url().describe("Product page URL to extract data from"),
        },
        annotations: { readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: true },
      },
      async ({ url }) => {
        const data = await apiPost(`${WEB_EXTRACT_API}/api/v1/extract/product`, { url });
        return { content: [{ type: "text", text: JSON.stringify(data, null, 2) }] };
      }
    );

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/yantrix-ai/x402-apis-mcp-server'

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