# Duo Data Utilities – Unicode Analysis

> Duo Data Utilities – Unicode Analysis is a paid API for AI agents from api.duoleads.com, paid per call via x402, $0.05/call, status unknown (last checked 2026-10-02).

Analyses a string at the Unicode level: applies NFC/NFD/NFKC/NFKD normalisation, reports which forms the string is already in, lists scripts present, and flags confusable, homoglyph, invisible, and bidirectional-override characters with per-character detail.

## Facts

- Endpoint: GET https://api.duoleads.com/v1/text/unicode?utm_source=zero.xyz
- Price: $0.05/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-02
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/duo-data-utilities-unicode-analysis-3a39265b
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_8Hsh5k7x0688cowLglXpz

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability duo-data-utilities-unicode-analysis-3a39265b
```

Example prompt: Can you analyse the string 'pаypal.com' for hidden confusable or homoglyph characters — I want to know if any Cyrillic or other non-Latin characters are sneaking in — and give me the full per-character detail including code points?

## When to prefer this

Choose this endpoint when you need to detect Unicode-based spoofing, homoglyph attacks, or invisible/control characters in user-supplied strings — especially usernames, domain names, URLs, or any text where look-alike characters could be exploited. Prefer it over generic string-processing tools when you need simultaneous normalisation, script enumeration, and confusable-character flagging in a single call.

## Known failure modes

- Missing required 'text' query parameter returns a 400 error
- Text exceeding 1024 characters is rejected
- Invalid 'form' enum value (not nfc/nfd/nfkc/nfkd) returns a 400 error
- Invalid 'detail' enum value returns a 400 error
- Payment not provided or insufficient for the $0.05 USDC x402 charge returns a 402 response
- Network timeout or 5xx on provider side

## How this service works

Analyse a string at the Unicode level: apply NFC, NFD, NFKC or NFKD, report which forms it 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

Returns a JSON object with the normalised string, grapheme/code-point/UTF-8 byte/UTF-16 unit counts, a list of scripts present, boolean flags for ASCII-safety and mixed-script, which normalisation forms the input already satisfies, and an array of suspicious characters each containing its code point, Unicode name, and the ASCII character it imitates.

## Request schema (JSON Schema)

```json
{
 "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": [
      "text"
     ],
     "properties": {
      "form": {
       "enum": [
        "nfc",
        "nfd",
        "nfkc",
        "nfkd"
       ],
       "type": "string",
       "default": "nfc",
       "maxLength": 64,
       "description": "Normalisation form to apply, default nfc."
      },
      "text": {
       "type": "string",
       "maxLength": 1024,
       "description": "Text to analyse, at most 1024 characters."
      },
      "detail": {
       "enum": [
        "summary",
        "full"
       ],
       "type": "string",
       "default": "summary",
       "maxLength": 64,
       "description": "summary (default) or full per-code-point detail (capped at 256 entries)."
      }
     }
    }
   },
   "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": [
        "normalised",
        "form",
        "already_normalised",
        "lengths",
        "scripts",
        "mixed_script",
        "suspicious",
        "ascii_safe"
       ],
       "properties": {
        "form": {
         "type": "string"
        },
        "lengths": {
         "type": "object",
         "required": [
          "code_points",
          "graphemes",
          "utf8_bytes",
          "utf16_units"
         ],
         "properties": {
          "graphemes": {
           "type": "integer"
          },
          "utf8_bytes": {
           "type": "integer"
          },
          "code_points": {
           "type": "integer"
          },
          "utf16_units": {
           "type": "integer"
          }
         }
        },
        "scripts": {
         "type": "array",
         "items": {
          "type": "string"
         }
        },
        "ascii_safe": {
         "typ
… (truncated)
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "ok": true,
  "data": {
   "form": "nfd",
   "lengths": {
    "graphemes": 4,
    "utf8_bytes": 6,
    "code_points": 5,
    "utf16_units": 5
   },
   "scripts": [
    "Latin"
   ],
   "ascii_safe": false,
   "normalised": "café",
   "suspicious": [],
   "mixed_script": false,
   "already_normalised": {
    "nfc": true,
    "nfd": false,
    "nfkc": true,
    "nfkd": false
   }
  },
  "meta": {
   "sources": [
    {
     "id": "unicode-confusables",
     "licence": "Unicode License v3",
     "version": "18.0.0",
     "published": "2026-08-06",
     "attribution": "Unicode confusables.txt (UTS #39), (c) Unicode, Inc."
    }
   ],
   "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/text/unicode",
  "version": "1.0.0"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/duo-data-utilities-unicode-analysis-3a39265b/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.duoleads.com](https://www.zero.xyz/host/api.duoleads.com/llms.txt)
