API Documentation
Simple, fast, and free disposable email detection API. No authentication required, just check the HTTP status code for instant results.
Quick Start
Get started in seconds with our simple REST API. No API keys, no registration, no complex setup - just send a GET request and check the HTTP status code for the result.
https://disposableemailchecker.com/api/check?email=test@10minutemail.com
This appears to be a disposable email address
This email looks legitimate
How It Works
Our API uses HTTP status codes to indicate the result, making it extremely simple to integrate. The response body contains a human-readable message for additional context.
Status Code Logic
API Endpoints
1. Email Check Endpoint
Check if a complete email address is disposable. This is the most common use case for user registration validation.
/api/check?email={email}
2. Domain Check Endpoint (Privacy-Friendly)
For better privacy, you can check just the domain part instead of the full email address. This prevents any personal information from being transmitted or logged.
Using domain-only checking means no personal email addresses are transmitted to our servers, providing maximum privacy while still getting accurate disposable email detection.
/api/check?domain={domain}
Code Examples
Here are practical examples in popular programming languages. Focus on the HTTP status code for the result, and optionally read the response body for human-readable messages.
JavaScript / Node.js
async function checkEmail(email) { try { const response = await fetch( `https://disposableemailchecker.com/api/check?email=${encodeURIComponent(email)}` ); if (response.status === 200) { const message = await response.text(); console.log('✅ Valid email:', message); return true; // Allow registration } else if (response.status === 403) { const message = await response.text(); console.log('❌ Disposable email:', message); return false; // Block registration } else { const error = await response.text(); console.log(`⚠️ Check failed (${response.status}):`, error); return null; // Handle error } } catch (error) { console.error('❌ Request failed:', error); return null; } } // Domain check (privacy-friendly) async function checkDomain(domain) { try { const response = await fetch( `https://disposableemailchecker.com/api/check?domain=${encodeURIComponent(domain)}` ); return response.status === 200; // true = legitimate, false = disposable } catch (error) { console.error('❌ Request failed:', error); return null; } } // Usage examples checkEmail('user@gmail.com'); checkEmail('test@10minutemail.com'); checkDomain('gmail.com');
Python
import requests from urllib.parse import quote def check_email(email): """Check if email is disposable""" url = f"https://disposableemailchecker.com/api/check?email={quote(email)}" try: response = requests.get(url, timeout=5) if response.status_code == 200: print(f"✅ Valid email: {response.text}") return True # Allow registration elif response.status_code == 403: print(f"❌ Disposable email: {response.text}") return False # Block registration else: print(f"⚠️ Check failed ({response.status_code}): {response.text}") return None # Handle error except requests.RequestException as e: print(f"❌ Request failed: {e}") return None def check_domain(domain): """Check domain only (privacy-friendly)""" url = f"https://disposableemailchecker.com/api/check?domain={quote(domain)}" try: response = requests.get(url, timeout=5) return response.status_code == 200 # True = legitimate, False = disposable except requests.RequestException as e: print(f"❌ Request failed: {e}") return None # Usage examples check_email('user@gmail.com') check_email('test@10minutemail.com') check_domain('gmail.com')
PHP
<?php function checkEmail($email) { $url = 'https://disposableemailchecker.com/api/check?email=' . urlencode($email); $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_TIMEOUT, 5); $response = curl_exec($ch); $httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE); curl_close($ch); if ($httpCode === 200) { echo "✅ Valid email: " . $response . "\n"; return true; // Allow registration } elseif ($httpCode === 403) { echo "❌ Disposable email: " . $response . "\n"; return false; // Block registration } else { echo "⚠️ Check failed ({$httpCode}): " . $response . "\n"; return null; // Handle error } } function checkDomain($domain) { $url = 'https://disposableemailchecker.com/api/check?domain=' . urlencode($domain); $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_TIMEOUT, 5); curl_setopt($ch, CURLOPT_NOBODY, true); // HEAD request for status only curl_exec($ch); $httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE); curl_close($ch); return $httpCode === 200; // true = legitimate, false = disposable } // Usage examples checkEmail('user@gmail.com'); checkEmail('test@10minutemail.com'); var_dump(checkDomain('gmail.com')); ?>
cURL Command Line
# Check email with status code and response curl -w "HTTP Status: %{http_code}\n" \ "https://disposableemailchecker.com/api/check?email=test@10minutemail.com" # Check domain only (privacy-friendly) curl -w "HTTP Status: %{http_code}\n" \ "https://disposableemailchecker.com/api/check?domain=10minutemail.com" # Get only status code (for scripts) curl -s -o /dev/null -w "%{http_code}" \ "https://disposableemailchecker.com/api/check?email=user@gmail.com" # Batch check multiple emails for email in "user@gmail.com" "test@tempmail.org" "admin@yahoo.com"; do echo "Checking $email:" curl -w "Status: %{http_code}\n" \ "https://disposableemailchecker.com/api/check?email=$email" echo "---" done
Best Practices
Use Domain Checking for Privacy
When possible, extract the domain from email addresses client-side and only send the domain to our API. This prevents any personal email addresses from being transmitted or logged, providing maximum privacy protection.
Focus on Status Codes
The HTTP status code tells you everything you need to know. 200 = allow, 403 = block. You can optionally read the response body for human-readable messages, but the status code is sufficient for most use cases.
Handle Errors Gracefully
Always implement fallback logic for when the API is unavailable. In case of errors (4xx/5xx status codes), consider allowing the registration to proceed rather than blocking legitimate users. Set reasonable timeouts (3-5 seconds).
Implement Caching
Cache results for common domains to reduce API calls and improve performance. Most disposable email domains don't change status frequently, so caching for 24-48 hours is usually safe and reduces server load.
Smart Blocking in Production
In production environments, don't immediately block users when a disposable email is detected. Instead, combine the API result with other factors: check if more than 5 users already use this domain, or if more than 3 registrations from this domain occurred in the last 24 hours. Only then prompt users to use a different email. This approach improves user experience and reduces false positive impacts.
Rate Limits & Fair Use
Our API is free and doesn't enforce strict rate limits, but we ask that you use it responsibly to ensure good performance for everyone.
Fair Use Guidelines
- Reasonable request volumes for normal application usage
- Implement caching to avoid repeated requests for the same domains
- Don't use the API for bulk domain scanning or research purposes
- Contact us if you need higher limits for legitimate use cases
Support & Feedback
Need help integrating our API or found a domain that's incorrectly classified? We're here to help and always looking to improve our detection accuracy.
Technical Support
Having trouble with integration? Need help with a specific use case? Reach out to our technical team.
Get Technical HelpSubmit Domain Feedback
Found a false positive or negative? Help us improve by submitting domain feedback. We review all submissions within 24 hours.
Submit Feedback