deterministic
no-api-key
text
unicode
security

Unicode normalization (NFC/NFKC), script detection and homoglyph/confusable check

Unicode normalization and confusables check: apply NFC, NFD, NFKC or NFKD, report which forms a string is already in, list the scripts present (all Unicode scripts), and flag confusable and homoglyph characters — Cyrillic а in a Latin word, fullwidth or mathematical look-alikes, all-look-alike words — plus zero-width joiners, bidirectional overrides, invisible and blank characters. Returns per-character detail with code points, names and the ASCII character each imitates.

Output (data): normalised, form, already_normalised {nfc, nfd, nfkc, nfkd}, lengths {code_points, graphemes, utf8_bytes, utf16_units} (of the normalised output), scripts (every Unicode Script property value present, from Unicode 18 Scripts.txt; Common and Inherited are not listed), mixed_script, suspicious [{index (code point index in the input), char, code_point, name (Unicode character name; string|null, null only when the name is not vendored: only ASCII, Latin-1, spaces, combining marks, format and default-ignorable characters, controls and confusable look-alikes have names), category, kind confusable|invisible|bidi|combining_excess, looks_like (string|null, null unless kind is confusable)}], ascii_safe (input is printable ASCII only); with detail=full also characters [{index, char, code_point, name (string|null, as above), category, script (string|null, null for Common/Inherited/unassigned)}] (first 256) and characters_truncated. Confusables (UTS #39 confusables.txt, the entries that map to one ASCII character): in mixed-script text every one is reported; in single-script text the compatibility look-alikes of ASCII letters and digits (fullwidth, mathematical, Roman numerals) and words written wholly in one non-Latin script whose every letter has an ASCII look-alike (whole-script confusables, e.g. Cyrillic рау). Invisible = format characters (Cf), Default_Ignorable_Code_Point (e.g. Hangul filler U+3164, variation selectors) and U+2800 braille blank; bidi = embeddings, overrides, isolates and directional marks; combining_excess = the 4th and later combining marks in a row.

Deterministic: identical input returns identical output, so the response is served with Cache-Control: private, max-age=31536000, immutable (the paying client may cache it indefinitely; shared caches must not, because the response is paid).

Sources: unicode-confusables 18.0.0 (published 2026-08-06, Unicode License v3). Echoed in meta.sources.

Price: $0.05 USDC per call (x402, Base). Route contract version 1.0.0. Docs: https://api.duoleads.com/docs#text-unicode

get/v1/text/unicode

Request

  • Base URL: https://api.duoleads.com
  • URL: https://api.duoleads.com/v1/text/unicode
  • Auth: none declared

Query parameters

textstring required

Text to analyse, at most 1024 characters. Accepted: at most 1024 characters.

form'nfc' | 'nfd' | 'nfkc' | 'nfkd'

Normalisation form to apply, default nfc. Accepted: nfc, nfd, nfkc or nfkd.

detail'summary' | 'full'

summary (default) or full per-code-point detail (capped at 256 entries). Accepted: summary, full.

Response

Paid and settled. data is route-specific; a route that judges its input returns 200 with data.valid: false for a bad value.

okunknown required
route'/v1/text/unicode' required
version'1.0.0' required

Changes

No recorded changes to this operation across all 1 revision of this API.