Skip to content

About

Official LeadMagic SDK for JavaScript and TypeScript. Validate emails and look up companies from your server, with a Next.js route handler and a React hook for forms.

Topics

Resources

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

LeadMagic for JavaScript

npm CI License: MIT

The official LeadMagic SDK for JavaScript and TypeScript. Validate emails and look up companies from your server, and add email validation to a Next.js form in three files.

npm install leadmagic
import { validateEmail } from "leadmagic";

const { data, error } = await validateEmail("alex@example.com");
if (data) console.log(data.verdict); // "deliverable" | "undeliverable" | "unknown"

Set LEADMAGIC_API_KEY on your server. No key yet? Create an API key.

What is in the package

Import Use it for
leadmagic validateEmail, findCompany and getCredits from any server runtime
leadmagic/next A Route Handler that validates emails for your forms
leadmagic/react useEmailValidation, a headless hook for email fields

It runs on Node.js 20+, Bun, Deno, Cloudflare Workers and Vercel Functions. Types are included, and the package has no runtime dependencies.

Documentation

In this repository

Path
packages/leadmagic The SDK
examples/next-signup A Next.js signup form built with shadcn/ui
registry The email field you install with npx shadcn add

Contributing and security

See CONTRIBUTING.md to set up the repository and send a change. To report a security problem, follow SECURITY.md instead of opening an issue.

License

MIT

About

Official LeadMagic SDK for JavaScript and TypeScript. Validate emails and look up companies from your server, with a Next.js route handler and a React hook for forms.

Topics

Resources

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages