{"openapi":"3.1.0","info":{"title":"URL Toolkit","version":"0.1.0","description":"WHATWG URL parsing and manipulation — parse into components, normalize/canonicalize, resolve references against a base, and parse/build query strings.","x-guidance":"WHATWG URL parsing and manipulation — parse into components, normalize/canonicalize, resolve references against a base, and parse/build query strings. Each operation is an HTTP POST to its /v1/<operation> path with a JSON request body (see each operation's requestBody schema) and returns a JSON response. Endpoints are paid per successful call via x402 or MPP (USDC on Base); an unpaid request returns 402 with payment metadata in the WWW-Authenticate header.","contact":{"email":"hello@openverbs.com"}},"x-discovery":{"ownershipProofs":["0xb1401a71756f51464a9962db12f1eb3e9522490cd20010b06d00cf7b7770acfd5f79721f9dfdf2643f8cecd29af3bde9ec133941a386042b32d9886053a70de61b","0xc1c1f11793e18a00fcb7072421f26e89fb75b6aa517fa84370564991f4b10efa024f6f57e4e67eefd20cf46cc01fc5a62d793fa8fbcda04f26c946a3433d73f91b","0x676b474af0ef9ed4809b5d12d2e789b36e52d56215b21f601d71f76620e36ec630347116a7b2b349a3c3681e5db0fbfa76c4169a676b6d6f27864d0e5017284a1c","0xc2ab96522515ed9e9bc4f1a241b774bd48df42e951ddbf7f6aa8fc76f5a96a20421703e1ec402ce7eb1e4eabea3b6e4e4129cf39d56ea91cf4fcf38561fc94fc1c"]},"servers":[{"url":"https://url.openverbs.com"}],"paths":{"/health":{"get":{"summary":"Health check","security":[],"responses":{"200":{"description":"Healthy","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"},"service":{"type":"string"},"version":{"type":"string"}}}}}}}}},"/v1/parse":{"post":{"summary":"Parse URL","description":"Parse an absolute URL into its WHATWG components: protocol/scheme, credentials, host/hostname/port, origin, pathname (plus path segments), search (plus a decoded query object) and hash. A string that is not a valid absolute URL is rejected as a clean 400. Paid endpoint (x402 + MPP). Price: $0.002000 USDC per successful payment.","tags":["url parser","parse url components","url component lookup","whatwg url parse","extract hostname path","decode url query"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","minLength":1,"maxLength":8192,"description":"The absolute URL to parse."}},"required":["url"],"additionalProperties":false},"example":{"url":"https://example.com/a?b=1#section"}}}},"responses":{"200":{"description":"`{ href, protocol, scheme, host, hostname, port, origin, pathname, segments, search, query, hash, … }`.","content":{"application/json":{"schema":{"type":"object","description":"`{ href, protocol, scheme, host, hostname, port, origin, pathname, segments, search, query, hash, … }`."}}}},"400":{"description":"Invalid request; no payment is attempted"},"402":{"description":"Payment required; x402/MPP metadata returned in headers"},"502":{"description":"Upstream provider error after payment verification"}},"x-payment-info":{"amount":"2000","currency":"0x20c000000000000000000000b9537d11c60e8b50","description":"Parse an absolute URL into its WHATWG components: protocol/scheme, credentials, host/hostname/port, origin, pathname (plus path segments), search (plus a decoded query object) and hash. A string that is not a valid absolute URL is rejected as a clean 400.","method":"tempo","preferredOffer":"mpp-tempo","price":{"mode":"fixed","currency":"USD","amount":"0.002000"},"protocols":[{"x402":{"scheme":"exact","network":"eip155:8453","currency":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","recipient":"0xb3f4de103F34b99f0Da19B4F16D6B53a14C2194A"}},{"mpp":{"method":"evm","intent":"charge","network":"8453","currency":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","recipient":"0xb3f4de103F34b99f0Da19B4F16D6B53a14C2194A"}},{"mpp":{"method":"tempo","intent":"charge","network":"4217","currency":"0x20c000000000000000000000b9537d11c60e8b50","recipient":"0xb3f4de103F34b99f0Da19B4F16D6B53a14C2194A"}}],"network":"4217","recipient":"0xb3f4de103F34b99f0Da19B4F16D6B53a14C2194A","offers":[{"amount":"2000","currency":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","description":"Parse an absolute URL into its WHATWG components: protocol/scheme, credentials, host/hostname/port, origin, pathname (plus path segments), search (plus a decoded query object) and hash. A string that is not a valid absolute URL is rejected as a clean 400.","intent":"charge","method":"evm","recipient":"0xb3f4de103F34b99f0Da19B4F16D6B53a14C2194A"},{"amount":"2000","currency":"0x20c000000000000000000000b9537d11c60e8b50","description":"Parse an absolute URL into its WHATWG components: protocol/scheme, credentials, host/hostname/port, origin, pathname (plus path segments), search (plus a decoded query object) and hash. A string that is not a valid absolute URL is rejected as a clean 400.","intent":"charge","method":"tempo","recipient":"0xb3f4de103F34b99f0Da19B4F16D6B53a14C2194A"}]}}},"/v1/normalize":{"post":{"summary":"Normalize URL","description":"Canonicalize a URL: WHATWG parsing already lowercases the host, resolves dot-segments and drops default ports; on top of that, query parameters are sorted by default and you can optionally drop the fragment or a trailing slash. Returns the normalized URL and whether it changed. Paid endpoint (x402 + MPP). Price: $0.002000 USDC per successful payment.","tags":["normalize url","canonicalize url","sort query parameters","remove url fragment","clean url api","lowercase hostname"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","minLength":1,"maxLength":8192,"description":"The URL to normalize."},"sortQuery":{"type":"boolean","description":"Sort query parameters alphabetically. Default true."},"removeHash":{"type":"boolean","description":"Drop the #fragment. Default false."},"removeTrailingSlash":{"type":"boolean","description":"Drop a trailing '/' from the path. Default false."},"lowercaseHostname":{"type":"boolean","description":"Lowercase the hostname (always applied by WHATWG). Default true."}},"required":["url"],"additionalProperties":false},"example":{"url":"https://Example.com/a/?b=2&a=1","sortQuery":true,"removeHash":false}}}},"responses":{"200":{"description":"`{ url, changed }`.","content":{"application/json":{"schema":{"type":"object","description":"`{ url, changed }`."}}}},"400":{"description":"Invalid request; no payment is attempted"},"402":{"description":"Payment required; x402/MPP metadata returned in headers"},"502":{"description":"Upstream provider error after payment verification"}},"x-payment-info":{"amount":"2000","currency":"0x20c000000000000000000000b9537d11c60e8b50","description":"Canonicalize a URL: WHATWG parsing already lowercases the host, resolves dot-segments and drops default ports; on top of that, query parameters are sorted by default and you can optionally drop the fragment or a trailing slash. Returns the normalized URL and whether it changed.","method":"tempo","preferredOffer":"mpp-tempo","price":{"mode":"fixed","currency":"USD","amount":"0.002000"},"protocols":[{"x402":{"scheme":"exact","network":"eip155:8453","currency":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","recipient":"0xb3f4de103F34b99f0Da19B4F16D6B53a14C2194A"}},{"mpp":{"method":"evm","intent":"charge","network":"8453","currency":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","recipient":"0xb3f4de103F34b99f0Da19B4F16D6B53a14C2194A"}},{"mpp":{"method":"tempo","intent":"charge","network":"4217","currency":"0x20c000000000000000000000b9537d11c60e8b50","recipient":"0xb3f4de103F34b99f0Da19B4F16D6B53a14C2194A"}}],"network":"4217","recipient":"0xb3f4de103F34b99f0Da19B4F16D6B53a14C2194A","offers":[{"amount":"2000","currency":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","description":"Canonicalize a URL: WHATWG parsing already lowercases the host, resolves dot-segments and drops default ports; on top of that, query parameters are sorted by default and you can optionally drop the fragment or a trailing slash. Returns the normalized URL and whether it changed.","intent":"charge","method":"evm","recipient":"0xb3f4de103F34b99f0Da19B4F16D6B53a14C2194A"},{"amount":"2000","currency":"0x20c000000000000000000000b9537d11c60e8b50","description":"Canonicalize a URL: WHATWG parsing already lowercases the host, resolves dot-segments and drops default ports; on top of that, query parameters are sorted by default and you can optionally drop the fragment or a trailing slash. Returns the normalized URL and whether it changed.","intent":"charge","method":"tempo","recipient":"0xb3f4de103F34b99f0Da19B4F16D6B53a14C2194A"}]}}},"/v1/resolve":{"post":{"summary":"Resolve reference","description":"Resolve a relative or absolute reference against a base URL, following RFC 3986 reference resolution (e.g. base 'https://a.com/x/y' + ref '../z' → 'https://a.com/z'). The base must itself be a valid absolute URL, else a clean 400. Paid endpoint (x402 + MPP). Price: $0.002000 USDC per successful payment.","tags":["resolve relative url","url reference resolution","base url resolver","relative link to absolute","rfc 3986 resolve","join base and ref"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"base":{"type":"string","minLength":1,"maxLength":8192,"description":"The absolute base URL."},"ref":{"type":"string","maxLength":8192,"description":"The reference to resolve against the base."}},"required":["base","ref"],"additionalProperties":false},"example":{"base":"https://example.com/docs/page.html","ref":"../img/logo.png"}}}},"responses":{"200":{"description":"`{ url }`.","content":{"application/json":{"schema":{"type":"object","description":"`{ url }`."}}}},"400":{"description":"Invalid request; no payment is attempted"},"402":{"description":"Payment required; x402/MPP metadata returned in headers"},"502":{"description":"Upstream provider error after payment verification"}},"x-payment-info":{"amount":"2000","currency":"0x20c000000000000000000000b9537d11c60e8b50","description":"Resolve a relative or absolute reference against a base URL, following RFC 3986 reference resolution (e.g. base 'https://a.com/x/y' + ref '../z' → 'https://a.com/z'). The base must itself be a valid absolute URL, else a clean 400.","method":"tempo","preferredOffer":"mpp-tempo","price":{"mode":"fixed","currency":"USD","amount":"0.002000"},"protocols":[{"x402":{"scheme":"exact","network":"eip155:8453","currency":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","recipient":"0xb3f4de103F34b99f0Da19B4F16D6B53a14C2194A"}},{"mpp":{"method":"evm","intent":"charge","network":"8453","currency":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","recipient":"0xb3f4de103F34b99f0Da19B4F16D6B53a14C2194A"}},{"mpp":{"method":"tempo","intent":"charge","network":"4217","currency":"0x20c000000000000000000000b9537d11c60e8b50","recipient":"0xb3f4de103F34b99f0Da19B4F16D6B53a14C2194A"}}],"network":"4217","recipient":"0xb3f4de103F34b99f0Da19B4F16D6B53a14C2194A","offers":[{"amount":"2000","currency":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","description":"Resolve a relative or absolute reference against a base URL, following RFC 3986 reference resolution (e.g. base 'https://a.com/x/y' + ref '../z' → 'https://a.com/z'). The base must itself be a valid absolute URL, else a clean 400.","intent":"charge","method":"evm","recipient":"0xb3f4de103F34b99f0Da19B4F16D6B53a14C2194A"},{"amount":"2000","currency":"0x20c000000000000000000000b9537d11c60e8b50","description":"Resolve a relative or absolute reference against a base URL, following RFC 3986 reference resolution (e.g. base 'https://a.com/x/y' + ref '../z' → 'https://a.com/z'). The base must itself be a valid absolute URL, else a clean 400.","intent":"charge","method":"tempo","recipient":"0xb3f4de103F34b99f0Da19B4F16D6B53a14C2194A"}]}}},"/v1/query":{"post":{"summary":"Query string parse / build","description":"Two directions over query strings. action='parse' decodes a query string (with or without a leading '?') into an object, collapsing repeated keys into arrays. action='build' encodes a params object into a query string, expanding array values into repeated keys; set sort=true to order keys alphabetically. Paid endpoint (x402 + MPP). Price: $0.002000 USDC per successful payment.","tags":["query string parser","build query string","parse url params","encode query parameters","decode query string","query params api"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"action":{"type":"string","enum":["parse","build"],"description":"Direction: 'parse' string→object, 'build' object→string."},"query":{"type":"string","maxLength":8192,"description":"The query string to parse (required when action='parse')."},"params":{"type":"object","description":"The parameters to encode (required when action='build'). Values may be scalars or arrays.","additionalProperties":true},"sort":{"type":"boolean","description":"Sort keys alphabetically when building. Default false."}},"required":["action"],"additionalProperties":false}}}},"responses":{"200":{"description":"`{ query }` (parse) or `{ string }` (build).","content":{"application/json":{"schema":{"type":"object","description":"`{ query }` (parse) or `{ string }` (build)."}}}},"400":{"description":"Invalid request; no payment is attempted"},"402":{"description":"Payment required; x402/MPP metadata returned in headers"},"502":{"description":"Upstream provider error after payment verification"}},"x-payment-info":{"amount":"2000","currency":"0x20c000000000000000000000b9537d11c60e8b50","description":"Two directions over query strings. action='parse' decodes a query string (with or without a leading '?') into an object, collapsing repeated keys into arrays. action='build' encodes a params object into a query string, expanding array values into repeated keys; set sort=true to order keys alphabetically.","method":"tempo","preferredOffer":"mpp-tempo","price":{"mode":"fixed","currency":"USD","amount":"0.002000"},"protocols":[{"x402":{"scheme":"exact","network":"eip155:8453","currency":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","recipient":"0xb3f4de103F34b99f0Da19B4F16D6B53a14C2194A"}},{"mpp":{"method":"evm","intent":"charge","network":"8453","currency":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","recipient":"0xb3f4de103F34b99f0Da19B4F16D6B53a14C2194A"}},{"mpp":{"method":"tempo","intent":"charge","network":"4217","currency":"0x20c000000000000000000000b9537d11c60e8b50","recipient":"0xb3f4de103F34b99f0Da19B4F16D6B53a14C2194A"}}],"network":"4217","recipient":"0xb3f4de103F34b99f0Da19B4F16D6B53a14C2194A","offers":[{"amount":"2000","currency":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","description":"Two directions over query strings. action='parse' decodes a query string (with or without a leading '?') into an object, collapsing repeated keys into arrays. action='build' encodes a params object into a query string, expanding array values into repeated keys; set sort=true to order keys alphabetically.","intent":"charge","method":"evm","recipient":"0xb3f4de103F34b99f0Da19B4F16D6B53a14C2194A"},{"amount":"2000","currency":"0x20c000000000000000000000b9537d11c60e8b50","description":"Two directions over query strings. action='parse' decodes a query string (with or without a leading '?') into an object, collapsing repeated keys into arrays. action='build' encodes a params object into a query string, expanding array values into repeated keys; set sort=true to order keys alphabetically.","intent":"charge","method":"tempo","recipient":"0xb3f4de103F34b99f0Da19B4F16D6B53a14C2194A"}]}}}},"x-service-info":{"categories":["web"],"docs":{"homepage":"https://url.openverbs.com","apiReference":"https://url.openverbs.com/openapi.json"}}}