{"uid":"cap_h9opgJI2PyFJRdaXUSRFG","slug":"agentshelf-syntexa-ch-xpath-code-extractor-e52c413a","name":"agentshelf.syntexa.ch XPath Code Extractor","description":"Call when an agent needs text of //code via //code from a public page or HTML (SSRF-safe). Exact $0.01 USDC. Prefer unpaid POST /v1/sandbox/xpath-code first.","url":"https://agentshelf.syntexa.ch/v1/xpath-code?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.01","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.01/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_8JRDMS_0WOFA22dnhkeQS","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.01","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Extracts text or code from a public web page or raw HTML using XPath, with SSRF protection, for $0.01 USDC per call.","exampleAgentPrompt":"Can you extract the code block from this page https://docs.example.com/api/quickstart using XPath //pre[@class='code']?","exampleUseCases":[{"title":"Extract code from documentation page","prompt":"Pull the Python code example from https://docs.someapi.com/getting-started — it's inside the element at XPath //div[@id='python-example']//code."},{"title":"Scrape article text from news site","prompt":"Get me the main article body text from https://news.example.com/article/12345 — it should be at XPath //article//p, concatenated together."},{"title":"Parse raw HTML snippet for a value","prompt":"I have this HTML from a product page — can you extract the price text using XPath //span[@class='price'] from it?"}],"resultDescription":"Returns the extracted text or code content matched by the XPath expression from either a fetched public URL or provided raw HTML string. Output is the raw text content of the matched node(s).","failureModes":["URL is not publicly accessible or returns non-200 status — endpoint may return an error or empty result","XPath expression matches no nodes — returns empty or null result","HTML content exceeds 200,000 character limit — request rejected","URL triggers SSRF protection (private/internal IP ranges) — blocked and returns error","Malformed XPath expression — returns parse error","URL parameter too short (<8 chars) or too long (>2048 chars) — schema validation failure"],"whenToPreferThis":"Use this endpoint when you need to extract specific text or code from a known public web page or a chunk of HTML using a precise XPath expression, and you want SSRF-safe fetching with a predictable $0.01 USDC cost. Prefer the free sandbox POST /v1/sandbox/xpath-code for testing. Choose this over CSS-selector-based scrapers when XPath specificity is required.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-02T06:48:25.550Z","isFirstParty":false,"canonicalSlug":"agentshelf-syntexa-ch-xpath-code-extractor-e52c413a"}