Node.js — `@checkharbor/node`

TypeScript-first, zero-dependency (Node 18+ global fetch).

Install

npm install @checkharbor/node

Usage

import { Checkharbor, CheckharborError } from "@checkharbor/node";

const checkharbor = new Checkharbor({
  apiKey: process.env.CHECKHARBOR_API_KEY!,
  // baseUrl: "http://localhost:4000", // override for local dev
});

// Email
const email = await checkharbor.validateEmail("john@example.com");

// Phone
const phone = await checkharbor.validatePhone("+905321234567", {
  countryHint: "TR",
  hlr: true,
});

// IP
const ip = await checkharbor.ipIntel("84.17.45.10");

// Unified fraud check
const fraud = await checkharbor.verify({
  email: "john@example.com",
  ip: "84.17.45.10",
});

// Batch
const job = await checkharbor.batch.create({
  type: "email",
  rows: ["a@example.com", "b@example.com"],
});
const done = await checkharbor.batch.waitUntilDone(job.id);
const csv = await checkharbor.batch.downloadResult(done);

// Error handling
try {
  await checkharbor.validateEmail("x@y.com");
} catch (e) {
  if (e instanceof CheckharborError) {
    console.log(e.code, e.status); // "insufficient_credits" 402
  }
}

Publish to npm

npm login
npm publish --access public

Python — `checkharbor`

Single-file, requests-based, Python 3.9+.

Install

pip install checkharbor

Usage

from checkharbor import Checkharbor, CheckharborError
import os

client = Checkharbor(api_key=os.environ["CHECKHARBOR_API_KEY"])

# Email
email = client.validate_email("john@example.com")

# Phone
phone = client.validate_phone("+905321234567", country_hint="TR", hlr=True)

# IP
ip = client.ip_intel("84.17.45.10")

# Unified
fraud = client.verify(email="john@example.com", ip="84.17.45.10")

# Batch
job = client.batch.create(type="email", rows=["a@example.com", "b@example.com"])
done = client.batch.wait_until_done(job["id"])
csv_content = client.batch.download_result(done)

# Error handling
try:
    result = client.validate_email("x@y.com")
except CheckharborError as e:
    print(e.code, e.status)  # insufficient_credits 402

Publish to PyPI

pip install build twine
python -m build
twine upload dist/*

n8n — `n8n-nodes-checkharbor`

Community node for n8n workflow automation.

Install in n8n

  1. Open n8n → Settings → Community Nodes
  2. Click Install
  3. Enter package name: n8n-nodes-checkharbor
  4. Confirm and restart n8n

Operations

Operation Description
Validate Email Validate a single email (1 credit)
Validate Phone Validate a phone number (1–5 credits)
IP Intel IP intelligence lookup (1 credit)
Verify Unified fraud check (3 credits)

Credentials

Add a Check Harbor API credential:

  • API Key — your chk_live_... key
  • Base URLhttps://api.checkharbor.com (or localhost for dev)

Publish to npm

cd sdk/n8n-nodes-checkharbor
npm login
npm publish --access public