{"uid":"cap_bn49EHrBRF2OrJhXRF024","slug":"duo-data-utilities-url-parser-registrable-domain-extractor-8c90b1a5","name":"Duo Data Utilities – URL Parser & Registrable Domain Extractor","description":"Parse and canonicalise a URL, and extract its registrable domain using the Public Suffix List — the part an agent needs to decide whether two URLs belong to the same owner. Returns scheme, host, port, path, decoded query parameters and fragment, the public suffix, the registrable domain (eTLD+1), the subdomain, whether the suffix is an ICANN or a private entry, plus a canonical form with default port, dot-segments and percent-encoding normalised. unicode_host uses WHATWG/UTS 46 (non-strict).","url":"https://api.duoleads.com/v1/code/url?utm_source=zero.xyz","method":"GET","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method"],"properties":{"type":{"type":"string","const":"http"},"method":{"enum":["GET"],"type":"string"},"queryParams":{"type":"object","required":["url"],"properties":{"url":{"type":"string","maxLength":2048,"description":"Absolute URL, or a bare hostname (https:// assumed)."},"base":{"type":"string","maxLength":2048,"description":"Base URL to resolve url against as a relative reference."}}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object","required":["ok","route","version","data","meta"],"properties":{"ok":{"const":true},"data":{"type":"object","required":["canonical","scheme","username","host","port","path","fragment","query","public_suffix","registrable_domain","subdomain","suffix_source","host_type","unicode_host"],"properties":{"host":{"type":["string","null"]},"path":{"type":"string"},"port":{"type":["string","null"]},"query":{"type":"array","items":{"type":"object","required":["key","value"],"properties":{"key":{"type":"string"},"value":{"type":"string"}}}},"scheme":{"type":"string"},"fragment":{"type":["string","null"]},"username":{"type":["string","null"]},"canonical":{"type":"string"},"host_type":{"type":["string","null"]},"subdomain":{"type":["string","null"]},"unicode_host":{"type":["string","null"]},"public_suffix":{"type":["string","null"]},"suffix_source":{"type":"string"},"registrable_domain":{"type":["string","null"]}}},"meta":{"type":"object","required":["request_id","computed_at","price_usd","deterministic","disclaimer"],"properties":{"sources":{"type":"array","items":{"type":"object","required":["id","version","published"]}},"price_usd":{"type":"string"},"disclaimer":{"type":"string"},"request_id":{"type":"string"},"computed_at":{"type":"string","description":"RFC 3339 UTC with milliseconds"},"deterministic":{"type":"boolean"}}},"route":{"const":"/v1/code/url"},"version":{"type":"string"}}}}}}},"responseSchema":{"type":"json","example":{"ok":true,"data":{"host":"a.b.example.co.uk","path":"/y","port":null,"query":[{"key":"q","value":"1"},{"key":"q","value":"2"}],"scheme":"https","fragment":"f","username":null,"canonical":"https://a.b.example.co.uk/y?q=1&q=2#f","host_type":"domain","subdomain":"a.b","unicode_host":null,"public_suffix":"co.uk","suffix_source":"icann","registrable_domain":"example.co.uk"},"meta":{"sources":[{"id":"public-suffix-list","licence":"MPL-2.0","version":"a179a48c465e818cfd8d626691cb317985da87fb","published":"2026-09-24"}],"price_usd":"0.05","disclaimer":"Factual output of a deterministic computation over public data. Provided as is, with no warranty of accuracy, completeness or availability. Not investment, financial, legal, tax, medical or any other professional advice, and not a recommendation. Verify before relying on it. Terms: https://api.duoleads.com/terms","request_id":"01K6B7Q4ZC8H3F2M9WXR5TYN0D","computed_at":"2026-09-28T12:00:00.000Z","deterministic":true},"route":"/v1/code/url","version":"1.0.0"}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.05","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.05/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.05","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.05","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_x061MX44EfdEkIpu2g0A4","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.05","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Parses and canonicalises a URL, extracting scheme, host, port, path, query parameters, fragment, public suffix, registrable domain (eTLD+1), and subdomain using the Public Suffix List.","exampleAgentPrompt":"Can you parse the URL 'https://a.b.example.co.uk/y?q=1&q=2#f' and tell me its registrable domain, subdomain, public suffix, and canonical form?","exampleUseCases":[{"title":"Same-owner URL deduplication check","prompt":"I have two URLs — 'https://blog.example.co.uk/post/1' and 'https://shop.example.co.uk/cart' — can you check whether they share the same registrable domain so I know they belong to the same owner?"},{"title":"Canonical URL normalisation pipeline","prompt":"Normalise this URL for me so that default ports are removed, dot-segments are resolved, and percent-encoding is consistent: 'HTTP://Example.COM:80/a/../b?foo=bar%20baz'"},{"title":"Relative URL resolution for a scraper","prompt":"I have a base URL of 'https://www.example.com/articles/' and a relative link '../images/photo.jpg' — can you resolve them into a full absolute URL and show me the parsed components?"}],"resultDescription":"Returns a JSON object with: scheme, host, port (null if default), path, decoded query parameter array (key/value pairs supporting repeated keys), fragment, username, host_type, unicode_host, public_suffix, suffix_source (icann or private), registrable_domain (eTLD+1), subdomain, and a canonical URL string with default ports stripped, dot-segments resolved, and percent-encoding normalised. Also includes metadata: PSL version/commit, price, request ID, and computed_at timestamp.","failureModes":["Missing or empty 'url' query parameter returns a validation error","Malformed URL that cannot be parsed returns an error response","Relative URL provided without a 'base' parameter may fail to resolve","Unknown or unlisted TLD may result in null public_suffix/registrable_domain","Payment failure (x402) blocks the request if USDC balance is insufficient","URLs exceeding 2048 characters are rejected by the schema"],"whenToPreferThis":"Choose this endpoint when you need accurate eTLD+1 extraction using the canonical Public Suffix List (including private suffixes like github.io), strict WHATWG-compliant URL parsing, or canonical URL normalisation. Prefer it over naive string splitting when dealing with multi-label TLDs (co.uk, com.au) or private registry suffixes where simple last-two-label heuristics fail.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-02T04:54:49.198Z","isFirstParty":false,"canonicalSlug":"duo-data-utilities-url-parser-registrable-domain-extractor-8c90b1a5"}