{"uid":"cap_gviE2O033m3RWGsY0YnBX","slug":"url-encode-decode-64ebedce","name":"URL Encode/Decode","description":"URL encode or decode a string (percent-encoding) for query, path or fragment.","url":"https://conclavex402.pythonanywhere.com/u/urlcode?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"},"type":{"type":"string","const":"http"},"method":{"enum":["POST","PUT","PATCH"],"type":"string"},"headers":{"type":"object","additionalProperties":{"type":"string"}},"bodyType":{"enum":["json","form-data","text"],"type":"string"},"pathParams":{"type":"object","additionalProperties":{"type":"string"}},"queryParams":{"type":"object","additionalProperties":{"type":"string"}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object"}}}}},"responseSchema":{"type":"json","example":{"encoded":"a+b"}},"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_UjuX8bo5hPJcagKHh_vXe","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":"Percent-encodes or percent-decodes a string for safe use in URL query strings, paths, or fragments.","exampleAgentPrompt":"URL-encode this string for me so I can safely drop it into a query parameter: 'hello world & foo=bar'","exampleUseCases":[{"title":"Sanitizing search query for URL","prompt":"I need to URL-encode the search term 'coffee & tea: the best?!' so I can append it as a query parameter in a GET request without breaking the URL."},{"title":"Decoding a percent-encoded API field","prompt":"I got this value back from an API and it looks percent-encoded: 'caf%C3%A9%20menu%20%2F%20prices' — can you decode it back to plain text for me?"},{"title":"Encoding a file path for a URL","prompt":"I have a file path 'reports/Q1 2024/summary & notes.pdf' that I need to embed in a URL path segment — please percent-encode it so it's safe to use."}],"resultDescription":"A JSON object containing the encoded or decoded string result, e.g. {\"encoded\": \"hello+world\"} or {\"decoded\": \"hello world\"}, ready to be dropped into a URL or displayed as plain text.","failureModes":["Missing or malformed 'input' body causes a 400 or validation error","Passing an already-decoded string to decode mode may return it unchanged or error if invalid percent-sequences are present","Network or server unavailability returns a non-200 response","Incorrect bodyType (e.g. sending form-data when json is expected) causes parsing failure"],"whenToPreferThis":"Choose this endpoint when you need a quick, pay-per-call URL percent-encoding or decoding transformation without setting up a local library or utility function, especially inside an automated agent workflow that already uses x402 micropayments for other data utilities on the same platform.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-18T06:42:00.791Z","isFirstParty":false,"canonicalSlug":"url-encode-decode-64ebedce"}