{"uid":"cap_7WmgS0bs6dYjOJSXqSgGD","slug":"agentshelf-xpath-main-content-extractor-b260b29e","name":"AgentShelf XPath Main Content Extractor","description":"Call when an agent needs text of //main via //main from a public page or HTML (SSRF-safe). Exact $0.005 USDC. Prefer unpaid POST /v1/sandbox/xpath-main first.","url":"https://agentshelf.syntexa.ch/v1/xpath-main?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"url":{"type":"string","maxLength":2048,"minLength":8,"description":"Public page to fetch. The selector or profile is fixed by the SKU. Provide url or html."},"html":{"type":"string","examples":["<!doctype html><html lang=\"en\"><head><title>Hello</title>\n<meta name=\"description\" content=\"Desc\"><meta property=\"og:title\" content=\"OG\">\n<link rel=\"canonical\" href=\"https://example.com/\"><link rel=\"icon\" href=\"/favicon.ico\">\n</head><body><h1>Hello</h1><a href=\"https://example.com/a\">A</a></body></html>"],"maxLength":200000,"minLength":1,"description":"HTML to extract from locally. Provide html or url. When both are set, html is used."}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.005","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.005/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.005","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.005","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_AOMwG-8cKTukuHERY4Epc","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.005","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Extracts the text content of the main element (//main) from a public web page or provided HTML using XPath, with SSRF protection.","exampleAgentPrompt":"Can you grab the main content text from https://example.com/blog/article — just the text inside the <main> element?","exampleUseCases":[{"title":"Article body extraction for summarization","prompt":"Pull out the main content text from https://news.example.com/2024/top-story so I can summarize it."},{"title":"Main content from local HTML snippet","prompt":"I have some HTML I scraped earlier — can you extract just the text inside the main element from it?"},{"title":"Content quality check on a landing page","prompt":"Fetch the main section text from https://mysite.com/landing-page so I can check what content visitors actually see."}],"resultDescription":"Returns the extracted text content of the //main element found on the target page or within the provided HTML. If the page was fetched via URL, the response reflects the final resolved URL after any redirects.","failureModes":["No //main element found in the HTML — returns empty or null result","URL is unreachable or returns non-200 status — fetch error","SSRF-blocked URL (private IP range, localhost) — rejected for safety","HTML input exceeds 200,000 character limit — validation error","URL shorter than 8 characters or longer than 2048 characters — validation error","Payment of $0.005 USDC not provided — 402 Payment Required"],"whenToPreferThis":"Choose this endpoint when you specifically need the text content of the semantic <main> HTML element from a page, rather than a full markdown conversion or all link/href attributes. It is ideal when you want structured XPath-based extraction that is predictable and SSRF-safe, and when you have either a public URL or a raw HTML string to parse. Prefer the free sandbox POST /v1/sandbox/xpath-main first to test; use this paid endpoint for production use.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-02T06:50:05.518Z","isFirstParty":false,"canonicalSlug":"agentshelf-xpath-main-content-extractor-b260b29e"}