# Unicode Normalize API
> Normalize and fold Unicode text. Convert any string to one of the four Unicode normalization forms — NFC, NFD, NFKC, NFKD — so that visually identical text with different code-point compositions (é as one code point vs e + a combining accent) compares and stores consistently. Fold diacritics and special letters to plain ASCII (café → cafe, Straße → Strasse, Ångström → Angstrom, Łódź → Lodz) for slugs, search keys and filenames; the ﬁ ligature and similar compatibility characters are expanded under NFKC/NFKD. And compare two strings for equality after normalization, optionally case-insensitively. Perfect for deduplication, search and indexing, username and identifier checks, and defending against look-alike (homoglyph) input. Pure local computation — no key, no third-party service, instant. Live, nothing stored. 4 endpoints. Distinct from Unicode character-database lookups and from text segmentation.

## Authentication
All requests require your oanor API key in the `x-oanor-key` header. Get one at https://www.oanor.com/developer/keys.

```bash
curl -H "x-oanor-key: oanor_live_…" "https://api.oanor.com/normalize-api/..."
```

## Pricing
- **Free** (Free) — 660 calls/Mo, 2 req/s
- **Starter** ($1/Mo) — 5,100 calls/Mo, 8 req/s
- **Pro** ($18/Mo) — 120,000 calls/Mo, 20 req/s
- **Mega** ($54/Mo) — 620,000 calls/Mo, 50 req/s

## Endpoints

### Normalize

#### `GET /v1/compare` — Compare after normalization

**Parameters:**
- `a` (query, required, string) — First string Example: `café`
- `b` (query, required, string) — Second string Example: `café`
- `form` (query, optional, string) — Normalization form Example: `NFC`
- `case_insensitive` (query, optional, string) — true/false

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/normalize-api/v1/compare?a=caf%C3%A9&b=caf%C3%A9&form=NFC"
```

**Response:**
```json
{
    "data": {
        "form": "NFC",
        "equal": true,
        "case_insensitive": false
    },
    "meta": {
        "timestamp": "2026-06-03T01:09:48.038Z",
        "request_id": "c4f58157-6cc8-4e36-8026-f57d6a8e47d5"
    },
    "status": "ok",
    "message": "Compare after normalization",
    "success": true
}
```

#### `GET /v1/fold` — Fold diacritics to ASCII

**Parameters:**
- `text` (query, required, string) — Input text Example: `Ångström`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/normalize-api/v1/fold?text=%C3%85ngstr%C3%B6m"
```

**Response:**
```json
{
    "data": {
        "folded": "Angstrom",
        "changed": true,
        "ascii_only": true
    },
    "meta": {
        "timestamp": "2026-06-03T01:09:48.132Z",
        "request_id": "38cd4179-333e-400f-9aee-20b94cc24ddf"
    },
    "status": "ok",
    "message": "Fold diacritics to ASCII",
    "success": true
}
```

#### `GET /v1/normalize` — Normalize Unicode text

**Parameters:**
- `text` (query, required, string) — Input text Example: `café`
- `form` (query, optional, string) — NFC|NFD|NFKC|NFKD (default NFC) Example: `NFC`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/normalize-api/v1/normalize?text=caf%C3%A9&form=NFC"
```

**Response:**
```json
{
    "data": {
        "form": "NFC",
        "changed": false,
        "normalized": "café",
        "input_code_points": 4,
        "output_code_points": 4
    },
    "meta": {
        "timestamp": "2026-06-03T01:09:48.222Z",
        "request_id": "5396ed9e-9993-4225-ac14-cedc1e4946d3"
    },
    "status": "ok",
    "message": "Normalize Unicode text",
    "success": true
}
```

### Meta

#### `GET /v1/meta` — Spec

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/normalize-api/v1/meta"
```

**Response:**
```json
{
    "data": {
        "name": "Unicode Normalize API",
        "notes": "Normalization fixes look-alike strings that differ only in code-point composition (e.g. é as one code point vs e + combining accent). Folding also handles non-decomposing letters like ß, ø, æ, ł. Nothing is stored.",
        "version": "v1",
        "endpoints": [
            {
                "path": "/v1/normalize",
                "params": {
                    "form": "NFC|NFD|NFKC|NFKD (default NFC)",
                    "text": "input (required)"
                },
                "returns": "normalized text + whether it changed + code-point counts"
            },
            {
                "path": "/v1/fold",
                "params": {
                    "text": "input (required)"
                },
                "returns": "diacritic-folded, mostly-ASCII text"
            },
            {
                "path": "/v1/compare",
                "params": {
                    "a": "required",
                    "b": "required",
                    "form": "default NFC",
                    "case_insensitive": "true/false"
                },
                "returns": "whether they are equal after normalization"
            },
            {
                "path": "/v1/meta",
                "params": [],
                "returns": "this document"
            }
        ],
        "description": "Normalize Unicode text to NFC, NFD, NFKC or NFKD; fold diacritics and special letters to 
…(truncated, see openapi.json for full schema)
```


---
Marketplace page: https://www.oanor.com/api/normalize-api
OpenAPI spec: https://www.oanor.com/api/normalize-api/openapi.json
