๐Ÿ›ก๏ธ Disposable Email Detector API

Professional API to detect temporary and disposable email addresses. Protect your applications from spam and fraudulent registrations.

Quick Start

Get started with the Disposable Email Detector API in minutes. Simply make a GET request to check if an email address is disposable.

Endpoint

GET https://pro-tempmail-api.onrender.com/check?email=user@example.com

Example Request

curl "https://pro-tempmail-api.onrender.com/check?email=test@temp-mail.org"

Example Response

{ "tempmail": true }
โœ… true = Disposable/Temporary Email
โŒ false = Legitimate Email

Features

๐Ÿ”

Real-time Detection

Instantly check email addresses against our comprehensive database of disposable email providers.

๐Ÿ›ก๏ธ

Spam Protection

Prevent fraudulent registrations and protect your application from temporary email abuse.

โšก

High Performance

Fast response times with optimized algorithms and efficient data structures.

๐Ÿ”„

Auto Updates

Database automatically updates with new disposable email domains as they emerge.

๐ŸŒ

RESTful API

Simple REST API with JSON responses, easy to integrate into any application.

๐Ÿ”’

Secure

Built with security best practices and rate limiting to prevent abuse.

API Reference

Check Email Endpoint

Determine if an email address belongs to a disposable email service.

HTTP Request

GET
https://pro-tempmail-api.onrender.com/check?email={email_address}

Parameters

Parameter Type Required Description
email string Yes The email address to check

Response Format

{ "tempmail": boolean }

Response Codes

Status Code Description
200 Success - Email checked successfully
400 Bad Request - Missing email parameter, invalid email format, or domain has no mail server
429 Too Many Requests - Rate limit exceeded
500 Internal Server Error

Error Response Examples

Missing Email Parameter (400)
{ "error": "Email parameter is required", "tempmail": null }
Invalid Email Format (400)
{ "error": "Invalid email format", "tempmail": null }
Email Domain Has No Mail Server (400)
{ "error": "Email domain has no mail server", "tempmail": null }

Example Usage

// Using fetch API
const checkEmail = async (email) => {
  try {
    const response = await fetch(`https://pro-tempmail-api.onrender.com/check?email=${encodeURIComponent(email)}`);
    const data = await response.json();
    return data.tempmail; // true = disposable, false = legitimate
  } catch (error) {
    console.error('Error checking email:', error);
    return null;
  }
};

// Usage
checkEmail('user@temp-mail.org').then(isDisposable => {
  if (isDisposable) {
    console.log('This is a disposable email!');
  } else {
    console.log('This is a legitimate email.');
  }
});
import requests

def check_disposable_email(email):
    try:
        response = requests.get(f'https://pro-tempmail-api.onrender.com/check?email={email}')
        data = response.json()
        return data.get('tempmail', False)
    except Exception as e:
        print(f'Error: {e}')
        return False

# Usage
is_disposable = check_disposable_email('test@10minutemail.com')
if is_disposable:
    print('Disposable email detected!')
else:
    print('Legitimate email address.')

Integration Examples

Frontend Form Validation

<form id="registrationForm">
  <input type="email" id="emailInput" required>
  <span id="emailWarning" style="color: red; display: none;">
    Disposable emails are not allowed
  </span>
  <button type="submit">Register</button>
</form>

<script>
document.getElementById('registrationForm').addEventListener('submit', async (e) => {
  e.preventDefault();

  const email = document.getElementById('emailInput').value;
  const warning = document.getElementById('emailWarning');

  try {
    const response = await fetch(`https://pro-tempmail-api.onrender.com/check?email=${encodeURIComponent(email)}`);
    const data = await response.json();

    if (data.tempmail) {
      warning.style.display = 'block';
      return;
    }

    warning.style.display = 'none';
    // Proceed with registration
    console.log('Email is valid, proceeding...');
  } catch (error) {
    console.error('Error validating email:', error);
  }
});
</script>

Backend Validation (Node.js/Express)

const express = require('express');
const app = express();

app.use(express.json());

// Email validation middleware
const validateEmail = async (req, res, next) => {
  const { email } = req.body;

  if (!email) {
    return res.status(400).json({ error: 'Email is required' });
  }

  try {
    // Call your disposable email detector API
    const response = await fetch(`https://pro-tempmail-api.onrender.com/check?email=${encodeURIComponent(email)}`);
    const data = await response.json();

    if (data.tempmail) {
      return res.status(400).json({
        error: 'Disposable emails are not allowed'
      });
    }

    next(); // Email is valid, continue
  } catch (error) {
    console.error('Email validation error:', error);
    res.status(500).json({ error: 'Validation service unavailable' });
  }
};

// Use in registration route
app.post('/register', validateEmail, (req, res) => {
  // Registration logic here
  res.json({ message: 'Registration successful' });
});

app.listen(3001, () => {
  console.log('Server running on port 3001');
});

Rate Limiting

The API includes rate limiting to prevent abuse and ensure fair usage for all users.

Current Limits

  • Requests per minute: Configurable (default: 60)
  • Requests per hour: Configurable (default: 1000)
  • Concurrent requests: Limited

Rate Limit Headers

The API returns the following headers to help you manage your request rate:

Header Description
X-RateLimit-Limit Maximum requests allowed per time window
X-RateLimit-Remaining Number of requests remaining in current window
X-RateLimit-Reset Time when the rate limit resets (Unix timestamp)

Rate Limit Exceeded Response

HTTP/1.1 429 Too Many Requests Content-Type: application/json { "error": "Too Many Requests", "message": "Rate limit exceeded. Please try again later." }

Support & Resources

Need help integrating the Disposable Email Detector API? Here are some resources to get you started.

๐Ÿงช

Test the API

Use our interactive API tester to experiment with different email addresses and see real-time results.

Test API
๐Ÿ“ง

Contact Support

Have questions or need help? Reach out to our support team for assistance with integration.

Contact Us
๐Ÿ“š

Documentation

Complete API documentation with examples in multiple programming languages.

View Docs