JavaScript Spam Protection API

One fetch() Call. Spam Solved.

ActiveLayer is a server-side REST API that returns spam verdicts in milliseconds. No CAPTCHAs. No npm bloat. Works with fetch, axios, or any HTTP client across Node.js, Deno, and Bun. Protect every form and endpoint with a single API call.

  • Millisecond response times
  • 99.5%+ accuracy
  • ActiveLayer checks submissions through its API and returns a spam verdict.
  • 200 free checks (one-time)
JavaScriptSpam protection enabled
await fetch(“/v1/check”, { method: “POST” })
Node · Deno · BunSame call
Your API key never shipsServer-side

Built by the Same Team Whose Software is Trusted by
30,000,000+ Websites Worldwide.

WPForms AIOSEO MonsterInsights OptinMonster WP Mail SMTP SeedProd

Everything You Need to Stop Spam in JavaScript

fetch and axios Ready

Use the native Fetch API, axios, got, undici, or any HTTP client you prefer. One POST request. Standard JSON in, JSON out. No proprietary SDK required.

npm Package Available

Install the official ActiveLayer package from npm for a streamlined integration. Or skip it entirely and use raw fetch. Your choice, zero lock-in.

ESM and CommonJS Support

Import with `import` or `require`. ActiveLayer works with ES modules and CommonJS. No build configuration needed. No bundler headaches.

Millisecond Response

Spam verdicts return faster than your database queries. Your users never notice the check. Your API stays fast and your event loop stays unblocked.

Serverless Native

Works on Vercel Functions, AWS Lambda, Cloudflare Workers, and any serverless platform. Stateless, no persistent connections, no cold start penalties.

Deno and Bun Compatible

Not locked into Node.js. ActiveLayer is a standard REST API that works identically in Deno, Bun, and any JavaScript runtime that supports fetch.

Full Detection Transparency

Every response includes a confidence score and detection signals. Log them, build custom logic, or display them in your admin dashboard.

Automatic Fallbacks

Wrap the call in try/catch. If ActiveLayer is unreachable, submissions pass through. Your app never breaks because of spam protection.

Unlimited Sites and Apps

One API key works across every JavaScript app you build. No per-domain restrictions. No per-project licensing. No per-framework packages.

Three Steps. One API Call. Spam Gone.

Get Your API Key

Create a free ActiveLayer account. Copy your API key from the dashboard. No credit card required. No approval process. You are ready to integrate immediately.

Add the Spam Check to Your Server

Drop the API call into any server-side route handler. **Important: Always call ActiveLayer from your server, never from client-side JavaScript.** Calling from the browser would expose your API key. Here are two approaches.

Protect Your Routes

Use the spam check in any server-side handler. The pattern is the same whether you use Express, Next.js, NestJS, Deno, or Bun. Here is a simple Express example.

Why JavaScript Developers Choose ActiveLayer

The spam protection that fits how you already build.

Never Expose Secrets in the Browser. Pure Server-Side Protection.

ActiveLayer is a server-side API — you call it from Node.js, Deno, Bun, or a serverless function, never from client-side JavaScript. Your API key never ships to the browser, and your spam check can’t be bypassed by disabling JavaScript. Compare that to reCAPTCHA, which loads 300KB+ of scripts into your frontend, adds cookies and tracking, and can still be bypassed by sophisticated bots. ActiveLayer runs where your users can’t see it, tamper with it, or work around it.

Get Started for Free
Browserno key, no SDK
Your serverkey stays here
Verdict returned to your codeserver-side
Nothing exposed to the clientno secrets
A developer working server-sideKey never shipsNo CAPTCHA puzzle

Node.js, Deno, Bun. Same fetch() Call. Same Results.

