Features Integrations Pricing FAQ Docs Blog Get Free API Key →
validation

Email Validation API: What to Look For (With Code)

By The ValidateEasy team ยท

Quick answer: An email validation API takes an address and returns a verdict before you send or store it. Pick one that runs syntax, MX, disposable, role and typo checks, returns a three-way status instead of true/false, supports batches, and states what it cannot confirm, such as whether a mailbox exists.

An email validation API checks an address over HTTP and tells you whether to accept it, flag it or reject it. A good one runs several checks per request, returns a status your code can branch on, and handles batches. The best ones are also honest about what a lookup cannot prove.

This guide covers what to compare, what a response should look like, and how to wire an API into a signup form and a list import.

What does an email validation API do?

An email validation API receives an address, runs a set of checks against it, and returns a verdict plus the reason. It replaces the regex-and-hope code most apps start with.

The checks fall into two groups. Deliverability checks ask whether mail can arrive: is the syntax legal, and does the domain publish MX records? Quality checks ask whether the address is worth keeping: is it a disposable inbox, a shared role address like info@, or a typo of a common domain such as gamil.com? Our guide to validating an email address explains each check in detail. An API bundles them behind one request.

What should you look for in an email validation API?

Look for six things: which checks it runs, how it reports results, batch support, latency, honesty about mailbox verification, and pricing you can predict. Vendor comparison pages list features without saying which ones change your code. These do.

Criterion What to check Why it matters
Checks run Syntax, MX, disposable, role, free provider, typo Syntax and MX alone approve throwaway inboxes and typos
Result format Three states (valid, invalid, risky), not a boolean A boolean forces you to reject or accept addresses that deserve a third path
Per-check flags Booleans for each check Lets you apply your own policy, such as allowing billing@
Typo suggestion A suggested correction string Lets you show "Did you mean gmail.com?" at entry
Batch endpoint Array input and a documented per-request cap List cleaning with one call per address is slow and wastes quota
Mailbox verification Documented limits and failure modes Providers that promise certainty for every address are overselling
Pricing Free tier, per-request or monthly quota, overage behavior You need to know what happens at 100% of quota
Auth and docs Header-based key, a docs endpoint, plain errors Saves an afternoon of guessing

Skip any API that returns only true or false. A single flag cannot tell a dead domain from a role address, and those need different handling.

What does a good response look like?

A good response gives a status, a human-readable reason, and one flag per check. You branch on the status and log the flags.

ValidateEasy returns this shape. For user@gamil.com the response includes a suggestion:

{
  "email": "user@gamil.com",
  "status": "risky",
  "result": "Risky",
  "checks": {
    "syntax": true,
    "mx": true,
    "disposable": false,
    "role": false,
    "free_provider": false,
    "typo": true
  },
  "suggestion": "Did you mean gmail.com?",
  "reason": "Possible Typo"
}

We ran four safe test addresses through the ValidateEasy MCP server to see how the statuses map:

Address Status Reason What it shows
test@gmail.com valid Accepted A free-provider address that passes every check
info@example.com risky Role Address A deliverable shared inbox
someone@mailinator.com invalid Disposable A real mail server that you still should not accept
user@gamil.com risky Possible Typo A suggestion to show the user

All four passed syntax and MX. A validator that stopped there would have approved the disposable inbox and the typo.

How do you call an email validation API?

Send a GET request for one address, or a POST with an array for many. The API key goes in an X-Api-Key header.

Single address:

curl "https://api.validateeasy.com/validate?email=test@gmail.com" \
  -H "X-Api-Key: YOUR_KEY"

In JavaScript, for a server-side signup handler:

async function checkEmail(email) {
  const res = await fetch(
    `https://api.validateeasy.com/validate?email=${encodeURIComponent(email)}`,
    { headers: { "X-Api-Key": process.env.VALIDATEEASY_KEY } }
  );
  if (!res.ok) return null; // fail open: do not block signups on an API error
  return res.json();
}

