{"uid":"cap_odtkVdQekftzPYml5rpzm","slug":"agentshelf-xpath-caption-extractor-52cd3ffa","name":"AgentShelf XPath Caption Extractor","description":"Call when an agent needs text of //caption via //caption from a public page or HTML (SSRF-safe). Exact $0.002 USDC. Prefer unpaid POST /v1/sandbox/xpath-caption first.","url":"https://agentshelf.syntexa.ch/v1/xpath-caption?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.002","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.002/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.002","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.002","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_2YA_6PNpmR8mfEpe894B0","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.002","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Extracts caption text from a public webpage or raw HTML using XPath targeting of caption elements, with SSRF protection.","exampleAgentPrompt":"Can you extract the caption text from this article page at https://example.com/article — I need whatever text is in the caption element on that page.","exampleUseCases":[{"title":"Extract image captions from news articles","prompt":"Go to https://bbc.com/news/world-12345678 and pull out the caption text that appears under the main image on that page."},{"title":"Parse captions from raw HTML snippet","prompt":"I have some HTML from a product page — can you extract the caption text from it? Here's the HTML: <figure><figcaption>Award-winning design 2024</figcaption></figure>"},{"title":"Scrape figure captions for a dataset","prompt":"I need the caption text from this public gallery page at https://museum.example.org/collection/item/42 — grab whatever is in the caption or figcaption element."}],"resultDescription":"Returns the extracted caption text from the specified public webpage URL or provided HTML, targeted via XPath on caption-type elements. The response contains the plain text content of the matched caption node(s).","failureModes":["No caption element found on the page — returns empty or null result","SSRF-blocked URL (private IP ranges, localhost) — request rejected for security","URL is not publicly accessible or returns non-200 status — fetch failure","HTML input exceeds 200,000 character limit — payload too large error","Malformed HTML that cannot be parsed by XPath — parse error","URL string shorter than 8 characters or longer than 2048 characters — validation error"],"whenToPreferThis":"Use this endpoint when you need to extract caption text specifically (figcaption, caption elements) from a public webpage or raw HTML and want SSRF-safe fetching built in. Prefer the free sandbox endpoint /v1/sandbox/xpath-caption first if available to avoid the $0.002 USDC cost. Choose this over general HTML scrapers when you specifically need XPath-targeted caption extraction without running your own browser or parser.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-02T06:50:09.843Z","isFirstParty":false,"canonicalSlug":"agentshelf-xpath-caption-extractor-52cd3ffa"}