ActiveLayer is not tied to Node.js or npm — it’s a standard REST API that works with the Fetch API built into every modern JavaScript runtime. You write the same code whether you’re on Node.js 18+, Deno, or Bun. When you migrate from Express to Hono, Node.js to Bun, or a traditional server to Cloudflare Workers, your spam protection code doesn’t change. One integration, every runtime, zero migration cost.

Get Started for Free
const v = await fetch(“https://api.activelayer.com/v1/check”, {
  method: “POST”, body: JSON.stringify({ content })
});
Node.js 18+same call
Denosame call
Bunsame call
Not tied to npm
Standard Fetch APIbuilt into every modern runtime

Vercel. AWS Lambda. Cloudflare Workers. No Cold Start Penalties.

ActiveLayer is stateless — every request is independent, with no persistent connections, no WebSocket channels, and no warm-up requirements. Cold starts don’t affect it because there’s nothing to initialize: no SDK to bootstrap, no connection pool to establish, just one HTTP POST that completes in milliseconds. Whether you deploy on Vercel Functions, AWS Lambda, Cloudflare Workers, or Netlify Edge Functions, the integration is the same single fetch call.

Get Started for Free
Stateless — nothing to warm up
Vercelno penalty
AWS Lambdano penalty
Cloudflare Workersno penalty
Long-running serverno penalty
Every request is independent
Persistent connectionsnone
Cold start costnothing to initialise

Stop Maintaining 4 Packages to Do 1 Job.

Right now your spam protection is probably a rate limiter, a custom honeypot, a regex blocklist from GitHub, and reCAPTCHA as a last resort — four dependencies, four things that can break or fall out of date. ActiveLayer replaces all of them with a single API call that analyzes content patterns, email reputation, IP signals, and behavioral data together. One check, one verdict, one dependency. Built by Awesome Motive, the team behind 30,000,000+ websites, it’s maintained, monitored, and continuously improved.

Get Started for Free
Four dependencies doing one job
express-rate-limitrate limiter
custom honeypothomegrown
regex blocklistcopied from GitHub
react-google-recaptchalast resort
ActiveLayer 1 call
One dependency, one changelog, one thing that can break.

Frequently Asked Questions

No. ActiveLayer is a server-side API. Calling it from the browser would expose your API key in the network tab. Always call ActiveLayer from your Node.js server, Deno backend, Bun process, or serverless function. Your server receives the form submission, calls ActiveLayer, and returns the result to the client.

Yes. ActiveLayer is a standard REST API. Both Deno and Bun support the Fetch API natively, so the integration code is identical to Node.js 18+. No runtime-specific adapters or packages needed.

ActiveLayer is a REST API, so it works with any module system. Use `import` with ES modules or `require` with CommonJS. If you use the optional npm package, it ships with both ESM and CJS entry points.

Yes, there is an official npm package for a streamlined integration. But you do not need it. A single fetch or axios call is all it takes. No SDK is required. Use whichever approach fits your project.

It does not add to them. ActiveLayer is a stateless HTTP call with no SDK initialization, no connection pooling, and no warm-up requirements. Your first request after a cold start is just as fast as your hundredth. The API responds in milliseconds regardless of your function’s lifecycle.

Wrap your API call in a try/catch block. If the request fails or times out, let the submission through. Your app never breaks because of spam protection. You can set a custom timeout using AbortController in fetch or the timeout option in axios.

Yes. ActiveLayer works with every JavaScript framework that can make HTTP requests. We have dedicated integration guides for [Express](/integrations/express), [Next.js](/integrations/nextjs), and [NestJS](/integrations/nestjs) with framework-specific code examples and best practices.

Yes. 200 spam checks in total. No credit card required. Full API access with no feature restrictions. When you need more, upgrade to Pro at $19/month for 25,000 checks.

Eliminate Spam. Protect Every Lead.
It’s That Simple.

Join the thousands of website owners, agencies, and developers who use ActiveLayer to stop spam and protect every real submission.

Get Started for Free
  • 200 checks for free
  • Setup in minutes
  • No credit card required