DEV Community

2x lazymac
2x lazymac

Posted on • Originally published at api.lazy-mac.com

How to Use the Email Validator API — Free REST + MCP Server

Bounced emails destroy your sender reputation. This API validates syntax, checks MX records, detects disposable providers (like mailinator, guerrillamail), and suggests corrections — all in one call.

Try It Right Now

curl -s -X POST https://api.lazy-mac.com/email/validate \
  -H "Content-Type: application/json" \
  -d '{"email": "test@gmail.com"}' | jq
Enter fullscreen mode Exit fullscreen mode

Response:

{
  "email": "test@gmail.com",
  "syntax": { "valid": true },
  "disposable": { "is_disposable": false },
  "mx": {
    "has_mx": true,
    "mx_records": [
      { "priority": 5, "exchange": "gmail-smtp-in.l.google.com" },
      { "priority": 10, "exchange": "alt1.gmail-smtp-in.l.google.com" }
    ]
  },
  "domain": { "domain_exists": true },
  "spf": { "has_spf": true }
}
Enter fullscreen mode Exit fullscreen mode

All Endpoints

Endpoint Description
POST /validate Full validation (syntax + MX + disposable + SPF)
POST /validate/batch Validate multiple emails at once
POST /domain Check domain MX and SPF only
POST /suggest Suggest corrections for typos

Batch Validation

curl -s -X POST https://api.lazy-mac.com/email/validate/batch \
  -H "Content-Type: application/json" \
  -d '{"emails": ["user@gmail.com", "fake@mailinator.com", "bad@nonexistent.xyz"]}' | jq
Enter fullscreen mode Exit fullscreen mode

Detect Typos

curl -s -X POST https://api.lazy-mac.com/email/suggest \
  -H "Content-Type: application/json" \
  -d '{"email": "user@gmial.com"}' | jq
Enter fullscreen mode Exit fullscreen mode

Use as an MCP Server

{
  "mcpServers": {
    "email": {
      "url": "https://api.lazy-mac.com/email/mcp"
    }
  }
}
Enter fullscreen mode Exit fullscreen mode

Ask Claude: "Is this email valid? Check the MX records for support@company.com"

Node.js Example

const res = await fetch("https://api.lazy-mac.com/email/validate", {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({ email: userInput })
});
const result = await res.json();
if (!result.syntax.valid || result.disposable.is_disposable) {
  throw new Error("Invalid email");
}
Enter fullscreen mode Exit fullscreen mode

Pricing

Tier Requests/mo Price
Free 100 $0
Pro 10,000 $9/mo
Business Unlimited $49/mo

Get Pro Access on Gumroad →


Browse all 22 APIs at api.lazy-mac.com →

More from the lazymac API Toolkit:

Top comments (0)