# Email Normalize API
> Canonicalize email addresses so you can deduplicate accounts and catch different aliases of the same inbox. The normalize endpoint lower-cases the address and applies provider-aware rules: it strips the dots from Gmail and Googlemail local parts (because Gmail ignores them) and maps googlemail.com to gmail.com, removes +tag sub-addressing for Gmail and the many providers that support it — Outlook, Hotmail, Live, iCloud, Fastmail, Proton, Yandex, Zoho, GMX and more — and, by default, for every domain so duplicates never slip through, while reporting exactly which changes it made and which provider it detected. The compare endpoint normalizes two addresses and tells you whether they resolve to the same mailbox. Everything is computed locally and deterministically, with no DNS or network calls, so it is instant and private. Ideal for sign-up and registration dedup, fraud and abuse prevention (one person, many aliases), CRM and mailing-list hygiene, and merging customer records. Pure local computation — no key, no third-party service, instant. Live, nothing stored. 3 endpoints. This normalizes addresses for comparison; to verify that an address actually exists and can receive mail (MX, disposable, role accounts) use an email-verification API.

## 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/emailnormalize-api/..."
```

## Pricing
- **Free** (Free) — 3,935 calls/Mo, 2 req/s
- **Starter** ($5/Mo) — 13,450 calls/Mo, 8 req/s
- **Pro** ($25/Mo) — 185,500 calls/Mo, 20 req/s
- **Mega** ($63/Mo) — 970,000 calls/Mo, 50 req/s

## Endpoints

### Email

#### `GET /v1/compare` — Compare two emails

**Parameters:**
- `a` (query, required, string) — First email Example: `John.Doe@gmail.com`
- `b` (query, required, string) — Second email Example: `johndoe+spam@googlemail.com`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/emailnormalize-api/v1/compare?a=John.Doe%40gmail.com&b=johndoe%2Bspam%40googlemail.com"
```

**Response:**
```json
{
    "data": {
        "a": {
            "input": "John.Doe@gmail.com",
            "normalized": "johndoe@gmail.com"
        },
        "b": {
            "input": "johndoe+spam@googlemail.com",
            "normalized": "johndoe@gmail.com"
        },
        "same": true
    },
    "meta": {
        "timestamp": "2026-06-03T09:24:58.673Z",
        "request_id": "6c74db27-d604-4301-9117-fc19ebdb5bb0"
    },
    "status": "ok",
    "message": "Compare two emails",
    "success": true
}
```

#### `GET /v1/normalize` — Normalize an email

**Parameters:**
- `email` (query, required, string) — The email address Example: `John.Doe+news@Gmail.com`
- `gmail_dots` (query, optional, string) — Strip dots for Gmail (default true)
- `plus_tags` (query, optional, string) — Strip +tag sub-addressing (default true)
- `plus_all` (query, optional, string) — Apply +tag stripping to all domains (default true)
- `lowercase` (query, optional, string) — Lower-case the local part (default true)

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/emailnormalize-api/v1/normalize?email=John.Doe%2Bnews%40Gmail.com"
```

**Response:**
```json
{
    "data": {
        "input": "John.Doe+news@Gmail.com",
        "local": "johndoe",
        "domain": "gmail.com",
        "changed": true,
        "changes": [
            "lowercased domain",
            "lowercased local part",
            "removed +tag",
            "removed dots (Gmail)"
        ],
        "provider": "gmail",
        "normalized": "johndoe@gmail.com"
    },
    "meta": {
        "timestamp": "2026-06-03T09:24:58.769Z",
        "request_id": "9951d01a-9886-4787-96d5-65f52cbbf9ac"
    },
    "status": "ok",
    "message": "Normalize an email",
    "success": true
}
```

### Meta

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

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

**Response:**
```json
{
    "data": {
        "name": "Email Normalize API",
        "notes": "Strictly, the local part is case-sensitive per RFC 5321, but virtually all providers treat it case-insensitively — lowercasing is on by default for deduplication and can be turned off. Gmail dot-stripping applies only to gmail.com/googlemail.com. This normalizes for comparison; to verify deliverability (MX, disposable) use an email-verification API. Nothing is stored.",
        "version": "v1",
        "endpoints": [
            {
                "path": "/v1/normalize",
                "params": {
                    "email": "the email address (required)",
                    "plus_all": "apply +tag stripping to all domains, not just known ones (default true)",
                    "lowercase": "lower-case the local part too (default true)",
                    "plus_tags": "strip +tag sub-addressing (default true)",
                    "gmail_dots": "strip dots for Gmail (default true)"
                },
                "returns": "the normalized address, the provider and the changes made"
            },
            {
                "path": "/v1/compare",
                "params": {
                    "a": "first email (required)",
                    "b": "second email (required)",
                    "…options": "same options as normalize"
                },
                "returns": "whether a and b are the same inbox, with both normalized forms"
            },
            {
                
…(truncated, see openapi.json for full schema)
```


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