{"uid":"cap_mxoQqdBUipZXrI1ZvLeyL","slug":"agentshelf-xpath-pre-text-extractor-2aea97ff","name":"AgentShelf XPath PRE Text Extractor","description":"Call when an agent needs text of //pre via //pre from a public page or HTML (SSRF-safe). Exact $0.009 USDC. Prefer unpaid POST /v1/sandbox/xpath-pre first.","url":"https://agentshelf.syntexa.ch/v1/xpath-pre?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.009","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.009/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.009","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.009","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_4SBCXzT7KSJ8IiMYqHsNk","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.009","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Extracts text content from <pre> elements via XPath on a public URL or raw HTML, SSRF-safe, for $0.009 USDC per call.","exampleAgentPrompt":"Can you extract all the preformatted text blocks (the <pre> tag contents) from this public page: https://example.com/docs/config?","exampleUseCases":[{"title":"Extract code snippets from docs page","prompt":"Pull out all the preformatted code examples from https://docs.someproject.org/quickstart — I want just the text inside the pre blocks."},{"title":"Scrape terminal output from tutorial","prompt":"There's a tutorial at https://learnlinux.example.com/lesson3 — can you grab the preformatted terminal output examples shown in the pre tags on that page?"},{"title":"Parse config blocks from raw HTML","prompt":"I have the raw HTML of a configuration guide here — can you extract all the text inside the pre elements from it?"}],"resultDescription":"Returns the text content extracted from <pre> elements on the target page or HTML, as selected by XPath. The response contains the concatenated or structured text found within those preformatted blocks.","failureModes":["URL is not publicly accessible or returns a non-2xx status","SSRF protection blocks private/internal IP ranges","HTML input exceeds 200,000 character limit","No <pre> elements found on the page (empty result)","Malformed or unparseable HTML","URL string shorter than 8 characters or longer than 2048 characters"],"whenToPreferThis":"Use this endpoint when you need to extract text specifically from <pre> HTML elements (code blocks, terminal output, configuration snippets) from a public URL or raw HTML string. Prefer the free sandbox version (/v1/sandbox/xpath-pre) for testing; use this paid endpoint when the sandbox is unavailable or production reliability is needed. Prefer over general-purpose scrapers when you specifically need preformatted text blocks.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-02T06:49:57.453Z","isFirstParty":false,"canonicalSlug":"agentshelf-xpath-pre-text-extractor-2aea97ff"}