Call the API from your server, not from browser code, or your key ships to every visitor. The null return is deliberate. If the validator is down or your quota is spent, you want the signup to go through and be re-checked later.

How do you handle each status in your app?

Map each status to one action and keep the rule in one function. A common policy is below.

  1. invalid: block the submission and ask for a different address. This covers bad syntax, a domain with no MX records, and disposable domains.
  2. risky with a suggestion: show "Did you mean...?" and let the user confirm or fix it.
  3. risky for a role address: accept it and tag it so marketing mail skips it.
  4. valid: accept.
function decide(result) {
  if (!result) return "accept";
  if (result.status === "invalid") return "reject";
  if (result.suggestion) return "confirm";
  if (result.checks.role) return "accept-tagged";
  return "accept";
}

Your policy may differ. A B2B tool might reject free providers, and a consumer app should not. That is why per-check flags matter more than a single score.

How do you validate a whole list through an API?

Use the batch endpoint, and stay under the per-request cap. POST an emails array and read back one result per address.

curl -X POST "https://api.validateeasy.com/validate" \
  -H "X-Api-Key: YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"emails": ["test@gmail.com", "info@example.com"]}'

The cap depends on the plan: 50 emails per request on Free, 100 on Starter and 500 on Pro. A request over the cap returns a 400 with the limit in the message, so chunk your list first:

function chunk(list, size) {
  const out = [];
  for (let i = 0; i < list.length; i += size) out.push(list.slice(i, i + size));
  return out;
}

for (const batch of chunk(allEmails, 50)) {
  // POST { emails: batch } and collect results
}

Check your remaining quota before a large import so the job does not stop halfway.

Can an email validation API confirm a mailbox exists?

Sometimes, and no honest vendor promises it every time. An SMTP probe asks the receiving server whether it would accept mail for an address, but many providers block or throttle probes, and catch-all domains accept everything.

On ValidateEasy's Starter and Pro plans, the response can include catch_all and mailbox_verified. Both run in the background. The first call may return null while the probe is queued, the result is cached for later calls, and the fields are omitted when a provider blocks probing. The Free plan does not include them. Treat these fields as extra signal. If you need proof that a person owns an address, send a confirmation link.

How much does an email validation API cost?

Pricing models vary, so compare cost per validated address at your real volume and check what happens when you hit the quota. ValidateEasy charges a flat monthly fee with a fixed allowance:

Plan Price Validations per month Batch size
Free $0 1,000 50
Starter $9/month 25,000 100
Pro $49/month 250,000 500

At the Starter tier that works out to about 0.036 cents per validation. When you compare vendors, ask whether a batch counts as one request or many, and whether unused allowance rolls over. You can start on the free tier from the ValidateEasy homepage.

What about the CLI and MCP options?

If you validate from scripts or from an AI assistant, check that the vendor offers more than REST. ValidateEasy ships a CLI (@jesbin/email-validator-cli) for validating files and pipelines, and an MCP server so Claude and other AI tools can validate addresses mid-conversation. The four results in the table above came from the MCP server.

FAQ

What is the best email validation API?

The best one for you runs syntax, MX, disposable, role and typo checks, returns a three-way status, and fits your volume and budget. Test two or three on the same 50 addresses, including known-bad ones, before you commit.

Is there a free email validation API?

Yes. ValidateEasy includes 1,000 validations a month on its Free plan. Other vendors offer trial credits instead, so check whether the allowance renews monthly or runs out.

How accurate are email validation APIs?

Accuracy depends on the check. Syntax, MX and disposable checks are deterministic. Mailbox verification is not, because providers block probes and catch-all domains accept any address. Treat vendor accuracy claims without a published test method with caution.

Should I validate emails in the browser or on the server?

Do the syntax check in the browser for instant feedback, and call the API from your server. Server-side calls keep your API key private and let you enforce the result.

How do I validate emails in bulk?

Send arrays to the batch endpoint in chunks that fit your plan's cap. The email validation guide covers the request format.