Skip to main content
Prefer to wire it in yourself? Install the package directly. To have your agent do this instead, see the Quickstart.
1

Install the package

It has no dependencies and runs anywhere fetch does: Node 20.10+, Bun, Deno, Cloudflare Workers and Vercel Edge.
2

Classify a user agent

The user agent alone is enough for logs and quick checks.
3

Classify a full request

Pass the request headers and the real client IP to unlock header checks and verification:
A spoofed crawler now comes back as an impersonator:
4

Act on the category

See Categories for what each value means.
On Cloudflare Workers, load IP ranges inside the request handler rather than at the top of the module. Workers don’t allow fetch at global scope. See Request-time classification.