Skip to content
NoSkrap logoNext.js · TypeScript · Bot-risk scoring

Protect Next.js routes without guessing who is human

NoSkrap gives every request an explainable risk score. Start by watching traffic, then challenge or block the routes that bots make expensive.

bun add noskrap

Built for the messy middle between allow and block

Start in observe mode

Ship the proxy without blocking anyone. Watch scores, reasons, and cookies before you enforce.

See why traffic scored

Each decision carries stable rule ids, so logs explain what changed instead of saying bot magic.

Protect noisy endpoints

Apply checks where scraping hurts: search, login, checkout, and other expensive routes.

Challenge without lock-in

Use your own check page or CAPTCHA provider, then issue a short-lived signed pass.

Ask for coarse signals

Record recent interaction timestamps, not full event streams.

Tell users what happened

Show a simple bot-detected popup, or wire the helper into your own toast or modal.

Quickstart

Next.js 16: proxy.ts with the proxy export. Next.js 15: middleware.ts with the middleware export. Use shared storage in production.

import { createNoSkrapProxy } from "noskrap/next";

export const config = {
  matcher: ["/((?!_next/static|_next/image|favicon.ico).*)"],
};

export const proxy = createNoSkrapProxy({
  secret: process.env.NOSKRAP_SECRET!,
  protectedRoutes: ["/api/search", "/login", "/checkout"],
});