emailprobe-sdk
v0.1.0
Published
Official TypeScript/JavaScript SDK for the EmailProbe disposable email detection API
Maintainers
Readme
@emailprobe/sdk
Official TypeScript/JavaScript SDK for the EmailProbe disposable email detection API.
Install
npm install @emailprobe/sdkQuick Start
import { EmailProbeClient } from '@emailprobe/sdk';
const client = new EmailProbeClient({
apiKey: 'ep_live_your_api_key',
});
// Validate an email
const result = await client.validate('[email protected]');
console.log(result.is_disposable); // true
console.log(result.verdict); // "disposable"
console.log(result.score); // 95
// Check a domain only
const domain = await client.checkDomain('mailinator.com');
console.log(domain.is_disposable); // true
// Get usage stats
const usage = await client.usage();
console.log(`${usage.used}/${usage.monthly_limit} used`);
// Free API — no key needed
const check = await client.isDisposable('guerrillamail.com');
console.log(check.disposable); // trueAPI Reference
new EmailProbeClient(config)
| Option | Type | Default | Description |
|--------|------|---------|-------------|
| apiKey | string | required | Your API key from app.emailprobe.dev |
| baseUrl | string | https://api.emailprobe.dev | API base URL |
| timeout | number | 10000 | Request timeout in ms |
Methods
validate(email: string): Promise<ValidationResult>
Full email validation with disposable detection, MX records, DNS auth, and scoring.
checkDomain(domain: string): Promise<DomainResult>
Domain-only check. Faster — skips local part analysis.
usage(): Promise<UsageResult>
Returns your current plan, usage count, and remaining quota.
isDisposable(domain: string): Promise<DisposableCheckResult>
Free open API. Checks if a domain is disposable. No API key required.
Error Handling
import { EmailProbeClient, RateLimitError, AuthenticationError } from '@emailprobe/sdk';
try {
const result = await client.validate('[email protected]');
} catch (error) {
if (error instanceof RateLimitError) {
console.log(`Rate limited. Retry after ${error.retryAfter}s`);
} else if (error instanceof AuthenticationError) {
console.log('Invalid API key');
}
}Requirements
- Node.js 18+ (uses native
fetch) - Also works in Deno, Bun, and modern browsers
License
MIT
