npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@tempmailchecker/node-sdk

v1.0.0

Published

Node.js SDK for TempMailChecker API - Detect disposable email addresses in real-time

Readme

TempMailChecker Node.js SDK

Latest Release License Node Version GitHub stars

Detect disposable email addresses in real-time with the TempMailChecker API. Block fake signups, prevent spam, and protect your platform from abuse.

🚀 Quick Start

Installation

npm install @tempmailchecker/node-sdk
# or
yarn add @tempmailchecker/node-sdk
# or
pnpm add @tempmailchecker/node-sdk

Basic Usage

import TempMailChecker from '@tempmailchecker/node-sdk';

// Initialize with your API key
const checker = new TempMailChecker('your_api_key_here');

// Check if an email is disposable
const isDisposable = await checker.isDisposable('[email protected]');

if (isDisposable) {
  console.log('Blocked: This is a disposable email');
} else {
  console.log('Valid: This is a legitimate email');
}

📖 Documentation

Check Email Address

const checker = new TempMailChecker('your_api_key');

// Simple boolean check
const isDisposable = await checker.isDisposable('[email protected]');

// Get full response
const result = await checker.check('[email protected]');
// Returns: { temp: false }

Check Domain

// Check just the domain
const isDisposable = await checker.isDisposableDomain('tempmail.com');

// Get full response
const result = await checker.checkDomain('guerrillamail.com');

Regional Endpoints

Use regional endpoints for lower latency. All endpoints use /check and /usage directly (no /api prefix):

import TempMailChecker, { ENDPOINT_EU, ENDPOINT_US, ENDPOINT_ASIA } from '@tempmailchecker/node-sdk';

// EU endpoint (default)
const checker = new TempMailChecker('your_api_key');
// or explicitly:
const checker = new TempMailChecker('your_api_key', { endpoint: ENDPOINT_EU });

// US endpoint
const checker = new TempMailChecker('your_api_key', { endpoint: ENDPOINT_US });

// Asia endpoint
const checker = new TempMailChecker('your_api_key', { endpoint: ENDPOINT_ASIA });

Check Usage

const usage = await checker.getUsage();
// Returns: { usage_today: 15, limit: 25, reset: 'midnight UTC' }

Error Handling

import TempMailChecker from '@tempmailchecker/node-sdk';

try {
  const isDisposable = await checker.isDisposable('[email protected]');
} catch (error) {
  if (error.message.includes('Rate limit')) {
    // Handle rate limit
  } else {
    // Handle other errors
    console.error('Error:', error.message);
  }
}

🎯 Use Cases

  • Block Fake Signups: Stop disposable emails at registration
  • Prevent Promo Abuse: Protect referral programs and coupons
  • Clean Email Lists: Remove throwaway addresses from newsletters
  • Reduce Spam: Filter out disposable emails in contact forms
  • Protect Communities: Ensure real users in forums and chat

⚡ Features

  • Simple API: One method call, one boolean response
  • Fast: Sub-millisecond processing, ~70ms real-world latency
  • Massive Database: 277,000+ disposable email domains
  • Auto-Updates: Database updated daily automatically
  • Regional Endpoints: US, EU, and Asia for optimal performance
  • TypeScript Support: Full type definitions included
  • Free Tier: 25 requests/day, no credit card required

🔑 Get Your API Key

  1. Sign up at tempmailchecker.com
  2. Get 25 free requests per day
  3. Start blocking disposable emails immediately

📚 Examples

Express.js Integration

import express from 'express';
import TempMailChecker from '@tempmailchecker/node-sdk';

const app = express();
const checker = new TempMailChecker(process.env.TEMPMAILCHECKER_API_KEY);

app.post('/signup', async (req, res) => {
  const { email } = req.body;

  try {
    if (await checker.isDisposable(email)) {
      return res.status(400).json({ 
        error: 'Disposable email addresses are not allowed' 
      });
    }

    // Proceed with signup
    // ...
  } catch (error) {
    console.error('TempMailChecker error:', error);
    // Fail open - allow signup on API error
  }
});

Next.js API Route

// pages/api/validate-email.js
import TempMailChecker from '@tempmailchecker/node-sdk';

const checker = new TempMailChecker(process.env.TEMPMAILCHECKER_API_KEY);

export default async function handler(req, res) {
  if (req.method !== 'POST') {
    return res.status(405).json({ error: 'Method not allowed' });
  }

  const { email } = req.body;

  try {
    const isDisposable = await checker.isDisposable(email);
    res.status(200).json({ isDisposable });
  } catch (error) {
    res.status(500).json({ error: error.message });
  }
}

NestJS Service

import { Injectable } from '@nestjs/common';
import TempMailChecker from '@tempmailchecker/node-sdk';

@Injectable()
export class EmailValidationService {
  private checker: TempMailChecker;

  constructor() {
    this.checker = new TempMailChecker(process.env.TEMPMAILCHECKER_API_KEY);
  }

  async validateEmail(email: string): Promise<boolean> {
    try {
      return !(await this.checker.isDisposable(email));
    } catch (error) {
      // Log error and allow email (fail open)
      console.warn('TempMailChecker API error:', error);
      return true;
    }
  }
}

🛠️ Requirements

  • Node.js 14.0 or higher
  • npm, yarn, or pnpm

📝 License

This library is open-source software licensed under the MIT License.

🤝 Support

⭐ Why TempMailChecker?

  • 277,000+ domains in our database
  • Sub-millisecond API processing
  • ~70ms latency from global endpoints
  • Auto-updates daily
  • Free tier with 25 requests/day
  • TypeScript support out of the box

Made with ❤️ by TempMailChecker