{"uid":"cap_r3SYByJCMag6kwEmrWedW","slug":"url-normalizer-openverbs-6cd755c1","name":"URL Normalizer (OpenVerbs)","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.","url":"https://url.openverbs.com/v1/normalize","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","required":["url"],"properties":{"url":{"type":"string","maxLength":8192,"minLength":1,"description":"The URL to normalize."},"sortQuery":{"type":"boolean","description":"Sort query parameters alphabetically. Default true."},"removeHash":{"type":"boolean","description":"Drop the #fragment. Default false."},"lowercaseHostname":{"type":"boolean","description":"Lowercase the hostname (always applied by WHATWG). Default true."},"removeTrailingSlash":{"type":"boolean","description":"Drop a trailing '/' from the path. Default false."}},"additionalProperties":false},"type":{"type":"string","const":"http"},"method":{"enum":["POST"],"type":"string"},"bodyType":{"enum":["json","form-data","text"],"type":"string"}},"additionalProperties":false}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.002","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.002/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.002","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.002","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_bLpaMHNpyxU4TSJCw_ORU","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.002","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Canonicalizes a URL by lowercasing the host, resolving dot-segments, dropping default ports, sorting query parameters, and optionally removing fragments or trailing slashes.","exampleAgentPrompt":"Normalize this URL for me — sort the query parameters alphabetically and strip the fragment: 'https://Example.COM/foo/../bar?z=1&a=2#section'","exampleUseCases":[{"title":"Deduplicating crawled web URLs","prompt":"I'm storing crawled URLs in a database and want to avoid duplicates caused by different capitalizations or query param ordering — can you normalize 'https://Example.COM/page?b=2&a=1#top' by lowercasing the host, sorting query params, and removing the fragment?"},{"title":"Canonical URL for cache key generation","prompt":"Before I cache this API response, I need a canonical form of the URL 'https://api.example.com/v1/../v1/search?z=last&a=first' — normalize it with query parameters sorted and trailing slash removed so I get a consistent cache key."},{"title":"Cleaning user-submitted links","prompt":"A user submitted the URL 'HTTPS://MySite.com/about/?ref=header#faq' — can you normalize it to a clean canonical form, stripping the fragment and trailing slash so I can store it consistently?"}],"resultDescription":"Returns the normalized URL string after applying WHATWG parsing (hostname lowercased, dot-segments resolved, default ports dropped) plus any requested transformations (sorted query params, removed fragment, removed trailing slash), along with a boolean indicating whether the URL actually changed from the input.","failureModes":["Invalid or non-absolute URL input returns an error","URL exceeding 8192 characters is rejected","Malformed JSON body returns a 400-level error","Payment not included or insufficient results in a 402 response"],"whenToPreferThis":"Choose this endpoint when you need reliable, standards-compliant URL canonicalization — especially when you want WHATWG-spec parsing (not just regex substitution) combined with query parameter sorting and optional fragment/trailing-slash removal. Prefer it over DIY normalization when consistency across environments matters, or when you need a trustworthy signal about whether a URL actually changed after normalization.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T12:34:35.658Z","isFirstParty":false}