{"uid":"cap_V-CQz-fU6c75YWX2reAnw","slug":"x402-portfolio-text-cleaner-df39d08b","name":"x402-portfolio Text Cleaner","description":"Clean text: strip HTML, normalise unicode/whitespace, dedupe lines. Returns cleaned text plus stats.","url":"https://x402-portfolio.x402iom.workers.dev/text/clean","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"text":{"type":"string","description":"Input text (max 500KB)"},"options":{"type":"object","properties":{"lowercase":{"type":"boolean"},"stripHtml":{"type":"boolean"},"dedupeLines":{"type":"boolean"},"normalizeUnicode":{"type":"boolean"},"normalizeWhitespace":{"type":"boolean"}}}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.003","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.003/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.003","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.003","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_CKTI774gBXt_skl0MwmtY","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.003","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Cleans raw text by stripping HTML tags, normalising Unicode and whitespace, deduplicating lines, and optionally lowercasing — returning cleaned text plus processing stats.","exampleAgentPrompt":"Clean up this block of scraped HTML — strip all the tags, normalize the unicode, deduplicate repeated lines, and normalize the whitespace so I get back just the plain readable text with stats on what was changed.","exampleUseCases":[{"title":"Scraper output sanitization","prompt":"I just scraped a bunch of product descriptions from a website and they're full of HTML tags and weird unicode characters — can you strip the HTML, normalize the unicode and whitespace, and remove any duplicate lines so I get clean plain text ready to use?"},{"title":"Preparing text for NLP pipeline","prompt":"Before I run sentiment analysis on this user review dump, I need it cleaned up — strip any HTML, normalize the whitespace, lowercase everything, and dedupe repeated lines. Here's the raw text."},{"title":"Deduplicating log or content exports","prompt":"I exported a bunch of content from our CMS and there are tons of repeated lines and inconsistent spacing throughout — can you deduplicate the lines and normalize the whitespace so the output is clean and tidy?"}],"resultDescription":"Returns the fully cleaned text string after applying the requested transformations (HTML stripping, unicode normalization, whitespace normalization, lowercasing, line deduplication), along with statistics such as the number of lines removed, characters stripped, or other processing metrics.","failureModes":["Input text exceeds 500KB limit — request rejected","Malformed JSON body — 400 error returned","Invalid options fields (e.g. non-boolean values) — validation error","Service unavailable or worker cold-start timeout — 5xx error","Empty text input — may return empty string with zero stats"],"whenToPreferThis":"Choose this endpoint when you need a fast, configurable, all-in-one text cleaning step — particularly after web scraping or when ingesting user-generated content that may contain HTML artifacts, inconsistent unicode, redundant lines, or irregular whitespace. Prefer it over building custom regex pipelines for common cleaning tasks, especially in agentic workflows where text needs to be clean before downstream NLP or storage steps.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T00:41:08.060Z","isFirstParty":false}