NestJS · First-party SDK

Half your Nest API’s traffic isn’t human.
Do you know what it did?

One module in your root imports. It runs ahead of the whole Nest pipeline, so it sees every request - including the ones your controllers never do.

Source: Imperva 2026 Bad Bot Report

npm i @apitraffic/nestjs

// app.module.ts
import { Module } from '@nestjs/common';
import { ApiTrafficModule } from '@apitraffic/nestjs';

@Module({
  imports: [
    ApiTrafficModule.forRoot({
      token: process.env.API_TRAFFIC_TOKEN,
      bucket: process.env.API_TRAFFIC_BUCKET,
    }),
  ],
})
export class AppModule {}
Global: import it once, in the root module. Works on the Express and the Fastify platform alike.

@apitraffic/nestjs records each request with the route Nest matched, global prefix and version included, and the firewall runs ahead of your guards, enabled from your account like everywhere else. tag(), trace() and span() work in guards, interceptors, pipes and middleware as well as in your controllers, and app.close() delivers what was captured before the process exits.

Node 20+ · types included · read the middleware source

NestJS

What this looks like in Nest

An interceptor is not the right layer for this

Interceptors run inside the Nest request pipeline, which means they run after guards have rejected, after the router has failed to match, and not at all for anything that never reaches a controller. The module records the request before any of that happens.

Guards and middleware reject before your controller exists

The 401s and 403s your guards and auth middleware produce are traffic worth looking at - a key probing endpoints it has never touched shows up here first. They are recorded with their final status and whatever your guard tagged.

Express or Fastify - the same import

Nest runs on either. The module finds the platform you chose and records it the way our Express or Fastify integration would; nothing in main.ts changes, and neither does anything downstream.

The record

Every Nest request, with its queries and its verdict attached

One pass through one middleware: the payload, every query and outbound call it caused, and the firewall's decision - on one record, watched for incidents, drift and regressions.

Pricing

Simple, published pricing

Every plan and what it includes, read live from our billing system - with a free trial and no credit card to start.

Solo

$79per month
Start free trial

Retention: 30 days of request history

Usage & limits

  • 1M requests · Captured requests (then $5.00 per 1,000 requests)
  • 5 records/s · Ingest rate
  • 5 buckets · Buckets
  • 2 environments · Environments
  • 1 seat · Team members
  • Unlimited · API tokens

Logging & search

  • 30 days · Retention window
  • Collections
  • Saved stream views
  • 10 views · Saved views per account
  • Custom reports
  • 5 keys · Promoted tag keys
  • Unlimited · Exclusion rules
  • Unlimited · Custom redaction rules

APM & performance

  • Deploy & incident markers
  • 10 rules · Endpoint rules

Host telemetry

  • Host telemetry
  • Unlimited · Reporting servers
  • Unlimited · Host samples

Firewall

  • Web application firewall
  • 2 policies · WAF policies per account

Embeds & sharing

  • 10 reports and dashboards · Embedded reports and dashboards
  • Share links

AI & MCP

  • AI diagnoses

Alerts & drift

  • Alerting
  • 1 channel · Alert channels
  • Certificate monitoring
  • 5 hosts · Monitored certificate hosts
  • Outbound destination watch

Integrations

  • Git integration
  • 5 repositories · Linked repositories

Business

$899per month
Start free trial

Retention: 360 days of request history

Usage & limits

  • 25M requests · Captured requests (then $5.00 per 1,000 requests)
  • 20 records/s · Ingest rate
  • 100 buckets · Buckets
  • 100 environments · Environments
  • Unlimited · Team members
  • Unlimited · API tokens

Logging & search

  • 360 days · Retention window
  • Collections
  • Saved stream views
  • Unlimited · Saved views per account
  • Custom reports
  • 50 keys · Promoted tag keys
  • Unlimited · Exclusion rules
  • Unlimited · Custom redaction rules

APM & performance

  • APM
  • Deploy & incident markers
  • Unlimited · Endpoint rules

Host telemetry

  • Host telemetry

Firewall

  • Web application firewall
  • Unlimited · WAF policies per account

Embeds & sharing

  • Embeds
  • Unlimited · Embedded reports and dashboards
  • Share links

AI & MCP

  • AI diagnoses
  • MCP server
  • MCP request replay

Alerts & drift

  • Alerting
  • Unlimited · Alert channels
  • API drift detection
  • Attention signals
  • Certificate monitoring
  • Unlimited · Monitored certificate hosts
  • Outbound destination watch

Integrations

  • Git integration
  • Unlimited · Linked repositories

Compare all plan features

Every plan starts with a 7-day free trial - no credit card to begin, and nothing is charged unless you choose a plan.

Prices in the currency shown, excluding tax. Overage is billed per unit and rounded to the cent on the invoice.

Objections

The questions we actually get

Know what your API did - before your customers tell you.

One npm install and one line of code. Your first requests arrive in minutes, with their queries, their firewall verdict and a baseline for every endpoint already building.

Free trial · No credit card · Set up in minutes