{"uid":"cap_R1tBxFdrK2-PGzuGUdf0O","slug":"url-normalize-c6f52977","name":"URL Normalize","description":"Free need-to-tool routing plus pay-per-call npm docs and TypeScript API signatures, npm breaking-change diffs, JavaScript-rendered browser snapshots and deterministic coding-agent checks via AgentCash/x402.","url":"https://x402-canary.nicolas-x402-16f380a7.workers.dev/v1/url/normalize","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"url":{"type":"string"}}},"responseSchema":{"type":"json","example":{"data":{"url":"https://example.com/","hostname":"example.com"},"meta":{"engine":"url-normalize"}}},"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_5K63a3qqkUhnhFmWs_lAg","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":"Normalizes and parses a raw URL string into a canonical, cleaned URL and its component parts","exampleAgentPrompt":"Can you normalize this URL for me — 'https://Example.COM/foo/../bar?utm_source=x&utm_source=y' — and tell me its canonical form and hostname?","exampleUseCases":[{"title":"Deduplicating scraped URLs","prompt":"I've got a list of URLs from a scraper and many of them look like duplicates with different casing or trailing slashes — can you normalize 'https://Example.COM/page/' so I can compare them consistently?"},{"title":"Extracting hostname for routing","prompt":"Before I route this webhook request, I need the hostname from 'https://api.myservice.io/v2/events?token=abc123' — can you normalize it and pull out the hostname?"},{"title":"Sanitizing user-submitted links","prompt":"A user just submitted 'HTTP://WWW.Example.com/some/../path' as their website URL — can you normalize it into a clean canonical URL before I save it to the database?"}],"resultDescription":"Returns a JSON object with a `data` field containing the normalized `url` string and extracted `hostname`, plus a `meta` field indicating the engine used (`url-normalize`). The normalized URL is in canonical form with resolved paths, normalized casing, and proper formatting.","failureModes":["Invalid or malformed input URL may result in an error or unexpected normalization output","Empty or missing `url` field in the request body returns a validation error","Non-URL strings passed as the URL field may cause parsing failures","Network timeout if the worker is cold-starting","Payment failure via x402 protocol blocks the call"],"whenToPreferThis":"Choose this endpoint when you need deterministic, canonical URL normalization as part of a coding agent or data pipeline workflow, especially when already using the x402-canary Coding Agent Context APIs suite. It is particularly suited for agents that need to deduplicate URLs, extract hostnames programmatically, or sanitize user-submitted links before storage or comparison. Prefer it over rolling your own normalization when you want a consistent, pay-per-call microservice with a stable response schema.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-15T06:32:50.165Z","isFirstParty":false}