npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

identify-fake-email

v0.1.5

Published

JS API client generated by OpenAPI Generator

Readme

identify-fake-email

A JavaScript SDK for the Email Validator API — ML-powered email validation that goes beyond blacklists.

Most validators rely on MX records, SMTP checks, or static blacklists. This API combines traditional checks with an XGBoost model that scores the risk of accepting an email based on patterns in the username and domain — catching auto-generated disposable emails that traditional methods miss.

Installation

npm install identify-fake-email

or

yarn add identify-fake-email

Requirements

  • Node.js 16+
  • A RapidAPI key (free tier available — 100 requests/month)

Quick Start

const { EmailValidator } = require("identify-fake-email");

const client = new EmailValidator("YOUR_RAPIDAPI_KEY");

async function main() {
    const result = await client.validate("[email protected]");

    console.log(`Valid: ${result.valid_email}`);
    console.log(`Name risk: ${result.name_risk}`);
    console.log(`Domain risk: ${result.domain_risk}`);

    if (result.name_risk > 0.7 || result.domain_risk > 0.7 || !result.valid_email) {
        console.log("Suspicious - reject or review");
    } else {
        console.log("Safe to accept");
    }
}

main();

ES Modules

import { EmailValidator } from "identify-fake-email";

const client = new EmailValidator("YOUR_RAPIDAPI_KEY");

const result = await client.validate("[email protected]");

console.log(result);

Bulk Validation

Validate up to 30 emails per request.

const results = await client.validateBulk([
    "[email protected]",
    "[email protected]"
]);

for (const result of results) {
    console.log(`${result.email}: name_risk=${result.name_risk}, domain_risk=${result.domain_risk}`);
}

Low-Level Usage

If you need direct access to the API:

const axios = require("axios");

const RAPIDAPI_KEY = "YOUR_RAPIDAPI_KEY";
const RAPIDAPI_HOST =
    "email-validator-syntax-mx-disposable-risk-detection.p.rapidapi.com";

async function validateEmail(email) {
    const response = await axios.get(
        `https://${RAPIDAPI_HOST}/validate`,
        {
            params: {
                email
            },
            headers: {
                "x-rapidapi-key": RAPIDAPI_KEY,
                "x-rapidapi-host": RAPIDAPI_HOST
            }
        }
    );

    return response.data;
}

validateEmail("[email protected]")
    .then(console.log)
    .catch(console.error);

Response Fields

| Field | Type | Description | |---|---|---| | email | string | The email address validated | | valid_email_structure | boolean | Whether the email has valid syntax | | is_role | boolean | Whether it's a role address (e.g. admin@, support@) | | mx_records | boolean | Whether the domain has valid MX records | | not_disposable | boolean | Whether the domain is on the disposable blacklist | | new_domain | boolean | Whether the domain was recently created | | name_risk | number (0–1) | ML risk score for the username — higher means riskier | | domain_risk | number (0–1) | ML risk score for the domain — higher means riskier | | valid_email | boolean | Overall validity based on traditional checks |

Risk Scores

name_risk and domain_risk are ML-generated scores between 0 and 1. The higher the score, the more likely the email is fake or disposable.

name_risk is the more reliable of the two — auto-generated usernames follow distinct patterns (random characters, high digit count, unusual consonant/vowel ratios) that the model picks up on. domain_risk is less reliable as auto-generated domains can look similar to legitimate ones.

We recommend using name_risk as your primary signal and combining it with other fields for the most accurate result. The threshold is up to you — 0.7 is a reasonable starting point but you can adjust it for your use case.

Notes

  • SMTP validation is intentionally excluded — disposable emails have real mailboxes so SMTP returns valid, adding latency with no benefit
  • Bulk validation supports up to 30 emails per request
  • Built for both CommonJS and ES Module environments

Links

License

MIT