Skip to content

EnrowAPI/email-verifier-python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Email Verifier - Python Library

PyPI version License: MIT GitHub stars Last commit

Verify email addresses for deliverability, catch-all detection, and inbox status. Clean your email lists before sending to reduce bounces and protect your sender reputation.

Powered by Enrow -- works on catch-all domains, only charged for verified results.

Installation

pip install email-verifier

Requires Python 3.8+. Only dependency: httpx.

Simple Usage

from enrow_email_verifier import verify_email, get_verification_result

verification = verify_email(
    api_key="your_api_key",
    email="tcook@apple.com",
)

result = get_verification_result("your_api_key", verification["id"])

print(result["email"])          # tcook@apple.com
print(result["qualification"])  # valid

verify_email returns a verification ID. The verification runs asynchronously -- call get_verification_result to retrieve the result once it's ready. You can also pass a webhook URL to get notified automatically.

Bulk verification

from enrow_email_verifier import verify_emails, get_verification_results

batch = verify_emails(
    api_key="your_api_key",
    emails=[
        "tcook@apple.com",
        "satya@microsoft.com",
        "jensen@nvidia.com",
    ],
)

# batch["batchId"], batch["total"], batch["status"]

results = get_verification_results("your_api_key", batch["batchId"])
# results["results"] -- list of verification result dicts

Up to 5,000 verifications per batch. Pass a webhook URL to get notified when the batch completes.

Error handling

try:
    verify_email(api_key="bad_key", email="test@test.com")
except Exception as e:
    # str(e) contains the API error description
    # Common errors:
    # - "Invalid or missing API key" (401)
    # - "Your credit balance is insufficient." (402)
    # - "Rate limit exceeded" (429)
    print(e)

Getting an API key

Register at app.enrow.io to get your API key. You get 50 free credits (= 200 verifications) with no credit card required.

Each verification costs 0.25 credits. Paid plans start at $17/mo up to $497/mo. See pricing.

Documentation

License

MIT -- see LICENSE for details.

About

Verify email addresses for deliverability with catch-all verification — Python library powered by Enrow

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages