Email Normalizer
Normalize email addresses to their canonical form. Strips plus tags, removes provider-specific dots, lowercases, trims whitespace, and resolves alias domains (e.g. googlemail.com → gmail.com). Returns the normalized address, its parts, and a list of every change applied.
Vue d'ensemble
Cas d'utilisation
- De-duplicate user accounts that share the same canonical mailbox
- Store a consistent canonical address alongside the original
- Detect plus-tag abuse during registration
- Normalize emails before look-up queries or comparisons
Fonctionnalités
Points de terminaison de l'API
Normalize Email
Normalizes a single email address and returns the canonical form together with a breakdown of all transformations applied.
https://requiems.xyz/v1/text/normalize
Paramètres
| Nom | Type | Requis | Description |
|---|---|---|---|
string |
Requis | The email address to normalize. Must be a syntactically valid address. |
Essayez-le
Démo en directRequête
The email address to normalize. Must be a syntactically valid address.
Champs de réponse
| Champ | Type | Description |
|---|---|---|
| original | string |
The email address exactly as supplied in the request body |
| normalized | string |
The canonical form of the address after all transformations |
| local | string |
The local part (before @) of the normalized address |
| domain | string |
The domain part (after @) of the normalized address |
| changes | array<string> |
Ordered list of transformations applied. Possible values: lowercased, trimmed_whitespace, removed_dots, removed_plus_tag, canonicalised_domain. Empty array when no changes were needed. |
Exemples de code
curl -X POST https://requiems.xyz/v1/text/normalize \
-H "requiems-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"email": "[email protected]"}'
import requests
url = "https://requiems.xyz/v1/text/normalize"
headers = {
"requiems-api-key": "YOUR_API_KEY",
"Content-Type": "application/json"
}
payload = {"email": "[email protected]"}
response = requests.post(url, headers=headers, json=payload)
data = response.json()
print(data["data"]["normalized"]) # [email protected]
const response = await fetch('https://requiems.xyz/v1/text/normalize', {
method: 'POST',
headers: {
'requiems-api-key': 'YOUR_API_KEY',
'Content-Type': 'application/json'
},
body: JSON.stringify({ email: '[email protected]' })
});
const { data } = await response.json();
console.log(data.normalized); // [email protected]
console.log(data.changes); // ["lowercased", "removed_dots", ...]
require 'net/http'
require 'json'
uri = URI('https://requiems.xyz/v1/text/normalize')
request = Net::HTTP::Post.new(uri)
request['requiems-api-key'] = 'YOUR_API_KEY'
request['Content-Type'] = 'application/json'
request.body = { email: '[email protected]' }.to_json
response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) do |http|
http.request(request)
end
data = JSON.parse(response.body)
puts data['data']['normalized'] # [email protected]
Réponses d'erreur
The email field is missing or not a valid email address format.
The request body is missing, not valid JSON, or contains unknown fields.
Unexpected server error.
Normalize Email Batch
Normalizes up to 100 email addresses in one request. Results are in the same order as the input. Each item includes valid (boolean); when false, only original and message are set. Usage is billed per email processed (see gateway usage headers).
https://requiems.xyz/v1/text/normalize/batch
Paramètres
| Nom | Type | Requis | Description |
|---|---|---|---|
| emails | array<string> |
Requis | Array of addresses to normalize (min 1, max 100; each entry non-empty) |
Essayez-le
Démo en directRequête
Array of addresses to normalize (min 1, max 100; each entry non-empty)
Champs de réponse
| Champ | Type | Description |
|---|---|---|
| results | array<object> |
One normalization result per input email, in order |
| total | integer |
Number of emails in the batch (same as results length) |
Exemples de code
curl -X POST https://requiems.xyz/v1/text/normalize/batch \
-H "requiems-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"emails":["[email protected]","[email protected]"]}'
import requests
url = "https://requiems.xyz/v1/text/normalize/batch"
headers = {
"requiems-api-key": "YOUR_API_KEY",
"Content-Type": "application/json"
}
data = {"emails": ["[email protected]", "[email protected]"]}
response = requests.post(url, headers=headers, json=data)
print(response.json())
const response = await fetch('https://requiems.xyz/v1/text/normalize/batch', {
method: 'POST',
headers: {
'requiems-api-key': 'YOUR_API_KEY',
'Content-Type': 'application/json'
},
body: JSON.stringify({ emails: ['[email protected]', '[email protected]'] })
});
console.log(await response.json());
Réponses d'erreur
Missing emails, empty array, too many items, or empty string in the array
Invalid JSON or unknown fields in the body