Complete guide to integrating the Disposable Email Checker API into your applications.
All API requests require authentication using an API key. Include your API key in the request header:
X-API-Key: YOUR_API_KEY_HERE
Keep your API key secure
Never expose your API key in client-side code or public repositories.
https://staging.disposableemailapi.com/api/v1
Content-Type: application/json
X-API-Key: YOUR_API_KEY_HERE
/check
Check if a single email address is disposable or temporary.
| Parameter | Type | Required | Description |
|---|---|---|---|
email |
string | Yes | Email address to check (max 255 characters) |
curl -X GET "https://staging.disposableemailapi.com/api/v1/[email protected]" \
-H "X-API-Key: YOUR_API_KEY"
{
"status": "success",
"data": {
"email": "[email protected]",
"is_disposable": true,
"domain": "guerrillamail.com",
"risk_score": 100,
"alias_analysis": {
"is_alias": false,
"original_email": "[email protected]",
"canonical_email": "[email protected]",
"alias_type": null,
"removed_part": null,
"provider": "Unknown"
},
"checks": {
"package_check": true,
"pattern_analysis": {
"score": 50,
"matched_patterns": ["/mail/i", "/guerrilla/i"]
}
}
},
"usage": {
"requests_remaining": 9986,
"limit_resets_at": "2025-11-01"
}
}
/batch-check
Check multiple email addresses at once (maximum 100 per request).
{
"emails": [
"[email protected]",
"[email protected]",
"[email protected]"
]
}
/usage
Get your current API usage statistics and limits.
/stats
Get public service statistics and available endpoints.
const axios = require('axios');
async function checkDisposableEmail(email) {
try {
const response = await axios.get(`https://staging.disposableemailapi.com/api/v1/check`, {
params: { email },
headers: {
'X-API-Key': process.env.DISPOSABLE_EMAIL_API_KEY
}
});
const { data } = response.data;
console.log(`Email ${email} is ${data.is_disposable ? 'disposable' : 'legitimate'}`);
console.log(`Risk score: ${data.risk_score}/100`);
return data;
} catch (error) {
console.error('API request failed:', error.response?.data || error.message);
throw error;
}
}
// Usage
checkDisposableEmail('[email protected]');
<?php
function checkDisposableEmail($email, $apiKey) {
$url = 'https://staging.disposableemailapi.com/api/v1/check?' . http_build_query(['email' => $email]);
$options = [
'http' => [
'header' => [
'X-API-Key: ' . $apiKey,
'Content-Type: application/json'
],
'method' => 'GET'
]
];
$context = stream_context_create($options);
$result = file_get_contents($url, false, $context);
if ($result === false) {
throw new Exception('API request failed');
}
$data = json_decode($result, true);
if ($data['status'] !== 'success') {
throw new Exception('API returned error: ' . ($data['message'] ?? 'Unknown error'));
}
return $data['data'];
}
// Usage
try {
$result = checkDisposableEmail('[email protected]', 'your-api-key');
echo "Email is " . ($result['is_disposable'] ? 'disposable' : 'legitimate') . "\n";
echo "Risk score: " . $result['risk_score'] . "/100\n";
} catch (Exception $e) {
echo "Error: " . $e->getMessage() . "\n";
}
import requests
import os
def check_disposable_email(email):
"""Check if an email address is disposable"""
url = "https://staging.disposableemailapi.com/api/v1/check"
headers = {
'X-API-Key': os.getenv('DISPOSABLE_EMAIL_API_KEY')
}
params = {'email': email}
try:
response = requests.get(url, headers=headers, params=params)
response.raise_for_status()
data = response.json()
if data['status'] != 'success':
raise Exception(f"API error: {data.get('message', 'Unknown error')}")
result = data['data']
print(f"Email {email} is {'disposable' if result['is_disposable'] else 'legitimate'}")
print(f"Risk score: {result['risk_score']}/100")
return result
except requests.RequestException as e:
print(f"Request failed: {e}")
raise
# Usage
if __name__ == "__main__":
try:
result = check_disposable_email('[email protected]')
except Exception as e:
print(f"Error: {e}")
| Status Code | Description |
|---|---|
200 |
Success - Request completed successfully |
401 |
Unauthorized - Invalid or missing API key |
422 |
Validation Error - Invalid request parameters |
429 |
Rate Limit Exceeded - Too many requests |
500 |
Internal Server Error - Server-side error |
{
"status": "error",
"error": "Validation failed",
"message": "The provided email address is not valid",
"errors": {
"email": ["The email field must be a valid email address."]
}
}
Each API key has a monthly request limit that you set when creating the key.
Monitor your usage through the API or dashboard.
Our API uses a regularly updated database of over 100,000 known disposable email providers, including popular services like Guerrilla Mail, 10 Minute Mail, Temp Mail, and hundreds of others. We also use pattern analysis to detect suspicious domains.
Our detection combines multiple approaches: a maintained database of known disposable providers, pattern analysis for suspicious domain characteristics, and risk scoring. This multi-layered approach provides high accuracy while minimizing false positives.
Alias analysis detects when users create variations of their email address using features like Gmail's plus addressing ([email protected]) or dot variations. This helps identify potential duplicate accounts and normalize email addresses.
Sign up for a free account and start protecting your application from disposable emails today.