{"uid":"cap_OP98IpA53IE5FNIZQ5ofH","slug":"saylor-innovations-html-escape-unescape-a8fad374","name":"Saylor Innovations HTML Escape/Unescape","description":"HTML escape and unescape - convert special characters to HTML entities and back","url":"https://saylorinnovations.com/api/encode/html?utm_source=zero.xyz","method":"GET","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method"],"properties":{"type":{"type":"string","const":"http"},"method":{"enum":["GET"],"type":"string"},"queryParams":{"type":"object","required":["text"],"properties":{"op":{"type":"string","description":"escape (default) or unescape"},"text":{"type":"string","description":"Text to escape or unescape"}}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string","const":"json"},"example":{"type":"object","required":["op","result"],"properties":{"op":{"type":"string","description":"Operation performed"},"result":{"type":"string","description":"Result of the operation"},"checked_at":{"type":["string","null"],"description":"Time the check was run (UTC)"}}}}}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.01","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.01/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_y6W_ffb-YQiUogaJB8rAH","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.01","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Converts text to HTML entities (escaping) or converts HTML entities back to plain text (unescaping)","exampleAgentPrompt":"Can you HTML-escape this string for me so I can safely put it in a web page: '<script>alert(\"hello & goodbye\")</script>'?","exampleUseCases":[{"title":"Sanitize user input for HTML template","prompt":"I need to escape this user-submitted text before injecting it into my HTML template — can you convert all the special characters like <, >, and & to their HTML entity equivalents? The text is: 'Tom & Jerry said <hello> to each other.'"},{"title":"Decode HTML entities from scraped content","prompt":"I scraped some web content and it's full of HTML entities like &amp;, &lt;, and &quot; — can you unescape it back to plain readable text? Here's the string: 'The price is &lt;strong&gt;$10 &amp; under&lt;/strong&gt;'"},{"title":"Prepare code snippet for web display","prompt":"I want to display this Python code snippet on a webpage without it being interpreted as HTML — please escape it for me: 'if x < 10 and y > 0: print(\"done\")'"}],"resultDescription":"A JSON object containing the operation performed ('escape' or 'unescape') and the resulting converted string, plus an optional timestamp of when the operation ran.","failureModes":["Missing required 'text' query parameter returns an error","Invalid 'op' value (not 'escape' or 'unescape') may default to escape or return an error","Empty string input may return an empty result","Very long strings may hit request size limits"],"whenToPreferThis":"Use this endpoint when you need a simple, reliable, stateless HTML escape or unescape operation via HTTP without setting up a local library. Ideal for agents or pipelines that need to sanitize text for HTML embedding or decode scraped HTML entities on the fly with a pay-per-call model.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-21T18:55:36.698Z","isFirstParty":false,"canonicalSlug":"saylor-innovations-html-escape-unescape-a8fad374"}