{"uid":"cap_bpB8Rj4q0aBCUlnlh2WpY","slug":"url-percent-encoder-and-decoder-81c146ab","name":"URL Percent-Encoder and Decoder","description":"Percent-encode and decode a string for URLs — Genesis402 / UnyKorn Operator Network","url":"https://twin.unykorn.org/encode-url?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"params":{"type":"object","properties":{"text":{"type":"string","maxLength":49152}}}}},"responseSchema":{"type":"json","example":{"ok":true,"type":"encode-url","receipt":{"tx_hash":"0x<64hex>","amount_usd":0.001,"receipt_id":"g402-<16hex>"},"generated_at":"<iso8601>"}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.001","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.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_uvV8rEuq_BnGMSfL629v8","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.001","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Percent-encodes or decodes a string for safe use in URLs, converting special characters to and from their %XX representations.","exampleAgentPrompt":"Percent-encode this string for me so I can safely embed it in a URL: 'hello world & café = 100%'.","exampleUseCases":[{"title":"Encode query parameter with special characters","prompt":"I need to put the text 'price >= $50 & category=shoes' into a URL query string — can you percent-encode it so the browser doesn't break it?"},{"title":"Decode a percent-encoded URL fragment","prompt":"I've got this URL fragment that looks garbled with percent signs — can you decode '%E2%82%AC29%20sale%20%2650%25%20off' back into readable text?"},{"title":"Sanitize user input for URL path","prompt":"A user submitted the name 'Björk / The Artist' and I need to put it in a URL path segment — please percent-encode it so it's URL-safe."}],"resultDescription":"A JSON object with an 'ok' boolean, the transformation type ('encode-url'), the encoded or decoded result string, and a payment receipt containing the transaction hash, USD amount charged, and a unique receipt ID.","failureModes":["Text input exceeds 49,152 character limit — request rejected","Malformed or missing 'text' field in params — validation error","Payment failure via x402 protocol — 402 response, no result returned","Network timeout reaching twin.unykorn.org — connection error"],"whenToPreferThis":"Choose this endpoint when you need a pay-per-call, serverless percent-encoding or decoding operation with a blockchain payment receipt for auditability — particularly useful in agentic pipelines on the x402 network where on-chain receipts are required. For high-volume or free encoding needs, a local library function may be preferable; this endpoint is best when you need provable, receipted execution or are already operating within the UnyKorn/x402 ecosystem.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-01T18:55:42.647Z","isFirstParty":false,"canonicalSlug":"url-percent-encoder-and-decoder-81c146ab"}