{"openapi":"3.1.0","info":{"title":"URL Normalize and Guard API","version":"1.0.0","description":"Parse, normalize, compare, and enforce deterministic policy over bounded absolute URLs. The API never resolves DNS, fetches a URL, follows redirects, or claims malware or reputation detection. Runtime DNS, resolved-IP, redirect, and egress enforcement remains mandatory before network access."},"paths":{"/marketplace/rapid/url/v1/parse":{"post":{"tags":["URL Parse"],"summary":"Parse URL components","description":"Parse a bounded absolute URL without resolving DNS, fetching content, or returning userinfo values.","operationId":"parseUrl","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/URLParseRequest"},"examples":{"example":{"summary":"Parse URL components","value":{"url":"https://api.example.com/v1/items?limit=25&cursor=abc#results","include_query_pairs":true}}}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/URLParseResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/marketplace/rapid/url/v1/normalize":{"post":{"tags":["URL Normalize"],"summary":"Normalize a web URL","description":"Normalize scheme, IDNA host, default port, dot segments, percent encoding, query policy, and fragment policy explicitly.","operationId":"normalizeUrl","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/URLNormalizeRequest"},"examples":{"example":{"summary":"Normalize a web URL","value":{"url":"HTTPS://Example.COM:443/a/../items?b=2&a=1#top","policy":{"sort_query_pairs":true,"drop_fragment":true}}}}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/URLNormalizeResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/marketplace/rapid/url/v1/compare":{"post":{"tags":["URL Compare"],"summary":"Compare two URLs","description":"Compare exact input, origin, and normalized resource identity under explicit fragment and query-order rules.","operationId":"compareUrls","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/URLCompareRequest"},"examples":{"example":{"summary":"Compare two URLs","value":{"left_url":"https://example.com:443/a/../items?b=2&a=1#one","right_url":"https://EXAMPLE.com/items?a=1&b=2#two","ignore_fragment":true,"query_order_matters":false}}}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/URLCompareResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/marketplace/rapid/url/v1/policy-check":{"post":{"tags":["URL Policy Check"],"summary":"Check URL policy","description":"Enforce scheme, host, port, userinfo, and IP-literal rules before mandatory runtime DNS, redirect, and egress checks.","operationId":"checkUrlPolicy","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/URLPolicyRequest"},"examples":{"example":{"summary":"Check URL policy","value":{"url":"https://api.example.com/v1/items","allowed_schemes":["https"],"allowed_hosts":["api.example.com"],"allowed_ports":[443],"require_host_allowlist":true}}}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/URLPolicyResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"URLCompareRequest":{"properties":{"left_url":{"type":"string","maxLength":16384,"minLength":1,"title":"Left Url"},"right_url":{"type":"string","maxLength":16384,"minLength":1,"title":"Right Url"},"ignore_fragment":{"type":"boolean","title":"Ignore Fragment","default":true},"query_order_matters":{"type":"boolean","title":"Query Order Matters","default":true},"remove_query_parameters":{"items":{"type":"string"},"type":"array","maxItems":100,"title":"Remove Query Parameters"}},"additionalProperties":false,"type":"object","required":["left_url","right_url"],"title":"URLCompareRequest"},"URLCompareResponse":{"properties":{"status":{"type":"string","const":"COMPLETED","title":"Status","default":"COMPLETED"},"decision":{"type":"string","enum":["CLEAR","REVIEW_REQUIRED","BLOCKED"],"title":"Decision"},"exact_match":{"type":"boolean","title":"Exact Match"},"same_origin":{"type":"boolean","title":"Same Origin"},"normalized_resource_match":{"type":"boolean","title":"Normalized Resource Match"},"left_normalized":{"type":"string","title":"Left Normalized"},"right_normalized":{"type":"string","title":"Right Normalized"},"differences":{"items":{"type":"string"},"type":"array","title":"Differences"},"issues":{"items":{"$ref":"#/components/schemas/URLIssue"},"type":"array","title":"Issues"},"next_action":{"type":"string","title":"Next Action"}},"additionalProperties":false,"type":"object","required":["decision","exact_match","same_origin","normalized_resource_match","left_normalized","right_normalized","differences","issues","next_action"],"title":"URLCompareResponse"},"URLComponents":{"properties":{"scheme":{"type":"string","title":"Scheme"},"hostname_ascii":{"type":"string","title":"Hostname Ascii"},"hostname_unicode":{"type":"string","title":"Hostname Unicode"},"port":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Port"},"effective_port":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Effective Port"},"path":{"type":"string","title":"Path"},"query":{"type":"string","title":"Query"},"fragment":{"type":"string","title":"Fragment"},"origin":{"type":"string","title":"Origin"},"has_userinfo":{"type":"boolean","title":"Has Userinfo"},"is_ip_literal":{"type":"boolean","title":"Is Ip Literal"},"ip_classification":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ip Classification"},"query_pair_count":{"type":"integer","title":"Query Pair Count"}},"additionalProperties":false,"type":"object","required":["scheme","hostname_ascii","hostname_unicode","port","effective_port","path","query","fragment","origin","has_userinfo","is_ip_literal","ip_classification","query_pair_count"],"title":"URLComponents"},"URLIssue":{"properties":{"code":{"type":"string","title":"Code"},"severity":{"type":"string","enum":["INFO","LOW","MEDIUM","HIGH"],"title":"Severity"},"message":{"type":"string","title":"Message"},"next_action":{"type":"string","title":"Next Action"},"evidence":{"additionalProperties":true,"type":"object","title":"Evidence"}},"additionalProperties":false,"type":"object","required":["code","severity","message","next_action"],"title":"URLIssue"},"URLNormalizePolicy":{"properties":{"remove_default_port":{"type":"boolean","title":"Remove Default Port","default":true},"normalize_empty_path":{"type":"boolean","title":"Normalize Empty Path","default":true},"remove_dot_segments":{"type":"boolean","title":"Remove Dot Segments","default":true},"normalize_percent_encoding":{"type":"boolean","title":"Normalize Percent Encoding","default":true},"sort_query_pairs":{"type":"boolean","title":"Sort Query Pairs","default":false},"drop_fragment":{"type":"boolean","title":"Drop Fragment","default":false},"remove_query_parameters":{"items":{"type":"string"},"type":"array","maxItems":100,"title":"Remove Query Parameters"}},"additionalProperties":false,"type":"object","title":"URLNormalizePolicy"},"URLNormalizeRequest":{"properties":{"url":{"type":"string","maxLength":16384,"minLength":1,"title":"Url"},"policy":{"$ref":"#/components/schemas/URLNormalizePolicy"}},"additionalProperties":false,"type":"object","required":["url"],"title":"URLNormalizeRequest"},"URLNormalizeResponse":{"properties":{"status":{"type":"string","const":"COMPLETED","title":"Status","default":"COMPLETED"},"decision":{"type":"string","enum":["CLEAR","REVIEW_REQUIRED","BLOCKED"],"title":"Decision"},"normalized_url":{"type":"string","title":"Normalized Url"},"changed":{"type":"boolean","title":"Changed"},"transformations":{"items":{"type":"string"},"type":"array","title":"Transformations"},"components":{"$ref":"#/components/schemas/URLComponents"},"input_sha256":{"type":"string","title":"Input Sha256"},"normalized_sha256":{"type":"string","title":"Normalized Sha256"},"issues":{"items":{"$ref":"#/components/schemas/URLIssue"},"type":"array","title":"Issues"},"next_action":{"type":"string","title":"Next Action"}},"additionalProperties":false,"type":"object","required":["decision","normalized_url","changed","transformations","components","input_sha256","normalized_sha256","issues","next_action"],"title":"URLNormalizeResponse"},"URLParseRequest":{"properties":{"url":{"type":"string","maxLength":16384,"minLength":1,"title":"Url"},"include_query_pairs":{"type":"boolean","title":"Include Query Pairs","default":false}},"additionalProperties":false,"type":"object","required":["url"],"title":"URLParseRequest"},"URLParseResponse":{"properties":{"status":{"type":"string","const":"COMPLETED","title":"Status","default":"COMPLETED"},"decision":{"type":"string","enum":["CLEAR","REVIEW_REQUIRED","BLOCKED"],"title":"Decision"},"components":{"$ref":"#/components/schemas/URLComponents"},"query_pairs":{"items":{"items":{"type":"string"},"type":"array"},"type":"array","title":"Query Pairs"},"input_sha256":{"type":"string","title":"Input Sha256"},"issues":{"items":{"$ref":"#/components/schemas/URLIssue"},"type":"array","title":"Issues"},"next_action":{"type":"string","title":"Next Action"}},"additionalProperties":false,"type":"object","required":["decision","components","query_pairs","input_sha256","issues","next_action"],"title":"URLParseResponse"},"URLPolicyRequest":{"properties":{"url":{"type":"string","maxLength":16384,"minLength":1,"title":"Url"},"allowed_schemes":{"items":{"type":"string","enum":["http","https"]},"type":"array","maxItems":2,"minItems":1,"title":"Allowed Schemes"},"allowed_hosts":{"items":{"type":"string"},"type":"array","maxItems":100,"title":"Allowed Hosts"},"denied_hosts":{"items":{"type":"string"},"type":"array","maxItems":100,"title":"Denied Hosts"},"allow_subdomains":{"type":"boolean","title":"Allow Subdomains","default":false},"allowed_ports":{"items":{"type":"integer"},"type":"array","maxItems":32,"title":"Allowed Ports"},"allow_userinfo":{"type":"boolean","title":"Allow Userinfo","default":false},"allow_ip_literals":{"type":"boolean","title":"Allow Ip Literals","default":false},"allow_non_public_ip_literals":{"type":"boolean","title":"Allow Non Public Ip Literals","default":false},"require_host_allowlist":{"type":"boolean","title":"Require Host Allowlist","default":true}},"additionalProperties":false,"type":"object","required":["url"],"title":"URLPolicyRequest"},"URLPolicyResponse":{"properties":{"status":{"type":"string","const":"COMPLETED","title":"Status","default":"COMPLETED"},"decision":{"type":"string","enum":["CLEAR","REVIEW_REQUIRED","BLOCKED"],"title":"Decision"},"permitted":{"type":"boolean","title":"Permitted"},"requires_runtime_checks":{"type":"boolean","title":"Requires Runtime Checks"},"matched_allowlist_rule":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Matched Allowlist Rule"},"components":{"$ref":"#/components/schemas/URLComponents"},"issues":{"items":{"$ref":"#/components/schemas/URLIssue"},"type":"array","title":"Issues"},"input_sha256":{"type":"string","title":"Input Sha256"},"next_action":{"type":"string","title":"Next Action"}},"additionalProperties":false,"type":"object","required":["decision","permitted","requires_runtime_checks","matched_allowlist_rule","components","issues","input_sha256","next_action"],"title":"URLPolicyResponse"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}},"tags":[{"name":"URL Parse","description":"A bounded, stateless URL utility for agent and integration preflight checks."},{"name":"URL Normalize","description":"A bounded, stateless URL utility for agent and integration preflight checks."},{"name":"URL Compare","description":"A bounded, stateless URL utility for agent and integration preflight checks."},{"name":"URL Policy Check","description":"A bounded, stateless URL utility for agent and integration preflight checks."}],"servers":[{"url":"https://api-production-9502.up.railway.app"}]}