Email Verify API

A free, open source REST API to verify email addresses in real time. Check syntax, DNS MX records, and detect disposable email providers — no account required.

✓ Free & Open Source ✓ No API Key Required Self-Hostable MIT License

How it works

Each verification runs three independent checks:

CheckWhat it does
SyntaxValidates the email format against RFC 5322 rules (local part, @, domain).
MX RecordPerforms a live DNS lookup to verify the domain can actually receive emails.
DisposableChecks the domain against a curated list of 60+ known disposable/temporary email providers.

⚠️ This API does not perform SMTP handshake verification (no actual connection to the mail server). MX check confirms the domain is configured to receive email, not that the specific mailbox exists.

Base URL

All endpoints are relative to the base URL of your deployed instance.

https://email-verify-api.onrender.com

All responses are application/json. All requests must use HTTPS.

Authentication

🔓 This API requires no authentication. All endpoints are publicly accessible. CORS is enabled for all origins.

If you self-host this API and want to add authentication, you can add an API key middleware to main.py.

Rate Limiting

The public hosted instance applies the following limits to ensure fair usage:

EndpointLimit
POST /verify60 requests / minute per IP
POST /verify/batch10 requests / minute per IP
GET /check-domain/{domain}60 requests / minute per IP
GET /is-disposable/{domain}120 requests / minute per IP

When a rate limit is exceeded, the API returns HTTP 429 with a Retry-After header.

Endpoints

POST /verify Verify a single email address

Request Body

FieldTypeRequiredDescription
emailstringrequiredThe email address to verify.

Example Request

curl -X POST https://email-verify-api.onrender.com/verify \
  -H "Content-Type: application/json" \
  -d '{"email": "user@example.com"}'

Example Response — Valid

{
  "email": "user@example.com",
  "valid": true,
  "syntax_valid": true,
  "mx_valid": true,
  "disposable": false,
  "details": {
    "domain": "example.com",
    "mx_records": ["mx.example.com"]
  }
}

Example Response — Disposable

{
  "email": "test@mailinator.com",
  "valid": false,
  "syntax_valid": true,
  "mx_valid": true,
  "disposable": true,
  "details": {
    "domain": "mailinator.com",
    "mx_records": ["mail.mailinator.com"]
  }
}
POST /verify/batch Verify up to 20 emails at once

Request Body

FieldTypeRequiredDescription
emailsstring[]requiredArray of email addresses. Max 20.

Example Request

curl -X POST https://email-verify-api.onrender.com/verify/batch \
  -H "Content-Type: application/json" \
  -d '{"emails": ["user@example.com", "test@mailinator.com"]}'

Example Response

{
  "count": 2,
  "valid_count": 1,
  "results": [
    {
      "email": "user@example.com",
      "valid": true,
      "syntax_valid": true,
      "mx_valid": true,
      "disposable": false,
      "details": { "domain": "example.com", "mx_records": ["mx.example.com"] }
    },
    {
      "email": "test@mailinator.com",
      "valid": false,
      "syntax_valid": true,
      "mx_valid": true,
      "disposable": true,
      "details": { "domain": "mailinator.com", "mx_records": ["mail.mailinator.com"] }
    }
  ]
}
GET /check-domain/{domain} Check MX records for a domain

Path Parameters

ParameterTypeDescription
domainstringDomain name to check (e.g. example.com).

Example Request

curl https://email-verify-api.onrender.com/check-domain/gmail.com

Example Response

{
  "domain": "gmail.com",
  "mx_valid": true,
  "mx_records": ["alt1.gmail-smtp-in.l.google.com", "gmail-smtp-in.l.google.com"],
  "disposable": false,
  "can_receive_email": true
}
GET /is-disposable/{domain} Check if a domain is a disposable email provider

Example Request

curl https://email-verify-api.onrender.com/is-disposable/yopmail.com

Example Response

{
  "domain": "yopmail.com",
  "disposable": true
}
GET /health Health check
{ "status": "ok" }

Error Codes

CodeMeaningCommon Cause
400Bad RequestMissing or empty email field, batch exceeds 20 items, invalid domain.
404Not FoundRoute does not exist.
429Too Many RequestsRate limit exceeded. Check Retry-After header.
503Service UnavailableInternal DNS resolution failure.

Error Response Format

{
  "detail": "Email cannot be empty."
}

Self-Hosting

Run locally

git clone https://github.com/your-username/email-verify-api
cd email-verify-api
pip install -r requirements.txt
uvicorn main:app --reload

Interactive docs available at http://localhost:8000/docs

Deploy on Render

The repository includes a render.yaml file. Simply connect the repo to a Render Web Service — it will auto-detect the configuration.

Deploy on Railway / Fly.io

Any Python-compatible hosting works. Start command:

uvicorn main:app --host 0.0.0.0 --port $PORT