{"uid":"cap_2bL4xSwvkdfnPPS4RnfgF","slug":"html-to-plain-text-extraction-d8840bb4","name":"HTML to Plain Text Extraction","description":"Machine-payable x402 utilities for hashing, Base64, UUID generation, unit and timezone conversion, realtime crypto market data, webpage/document extraction, URL-to-Markdown, metadata, RAG ingestion and deterministic website change detection.","url":"https://x402-gateway-production-1f21.up.railway.app/html/text?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method","bodyType","body"],"properties":{"body":{"type":"object","required":["html"],"properties":{"html":{"type":"string","maxLength":500000}},"additionalProperties":false},"type":{"type":"string","const":"http"},"method":{"enum":["POST"],"type":"string"},"bodyType":{"enum":["json","form-data","text"],"type":"string"}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object"}}}}},"responseSchema":{"type":"json","example":{"status":"ready"}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.001","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"registry","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.001/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_Qd5_L8c19-lalEqYMN8fv","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.001","costPer":"request","priority":0,"asset":null,"unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Strips HTML markup from a provided HTML string and returns clean plain text content","exampleAgentPrompt":"I have this raw HTML snippet and I need the clean readable text out of it — no tags, no markup, just the actual text content: '<html><body><h1>Hello World</h1><p>This is a test page.</p></body></html>'","exampleUseCases":[{"title":"Preprocessing HTML for RAG pipeline","prompt":"I just scraped the HTML from a documentation page and need to extract just the readable text so I can chunk it and add it to my vector database — here's the raw HTML: '<div class=\"content\"><h2>Getting Started</h2><p>Install the package with npm install mylib.</p></div>'"},{"title":"Cleaning newsletter HTML for analysis","prompt":"I received an HTML email newsletter and want to extract just the plain text from it so I can analyze the content — can you strip all the HTML tags from this: '<table><tr><td><p>This week in AI: new models released</p></td></tr></table>'"},{"title":"Extracting article text from scraped page","prompt":"I scraped the HTML of a news article and need the clean text to summarize it — please pull out just the readable content from this HTML markup: '<article><h1>Markets Rally</h1><p>Stocks surged today as investors reacted to...</p></article>'"}],"resultDescription":"A JSON response containing the extracted plain text from the submitted HTML, with all markup tags removed, returning only the human-readable textual content of the document.","failureModes":["HTML exceeds 500,000 character limit — request rejected","Malformed or non-HTML input provided — may return empty or garbled text","Missing required 'html' field in body — validation error","Payment not included or insufficient — x402 payment required response","Invalid bodyType enum value — schema validation error"],"whenToPreferThis":"Choose this endpoint when you have raw HTML strings that need to be converted to clean plain text for downstream processing such as NLP, summarization, semantic search, or RAG ingestion. It is ideal for preprocessing scraped web content, HTML emails, or document fragments where markup must be removed programmatically and you want a machine-payable, per-call microservice without managing your own parsing infrastructure.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-12T18:47:13.603Z","isFirstParty":false,"canonicalSlug":"html-to-plain-text-extraction-d8840bb4"}