How to Detect Disposable Emails in Your Signup Forms (Free API)
DEV Community

How to Detect Disposable Emails in Your Signup Forms (Free API)

Hey everyone, fake signups and spam accounts are a real problem for any web app. One of the simplest ways to fight them is to block disposable email addresses (like temp-mail, throwaway, etc.).

I built Disposable Email Detector - a fast, free API that checks if an email is disposable, temporary, or fake.

What It Does

  • Checks email syntax and domain validity.
  • Detects disposable/temp-mail email addresses.
  • Uses a database of 160,000+ known disposable domains, updated daily.
  • Also identifies free email providers (Gmail, Yahoo, Outlook).

How to Use It

You can get a free API key on RapidAPI:

๐Ÿ‘‰ https://rapidapi.com/Hamza9777/api/disposable-email-detector11

Once you have your key, here's a simple example in JavaScript:

const checkEmail = async (email) => {
  const response = await fetch(
    `https://disposable-email-detector11.p.rapidapi.com/v1/check?email=${email}`,
    {
      headers: {
        'X-RapidAPI-Key': 'YOUR_API_KEY',
        'X-RapidAPI-Host': 'disposable-email-detector11.p.rapidapi.com'
      }
    }
  );
  const data = await response.json();
  return data;
};

checkEmail('t***@example.com').then(console.log);

Hey everyone, fake signups and spam accounts are a real problem for any web app. One of the simplest ways to fight them is to block disposable email addresses (like temp-mail, throwaway, etc.).

I built Disposable Email Detector - a fast, free API that checks if an email is disposable, temporary, or fake.

What It Does

  • Checks email syntax and domain validity.
  • Detects disposable/temp-mail email addresses.
  • Uses a database of 160,000+ known disposable domains, updated daily.
  • Also identifies free email providers (Gmail, Yahoo, Outlook).

How to Use It

You can get a free API key on RapidAPI:

https://rapidapi.com/Hamza9777/api/disposable-email-detector11

Once you have your key, here's a simple example in JavaScript:

const checkEmail = async (email) => {
  const response = await fetch(
    https://disposable-email-detector11.p.rapidapi.com/v1/check?email=${email}
    , {
      headers: {
        'X-RapidAPI-Key': 'YOUR_API_KEY',
        'X-RapidAPI-Host': 'disposable-email-detector11.p.rapidapi.com'
      }
    }
  );
  const data = await response.json();
  return data;
};

checkEmail('t***@example.com').then(console.log);

Note: Replace YOUR_API_KEY with your own key from RapidAPI.

Use Cases

  • Signup forms (block fake accounts).
  • Lead validation (keep your CRM clean).
  • Anti-fraud systems.

Links

Feedback

Welcome

I'd love to hear your thoughts and suggestions. Feel free to leave a comment.

Thanks for reading!

Top comments (0)

Read on DEV Community ↗ ← Back to News

Comments

No comments yet. Start the discussion.