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
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | Product page URL to extract data from |
Implementation Reference
- src/index.ts:364-367 (handler)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) }] }; } );