Email Checker API

API Documentation

Complete guide to integrating the Disposable Email Checker API into your applications.

Quick Start

1

Get API Key

Sign up and create your API key to start making requests.

Get Started
2

Make Request

Send a GET request to our API endpoint with your email parameter.

View Endpoints
3

Handle Response

Use the JSON response to validate emails in your application.

Code Examples

Authentication

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.

Base URL & Headers

Base URL

https://staging.disposableemailapi.com/api/v1

Required Headers

Content-Type: application/json
X-API-Key: YOUR_API_KEY_HERE

API Endpoints

GET /check

Check if a single email address is disposable or temporary.

Parameters

Parameter Type Required Description
email string Yes Email address to check (max 255 characters)

Example Request

curl -X GET "https://staging.disposableemailapi.com/api/v1/[email protected]" \
  -H "X-API-Key: YOUR_API_KEY"

Example Response

{
  "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"
  }
}
POST /batch-check

Check multiple email addresses at once (maximum 100 per request).

Request Body

GET /usage

Get your current API usage statistics and limits.

GET /stats
No Auth Required

Get public service statistics and available endpoints.

Code Examples

JavaScript (Node.js)

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

<?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";
}

Python

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}")

Error Handling

HTTP Status Codes

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

Error Response Format

{
  "status": "error",
  "error": "Validation failed",
  "message": "The provided email address is not valid",
  "errors": {
    "email": ["The email field must be a valid email address."]
  }
}

Rate Limits & Usage

Monthly Limits

Each API key has a monthly request limit that you set when creating the key.

  • • Minimum: 1,000 requests/month
  • • Maximum: 1,000,000 requests/month
  • • Limits reset on the 1st of each month

Usage Tracking

Monitor your usage through the API or dashboard.

  • • Usage included in each response
  • • Real-time tracking
  • • Historical usage data available

Support & FAQ

What email providers are detected as disposable?

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.

How accurate is the disposable email detection?

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.

What is alias analysis and why is it useful?

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.

Ready to get started?

Sign up for a free account and start protecting your application from disposable emails today.