{"uid":"cap_pleKO_19ipCc7cGfdzrGc","slug":"agentshelf-xpath-data-extraction-7b0e99b4","name":"AgentShelf XPath Data Extraction","description":"Call when an agent needs text of //dd via //dd from a public page or HTML (SSRF-safe). Exact $0.009 USDC. Prefer unpaid POST /v1/sandbox/xpath-dd first.","url":"https://agentshelf.syntexa.ch/v1/xpath-dd?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_rvRx9-2Jx9fmtnjQtzsqt","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":"Evaluates XPath expressions against a public URL or raw HTML to extract text content, with SSRF protection on URL fetching.","exampleAgentPrompt":"Can you extract the article headline from https://example.com/news/article using the XPath expression //h1[@class='headline']?","exampleUseCases":[{"title":"Price monitoring from product page","prompt":"Grab the price text from https://shop.example.com/product/42 using the XPath //span[@class='price'] — I want to track whether it changes."},{"title":"Extract article body from news site","prompt":"Pull out the main article text from https://news.example.com/story/123 using the XPath //div[@id='article-body']//p and give me all the matched paragraph text."},{"title":"Scrape table data from public HTML","prompt":"I have this HTML snippet of a government stats table — can you run the XPath //table[@id='stats']//tr/td[2] on it and return all the values in that second column?"}],"resultDescription":"Returns the text content matched by the XPath expression, either fetched from the given public URL (SSRF-safe) or evaluated against the provided raw HTML. The response contains the extracted text nodes or attribute values selected by the XPath query.","failureModes":["Invalid or malformed XPath expression returns a parsing error","URL points to a private/internal IP address and is rejected by SSRF protection","URL is unreachable or returns a non-200 status, causing a fetch failure","HTML content exceeds 200,000 character limit, resulting in rejection","XPath matches no nodes, returning an empty result","Malformed HTML may cause unpredictable XPath evaluation results"],"whenToPreferThis":"Choose this endpoint when you need to extract a specific piece of text or data from a webpage or HTML document using a precise XPath selector, especially when you already know the document structure. It is preferable over full-page scraping when only a targeted node is needed. If you have raw HTML locally, pass it directly; if you need the page fetched, pass the URL and rely on its SSRF-safe fetching. Use the free sandbox variant /v1/sandbox/xpath-dd first for development.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-02T03:15:37.334Z","isFirstParty":false,"canonicalSlug":"agentshelf-xpath-data-extraction-7b0e99b4"}