Skip to main content

identify-fake-email

A Python 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

pip install identify-fake-email

Requirements

  • Python 3.7+
  • A RapidAPI key (free tier available — 100 requests/month)

Quick Start

from identify_fake_email.client import EmailValidator

client = EmailValidator("YOUR_RAPIDAPI_KEY")

result = client.validate("user@example.com")
print(f"Valid: {result.valid_email}")
print(f"Name risk: {result.name_risk}")

if result.name_risk > 0.7 or not result.valid_email:
    print("Suspicious - review")
else:
    print("Safe to accept")

Bulk Validation

Validate up to 30 emails per request.

results = client.validate_bulk(["user1@example.com", "user2@example.com"])

for result in results:
    print(f"{result.email}: name_risk={result.name_risk}")

Low-Level Usage

If you need direct access to the underlying SDK:

import identify_fake_email
from identify_fake_email.api.default_api import DefaultApi
from identify_fake_email.configuration import Configuration

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

config = Configuration()
config.host = f"https://{RAPIDAPI_HOST}"

client = DefaultApi(identify_fake_email.ApiClient(config))

result = client.validate_email_validate_get(
    "user@example.com",
    _headers={
        "x-rapidapi-key": RAPIDAPI_KEY,
        "x-rapidapi-host": RAPIDAPI_HOST
    }
)

Response Fields

Field Type Description
email string The email address validated
valid_email_structure bool Whether the email has valid syntax
is_role bool Whether it's a role address (e.g. admin@, support@)
mx_records bool Whether the domain has valid MX records
not_disposable bool Whether the domain is on the disposable blacklist
new_domain bool Whether the domain was recently created
name_risk float (0–1) ML risk score for the username — higher means riskier
domain_risk float (0–1) ML risk score for the domain — higher means riskier
valid_email bool 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
  • The SDK is auto-generated from the OpenAPI spec

License

MIT

Metadata

Release files for identify-fake-email 1.0.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for identify-fake-email 1.0.5
File Size Uploaded Provenance Actions
identify_fake_email-1.0.5.tar.gz 27.6 kB Without provenance Details for identify_fake_email-1.0.5.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for identify-fake-email 1.0.5
File Interpreter ABI Platform Actions
identify_fake_email-1.0.5-py3-none-any.whl Python 3 none any Details for identify_fake_email-1.0.5-py3-none-any.whl

Total release size: 59.2 kB

Release files / identify_fake_email-1.0.5.tar.gz

Download URL identify_fake_email-1.0.5.tar.gz
Size 27.6 kB
Tags Source
SHA-256 checksum
How to use checksums
87964de01f92342642a70fa62fbcc6106426c46cae82abed6387c48e29f90136
BLAKE2b-256 checksum
How to use checksums
8599925d3378147c0cfbd597a406ca07857673065a84fbaf83a93ddd050a10ac
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.9

Release files / identify_fake_email-1.0.5-py3-none-any.whl

Download URL identify_fake_email-1.0.5-py3-none-any.whl
Size 31.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
661209d44ed69d93996fbb0327d2f8379fe8889ff27cd9755325a995cb51e0ff
BLAKE2b-256 checksum
How to use checksums
f04082d716a3d4eea4a0d79f86f8ee30f911e6169971a8036f20be1167abceea
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.9

Security for identify-fake-email 1.0.5

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page