{"uid":"cap_JEmqko9PLyXAMNygwZxWr","slug":"swift-bot-labs-html-extract-86115ff7","name":"Swift Bot Labs HTML Extract","description":"62 small, deterministic utility APIs (DNS and e-mail checks, web extraction, EVM decoding, x402 checks, IP math, JSON/CSV, hashing, conversions). No account or API key: pay per call in USDC with x402.","url":"https://x402-toolbox.swiftbotlab.workers.dev/v1/html/extract?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"html":{"type":"string","maxLength":2097152},"mode":{"enum":["main","all"],"type":"string","default":"all"},"format":{"enum":["markdown","text","both"],"type":"string","default":"markdown"},"baseUrl":{"type":"string","maxLength":2048},"maxChars":{"type":"integer","default":40000,"maximum":200000,"minimum":500}}},"responseSchema":{"type":"json","example":{"ok":true,"tool":"html-extract","result":{"links":[{"href":"https://example.com/docs","text":"the docs"}],"title":null,"words":4,"markdown":"# Hi\n\nRead [the docs](https://example.com/docs)."}}},"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_MW0k1q1ipKTSjT5X07ilm","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 clean text, Markdown, and links from raw HTML, optionally converting to readable format","exampleAgentPrompt":"Take this raw HTML string and extract all the readable content as markdown, including any links, and limit the output to 50000 characters: <html>...</html>","exampleUseCases":[{"title":"LLM-ready web content pipeline","prompt":"I just scraped this HTML from a product page — can you extract the main readable content as markdown so I can feed it into my summarization prompt? Keep it under 40000 characters."},{"title":"Link harvesting from crawled page","prompt":"Here's the raw HTML from a crawled blog page. Extract all the hyperlinks with their anchor text, in markdown format, using the base URL https://example.com."},{"title":"Article text extraction for analysis","prompt":"Pull out just the plain text from this HTML — I want the body content without any tags or formatting, using 'main' mode to focus on the primary article, capped at 10000 characters."}],"resultDescription":"Returns a JSON object with ok:true, the tool name, and a result object containing: markdown-formatted content, plain text (depending on format mode), an array of links with href and text, the page title (if found), and a word count.","failureModes":["HTML string exceeds 2MB maxLength limit — request rejected","maxChars set below minimum of 500 — validation error","Malformed or non-HTML input produces empty or minimal output","Payment in USDC not completed via x402 protocol — 402 response returned","Invalid enum value for mode or format fields — schema validation error"],"whenToPreferThis":"Choose this endpoint when you have raw HTML content (already fetched) and need to convert it into clean, structured text or Markdown — especially for feeding into LLMs, extracting links, or processing scraped pages. It is ideal for agentic pipelines where a separate fetch step has already retrieved the HTML and now needs readability extraction without spinning up a headless browser. At $0.005 per call with no API key required, it suits lightweight pay-per-use workflows.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-31T18:41:15.987Z","isFirstParty":false,"canonicalSlug":"swift-bot-labs-html-extract-86115ff7"}