Skip to main content

langchain-verifly

LangChain integration for Verifly — agent-native email verification.

langchain-verifly gives any LangChain agent a single, well-described tool to check whether an email address is real and deliverable before it sends a message or accepts a signup. It wraps the Verifly verification API and returns a clean, structured verdict (deliverable / undeliverable / risky), the reason, a confidence score, and an actionable send-or-reject recommendation.

Installation

pip install -U langchain-verifly

Setup

Set your Verifly API key in the environment. You can self-onboard for a key (with free credits) at verifly.email.

export VERIFLY_API_KEY="vf_..."

Tool: VeriflyEmailVerifier

A LangChain BaseTool with both sync and async support.

from langchain_verifly import VeriflyEmailVerifier

verifier = VeriflyEmailVerifier()  # reads VERIFLY_API_KEY from the environment

verifier.invoke({"email": "lead@example.com"})
{
    "email": "lead@example.com",
    "result": "deliverable",
    "reason": "Mailbox exists",
    "confidence": 95,
    "is_valid": True,
    "recommendation": "send",
    "did_you_mean": None,
    "details": {
        "syntax_valid": True,
        "domain_exists": True,
        "mx_records": True,
        "smtp_valid": True,
        "is_disposable": False,
        "is_role_account": False,
        "is_catch_all": False,
        "is_free_provider": False,
        "provider": "example.com",
    },
}

Async works too:

await verifier.ainvoke({"email": "lead@example.com"})

You can also pass the key explicitly instead of using the environment variable:

verifier = VeriflyEmailVerifier(api_key="vf_...")

Use it in an agent

from langchain.agents import create_react_agent  # or any agent constructor
from langchain_verifly import VeriflyEmailVerifier

tools = [VeriflyEmailVerifier()]
# ... wire `tools` into your agent / model.bind_tools(tools) as usual

The agent can now verify an address on its own — for example, scrubbing a lead list, validating a user-supplied email at signup, or confirming a contact before drafting an outreach email.

Verdict fields

Field Meaning
result deliverable, undeliverable, or risky
reason Human-readable explanation of the verdict
confidence Confidence score, 0–100
is_valid Whether the address is considered valid/usable
recommendation send, do_not_send, or risky
did_you_mean A suggested correction for likely typos, if any
details Syntax / domain / MX / SMTP / disposable / role / catch-all / free-provider flags

License

MIT

Release files for langchain-verifly 0.1.0

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

Source distribution (sdist)

Source distribution for langchain-verifly 0.1.0
File Size Uploaded
langchain_verifly-0.1.0.tar.gz 6.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for langchain-verifly 0.1.0
File Interpreter ABI Platform
langchain_verifly-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 12.6 kB

Release files / langchain_verifly-0.1.0.tar.gz

Download URL langchain_verifly-0.1.0.tar.gz
Size 6.3 kB
Tags Source
SHA-256 checksum
How to use checksums
bc82a0e5c58745d3f2941fd113fa59bbdf124def6df8c2c5e767be6346d6cee4
BLAKE2b-256 checksum
How to use checksums
4620fa0c61dd5b2830620998f5d47c1b46639ba897f36f41b9a38ea454050297
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.10.12

Release files / langchain_verifly-0.1.0-py3-none-any.whl

Download URL langchain_verifly-0.1.0-py3-none-any.whl
Size 6.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
dee0ff04234e5edb78f9abd33d8af67234b1f5e687d38d16e7479719b49a041d
BLAKE2b-256 checksum
How to use checksums
9ad40f018c0fa7842390fe02129780668d554659bcb1dbd9849e49da6996c52b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.10.12

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

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