{"id":"idna-label-validate","version":"1.0.0","description":"Validate one already-mapped IDNA2008 label for registration or lookup.","supported_operations":["validate idna2008 label","check unicode label for idna registration","lookup profile a-label round trip","is this already mapped domain label valid","idna2008 ulabel permission check","report why an idna label is rejected","בדיקת תווית אינטרנט לפי תקן"],"unsupported_operations":["map or normalize a label with UTS 46","query DNS for this name","decide whether the label is a homograph or phishing attempt"],"semantics":["The label is already mapped. There is no UTS #46 mapping. ASCII case is folded for lookup. Registration requires a supplied A-label to be entirely lowercase; its first uppercase code point is alabel_not_lowercase.","profile registration validates the label as a U-label, or as an entirely lowercase A-label round trip when the label is all ASCII and has an ASCII-case-insensitive xn-- prefix. profile lookup bypasses validation only for an all-ASCII NR-LDH label; reserved LDH labels with hyphens in positions 3 and 4 are validated.","An A-label body is punycode-decoded. An empty decode is empty_label, a decode failure is punycode_decode, and an all-ASCII decode is ace_all_ascii. Otherwise the decoded U-label is validated and re-encoded; a mismatch with the canonical lowercase input is punycode_roundtrip. Lookup may lowercase an A-label before this comparison.","U-label order: NFC (not_nfc), then UNASSIGNED, DISALLOWED, CONTEXTJ, and CONTEXTO, then a leading combining mark, then a hyphen at the start, the end, or both the third and fourth positions, then RFC 5893 when Bidi_Class R, AL, or AN occurs (bidi_rule), then wire length 1..63 (dns_label_length). A non-ASCII wire form is xn-- plus Punycode.","reason_index is the code-point index of the first failure and cp is that code point. alabel is null unless the label is valid. data_version names the pinned Unicode 15.1 property table.","Results are a deterministic rule check. They are not a homograph, phishing, DNS, or authenticity verdict. No DNS query is performed."],"limits":{"max_label_bytes":252,"max_output_bytes":8192},"pricing":{"status":"unpriced","charge_usd":null},"input_schema":{"type":"object","additionalProperties":false,"required":["label","profile"],"properties":{"label":{"type":"string","minLength":1,"maxLength":252},"profile":{"type":"string","enum":["registration","lookup"]}}},"output_schema":{"type":"object","additionalProperties":false,"required":["valid","reason","reason_index","cp","form","ulabel","alabel","direction","bidi_condition","data_version"],"properties":{"valid":{"type":"boolean"},"reason":{"type":["string","null"],"enum":[null,"disallowed","unassigned","contextj","contexto","not_nfc","leading_combining_mark","hyphen_position","bidi_rule","punycode_decode","punycode_roundtrip","alabel_not_lowercase","punycode_encode","ace_all_ascii","dns_label_length","not_ldh","empty_label"]},"reason_index":{"type":["integer","null"],"minimum":0,"maximum":251},"cp":{"type":["integer","null"],"minimum":0,"maximum":1114111},"form":{"type":["string","null"],"enum":["u-label","a-label","nr-ldh",null]},"ulabel":{"type":["string","null"],"maxLength":252},"alabel":{"type":["string","null"],"minLength":1,"maxLength":63},"direction":{"type":"string","enum":["ltr","rtl","none"]},"bidi_condition":{"type":["integer","null"],"minimum":1,"maximum":6},"data_version":{"type":"string","const":"idna2008-rfc5892-unicode-15.1.0"}}},"examples":[{"input":{"label":"a","profile":"registration"},"output":{"valid":true,"reason":null,"reason_index":null,"cp":null,"form":"u-label","ulabel":"a","alabel":"a","direction":"none","bidi_condition":null,"data_version":"idna2008-rfc5892-unicode-15.1.0"}},{"input":{"label":"A","profile":"registration"},"output":{"valid":false,"reason":"disallowed","reason_index":0,"cp":65,"form":"u-label","ulabel":"A","alabel":null,"direction":"none","bidi_condition":null,"data_version":"idna2008-rfc5892-unicode-15.1.0"}},{"input":{"label":"Ab","profile":"lookup"},"output":{"valid":true,"reason":null,"reason_index":null,"cp":null,"form":"nr-ldh","ulabel":"Ab","alabel":"ab","direction":"none","bidi_condition":null,"data_version":"idna2008-rfc5892-unicode-15.1.0"}}],"execute_url":"/v1/tools/idna-label-validate/versions/1.0.0/execute"}