@axmion/mailpattern
v1.0.7
Published
Predict, validate, and enrich business emails. Free tier supported, RapidAPI key for premium tiers at https://bit.ly/mailpattern.
Maintainers
Readme
📨 @axmion/mailpattern
Predict, validate, and enrich business emails — built for developers, B2B tools, and CRMs. Supports both Free tier (no API key) and Premium tier (via RapidAPI key).
🚀 Features
- 🔍 Predict likely email formats for any company domain
- ✅ Validate email deliverability (syntax + MX record)
- 🏢 Guess company industry from its domain
- ⚙️ Works instantly for Free tier (no key required)
- 🔑 Supports RapidAPI keys (https://bit.ly/mailpattern) for higher request limits and premium reliability
📦 Installation
npm install @axmion/mailpattern🧠 Usage Examples
import { predict, validate, industry } from "@axmion/mailpattern";
// ===== Free Tier (No API Key Needed) =====
try {
const freeRes = await predict({
domain: "hubspot.com",
first: "Megan",
last: "Turner"
});
console.log(freeRes);
} catch (error) {
console.error("Free Tier Test Error:", error);
}
// ===== Paid Tier (with RapidAPI Key) =====
try {
const paidRes = await predict(
{ domain: "hubspot.com" },
"YOUR_RAPIDAPI_KEY"
);
console.log(paidRes);
} catch (error) {
console.error("Paid Tier Test Error:", error);
}
// ===== Validate an Email =====
try {
const validation = await validate({ email: "[email protected]" });
console.log(validation);
} catch (error) {
console.error("Validate Email Error:", error);
}
// ===== Guess Company Industry =====
try {
const industryInfo = await industry({ domain: "solarpowerpros.com" });
console.log(industryInfo);
} catch (error) {
console.error("Guess Industry Error:", error);
}
🔍 API Methods & Responses
1️⃣ predict()
Purpose: Predict the most likely email patterns for a given domain. Uses heuristic scoring, DNS MX checks, and common corporate naming conventions.
Example Response — Without first & *last:
{
"domain": "hubspot.com",
"patterns": [
"{first}.{last}@hubspot.com",
"{first}@hubspot.com",
"{f}{last}@hubspot.com"
],
"most_common": "[email protected]",
"confidence": 0.94
}Example Response — With first & *last:
{
"domain": "hubspot.com",
"patterns": [
"{f}.{last}@hubspot.com",
"{first}.{last}@hubspot.com",
"{f}{last}@hubspot.com"
],
"most_common": "[email protected]",
"confidence": 0.8,
"meta": {
"generatedAt": "2025-11-06T20:37:18.946Z",
"engine": "heuristic_v5",
"input": { "first": "Megan", "last": "Turner" },
"realizedExamples": [
"[email protected]",
"[email protected]",
"[email protected]",
"[email protected]",
"[email protected]"
],
"cached": false
}
}2️⃣ validate()
Purpose: Validate whether an email address is likely deliverable. Checks both:
- ✅ Syntax format (RFC-compliant)
- 📬 MX record presence (active mail server)
Example Response
{
"email": "[email protected]",
"valid_format": true,
"domain": "hubspot.com",
"mx_found": true
}Tip:
- Use predict() first to generate potential contacts → Then validate() to confirm deliverability.
3️⃣ industry()
Purpose: Guess a company’s industry from its domain. Useful for CRM enrichment, segmentation, and lead scoring.
Example Response
{
"domain": "solarpowerpros.com",
"industry": "Energy"
}🧩 Tiers & Access
| Tier | Description | Auth | Monthly Limit | | ------------- | -------------------------- | ------------ | ------------------- | | Free Tier | Works instantly (no setup) | None | 1,000 reqs / month | | Paid Tier | Hosted via RapidAPI | RapidAPI Key | Up to 100,000+ reqs |
📄 License
MIT License © 2025 Axmion
