Skip to main content
ScrapingRabbit

Blog · · 4 min read

Check Email Addresses With an API

Check an email's format, mail servers and type as JSON: valid, disposable, role account. Working code, what the checks prove, and what they cannot.

Bad email addresses cost you twice: bounced mail hurts your sender reputation, and fake sign-ups pollute your numbers. A quick check at the point of sign-up catches the obvious ones. This guide shows how to check one address with a single GET request, and it is clear about what the check can and cannot prove.

Check an address

Send one address per call. Every call needs an API key. New accounts get 100 free credits and a first key is created automatically on sign-up (it is shown once on the dashboard). Sign in at scrapingrabbit.com/login, then send the key in the x-api-key header (a Bearer token also works). The code below reads it from the SCRAPINGRABBIT_API_KEY environment variable, so no key is ever written into your code.

curl -H "x-api-key: $SCRAPINGRABBIT_API_KEY" "https://api.scrapingrabbit.com/v1/email/verify?email=hello@scrapingrabbit.com"

A successful call costs 1 credit, as the OpenAPI file lists it. In our three test calls the check took between 0.16 and 0.82 seconds.

A shortened real answer, read on 3 December 2026:

{
  "success": true,
  "data": {
    "email": "hello@scrapingrabbit.com",
    "isValid": true,
    "validSyntax": true,
    "hasMxRecords": true,
    "isDisposable": false,
    "isRoleAccount": true,
    "isFreeProvider": false,
    "reachability": "unknown",
    "domain": "scrapingrabbit.com",
    "mxRecords": [
      "route1.mx.cloudflare.net.",
      "route3.mx.cloudflare.net.",
      "route2.mx.cloudflare.net."
    ]
  }
}

The address belongs to the team that wrote this guide. It is valid, it is a role account, and its mail is handled by the servers listed in mxRecords. The answer also has a few fields we left out: normalizedEmail, a Gravatar flag and some provider details.

Here is the answer for a domain that cannot receive mail, jane.doe@gmial.com, a common typo of a well-known provider:

{
  "success": true,
  "data": {
    "email": "jane.doe@gmial.com",
    "isValid": false,
    "validSyntax": true,
    "hasMxRecords": false,
    "reachability": "unknown"
  }
}

The format is fine, but the domain has no mail servers, so isValid is false. The check did not suggest a corrected spelling in our test, so do not count on a typo hint.

What the fields mean

FieldMeaning
isValidThe overall verdict: the format is right and the domain can receive mail
validSyntaxWhether the address is written correctly
hasMxRecordsWhether the domain publishes mail servers
mxRecordsThe mail servers, when there are any
isDisposableWhether the domain is a throwaway inbox service
isRoleAccountWhether it is a team address such as hello@ or info@
isFreeProviderWhether the domain is a free provider such as a webmail service
reachabilityunknown when the mailbox itself was not checked

Read it in code

async function checkEmail(email) {
  const url = `https://api.scrapingrabbit.com/v1/email/verify?email=${encodeURIComponent(email)}`;
  const res = await fetch(url, { headers: { "x-api-key": process.env.SCRAPINGRABBIT_API_KEY } });
  const body = await res.json();
  if (!body.success) return { ok: true, reason: "check unavailable" };

  const r = body.data;
  if (!r.validSyntax) return { ok: false, reason: "not a valid address" };
  if (r.isDisposable) return { ok: false, reason: "disposable inbox" };
  if (!r.isValid) return { ok: false, reason: "domain cannot receive mail" };
  return { ok: true, reason: r.isRoleAccount ? "role account" : "looks fine" };
}

console.log(await checkEmail("hello@scrapingrabbit.com"));

The code decides in a fixed order: bad format first, then disposable, then the overall verdict. It returns ok: true when the check itself fails, so an outage on our side never blocks a real person from signing up. Whether role accounts are allowed is up to you, so the code only labels them.

The same in Python:

import os
import requests

res = requests.get(
    "https://api.scrapingrabbit.com/v1/email/verify",
    params={"email": "hello@scrapingrabbit.com"},
    headers={"x-api-key": os.environ["SCRAPINGRABBIT_API_KEY"]},
    timeout=30,
)
body = res.json()
if body["success"]:
    data = body["data"]
    print(data["isValid"], data["isDisposable"], data["isRoleAccount"])

Things to plan for

  • It does not prove an inbox exists. It checks the format and the domain's mail setup. reachability stayed unknown in our tests.
  • Catch-all domains accept everything. A valid result there is not a guarantee.
  • For disposable domains, rely on isDisposable and isValid. In our test of a well-known disposable service, the mail-server fields came back empty even though a lookup shows that domain does have mail servers. Do not use hasMxRecords alone to judge those.
  • Never block sign-up on a failed check. If the call fails, let the person through and check again later.
  • One address per call. Cache results for addresses you have already checked.
  • Rate limits and credits. Each key is limited per minute: 10 requests on the free plan, 60 on Starter, 120 on Pro and 300 on Scale. Every successful call costs credits.
  • Always check success. A failed request returns success: false, a code such as RATE_LIMITED or INVALID_API_KEY, and a message. Failed calls are not charged.

Try it without code

The free email verifier works in the browser with no key and shows these fields for any address you type.

Try it yourself

Frequently asked questions

Does it prove the mailbox exists?

No. It checks the format and the domain's mail setup. It does not connect to the mailbox, so a valid result means the domain can receive mail, not that this person's inbox exists. In our tests reachability came back as unknown.

What is a role account?

An address like hello@, info@ or support@ that belongs to a team and not one person. The answer has an isRoleAccount field so you can treat these differently, for example in sign-up forms.

What about catch-all domains?

A catch-all domain accepts every address, so a valid result there is not a guarantee that a real person reads that inbox.

More guides