agentsvc.io

services / email-validate

utilityoperational · 9 ms

Email Validation

Validate an email address: RFC 5322 format check, domain MX record lookup, disposable provider detection, and role address detection (e.g. info@, admin@). Returns is_valid boolean and granular checks object. Use before storing or sending to email addresses to prevent bounces.

Run free trial ↗3 free calls per day with the example input. Paid: $0.002 USDC, no limit.

Call it

import { wrapFetchWithPayment, x402Client } from "@x402/fetch";
import { registerExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";

const client = new x402Client();
registerExactEvmScheme(client, { signer: privateKeyToAccount(process.env.EVM_PRIVATE_KEY) });
const payFetch = wrapFetchWithPayment(fetch, client);

const res = await payFetch("https://agentsvc.io/api/v1/proxy/email-validate", {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({"email":"support@github.com"}),
});
const { data, payment } = await res.json();  // payment.transaction = on-chain receipt

Input

FieldTypeDescription
email *stringThe email address to validate (e.g. 'user@example.com')

Output

FieldTypeDescription
emailstringThe validated email address (normalized to lowercase)
is_validbooleantrue if the email passes all checks (format + deliverable domain)
local_partstringThe part before the @ symbol
domainstringThe domain part of the email address
checksobjectIndividual check results
mx_recordsarrayMX record hostnames found for the domain

Example response (data)

{
  "email": "user@example.com",
  "is_valid": true,
  "local_part": "user",
  "domain": "example.com",
  "checks": {
    "format_valid": true,
    "domain_has_mx": true,
    "is_disposable": false,
    "is_role_address": false
  },
  "mx_records": [
    "mail.example.com"
  ]
}