Express
See which AI agents crawl your Express app
One line in your app. Unlike a frontend framework's middleware, this one sees the response — so you also find out what agents asked for and didn't get.
Why you can't see them today
If you serve an API or a server-rendered app from Express, your analytics is whatever runs in the browser — and for a lot of Express services there's no browser at all. Agent requests land in your access log and nowhere else. You already have the data; nothing is reading it for agents.
The reason there's no script tag to paste. AI agents don't execute JavaScript. Every analytics tool you already run is a browser tag, so it never fires for an agent — which is why your dashboards show none of this traffic. The only way to see it is server-side, at the edge, or in your logs.
See yours before you install anything
Check my log free →Install: Middleware
- Install the collector. Dependency-free and MIT licensed.
npm i @pickrate/collector - Add the middleware. As early as you can, before your routes — anything registered before it won't be seen.
import express from "express"; import { middleware } from "@pickrate/collector/node"; const app = express(); app.use(middleware); - Set your key. Add PICKRATE_KEY to your environment with a secret (sk_) key from Pickrate Settings. With no key set the middleware is a no-op, so you can deploy it before configuring anything.
Gotchas worth knowing first
Register it before your routes
It must be a secret key, not a publishable one
Mounted routers are handled, but know why it matters
Registering it twice double-counts — so it doesn't
Questions
Does this slow down my app?
Why does this see 404s when the Next.js middleware doesn't?
Does it work with Fastify, Koa, or Hono?
What about a plain node:http server with no framework?
Other setups
- Track AI agent traffic in Next.js — One line, any host. Doesn't see response status — middleware runs before the response.
- Track AI agent traffic with a Cloudflare Worker — Goes in front of any origin. The only option when you don't control the codebase.
- All install options — the full chooser, including pasting a log with no install at all.
- Developer reference — every method in one place.