The official Node.js, JavaScript, and TypeScript client for MailAuthGuard — the ultra-fast B2B Email Deliverability, SPF, DKIM, DMARC, BIMI, and MTA-STS health audit engine.
Audits any email domain against RFC 7208, RFC 7489, RFC 6376, BIMI, and Google & Yahoo 2024+ Bulk Sender Deliverability Mandates in under 30 milliseconds.
npm install mailauthguard-clientOr via yarn / pnpm / bun:
yarn add mailauthguard-client
pnpm add mailauthguard-client
bun add mailauthguard-clientGet your free RapidAPI key from MailAuthGuard on RapidAPI Hub.
import { MailAuthGuard } from 'mailauthguard-client';
const client = new MailAuthGuard({
apiKey: process.env.RAPIDAPI_KEY // Your RapidAPI Key
});
// Run a full deliverability audit
const audit = await client.audit('stripe.com');
console.log(`Grade: ${audit.grade}`); // 'A+'
console.log(`Score: ${audit.score}/100`); // 98/100
console.log(`Google/Yahoo Compliant: ${audit.google_yahoo_compliant}`); // true
console.log(`SPF Status: ${audit.spf.status}`); // 'valid'
console.log(`DMARC Policy: ${audit.dmarc.policy}`); // 'reject'Analyzes SPF, DMARC, DKIM, BIMI, MTA-STS, and MX records simultaneously, computing an aggregate health score (0–100) and letter grade (A+ to F).
const report = await client.audit('github.com', 'selector1');
console.log(report.recommendations);Checks DNS SPF records, validates syntax, calculates DNS query lookup depth (enforces the RFC 7208 10-lookup limit), and flags missing mechanisms.
const spf = await client.checkSpf('airbnb.com');
console.log(spf.lookup_count); // e.g. 4 (within 10-lookup limit)Validates DMARC records, reports strictness (reject, quarantine, none), extracts aggregate forensic reporting mailboxes (rua), and verifies alignment with 2024 Google/Yahoo inbox rules.
const dmarc = await client.checkDmarc('shopify.com');
console.log(dmarc.policy); // 'reject'Queries selector public keys, verifies 1024-bit vs 2048-bit security, and flags legacy weak encryption keys.
const dkim = await client.checkDkim('google.com', '20230601');
console.log(dkim.key_length); // 2048Validates Brand Indicators for Message Identification (BIMI) DNS records, SVG icon assets, and VMC (Verified Mark Certificates) to display brand logos directly in Gmail, Yahoo, and Apple Mail.
const bimi = await client.checkBimi('cnn.com');
console.log(bimi.logo_url);Audit up to 25 domains in parallel with a single API request:
const batch = await client.batchAudit([
{ domain: 'stripe.com' },
{ domain: 'uber.com' },
{ domain: 'notion.so' }
]);
console.log(`Audited ${batch.total} domains in ${batch.duration_ms}ms`);MIT © NexusGrid