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.
How it works
Each verification runs three independent checks:
| Check | What it does |
|---|---|
| Syntax | Validates the email format against RFC 5322 rules (local part, @, domain). |
| MX Record | Performs a live DNS lookup to verify the domain can actually receive emails. |
| Disposable | Checks 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:
| Endpoint | Limit |
|---|---|
POST /verify | 60 requests / minute per IP |
POST /verify/batch | 10 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
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
email | string | required | The 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"]
}
}
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
emails | string[] | required | Array 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"] }
}
]
}
Path Parameters
| Parameter | Type | Description |
|---|---|---|
domain | string | Domain 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
}
Example Request
curl https://email-verify-api.onrender.com/is-disposable/yopmail.com
Example Response
{
"domain": "yopmail.com",
"disposable": true
}
{ "status": "ok" }
Error Codes
| Code | Meaning | Common Cause |
|---|---|---|
| 400 | Bad Request | Missing or empty email field, batch exceeds 20 items, invalid domain. |
| 404 | Not Found | Route does not exist. |
| 429 | Too Many Requests | Rate limit exceeded. Check Retry-After header. |
| 503 | Service Unavailable | Internal DNS resolution failure. |
Error Response Format
{
"detail": "Email cannot be empty."
}
Legal & GDPR
Data Retention
This API processes email addresses in memory only. No data is stored, logged, or shared with any third party. Each request is stateless — no database writes occur.
GDPR Compliance
Because no personal data is persisted, this API operates as a pure processing tool with no data retention obligations under GDPR Article 5(e). Integrators are however responsible for their own GDPR compliance when collecting email addresses from end users.
DNS Queries
MX record lookups are performed against public DNS servers. The domain portion of the email (never the full address) is transmitted as a standard DNS query. This is equivalent to any other DNS resolution and does not constitute personal data processing under GDPR.
Acceptable Use
This API may not be used for spam, phishing, or any unlawful purpose. Bulk harvesting or scraping of email validation results to build databases is prohibited.
License
Source code is released under the MIT License. You are free to self-host, modify, and redistribute.
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