isbot

Detect bots, crawlers, and spiders from the user agent string with a single call.

Library
npm
v5.2.2
1,160 stars
Unlicense

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum. How we score it →
56 /100 Fair
Development Activity 56
Maintenance 24
Community 56
Maturity 60
Momentum 28

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation. How we score it →
87 /100 Excellent
Architecture 85
Code Quality 86
Innovation 90
Learning Curve 90

isbot is a tiny, zero-dependency JavaScript and TypeScript library that identifies bots, crawlers, and spiders by testing the request’s user agent string against a large, regularly updated pattern list. It exposes a single isBot function plus a family of helpers for matching, customization, and building your own detectors, and runs identically in Node.js, browsers, and edge runtimes.

Rather than trying to unmask malicious bots, isbot focuses on reliably recognising “good bots” that voluntarily identify themselves — search-engine crawlers, previews, scrapers, and monitoring agents. The pattern is compiled from expansive community-maintained data sources and ships with a naive fallback for engines that lack regular-expression lookbehind support.

What You Get

  • A single isBot(userAgent) function returning a boolean for any user agent string
  • A community-maintained, regularly updated pattern list compiled from multiple external data sources
  • Named helpers to find matched substrings and patterns, and to build custom detectors
  • ESM, CommonJS, and UMD/CDN builds that run in Node.js, browsers, and edge runtimes with zero runtime dependencies

Common Use Cases

  • Flagging or excluding bot pageviews in analytics and business reporting
  • Serving cached content or lighter responses to crawlers to relieve service load
  • Omitting third-party tags and pixels for bots to reduce costs
  • Customizing detection to include or exclude specific agents such as Chrome Lighthouse

Under The Hood

Architecture isbot is built around a single lazily-compiled regular expression. src/index.ts imports a large patterns.json substring list and a precomputed fullPattern, then getPattern() compiles that pattern into a case-insensitive RegExp on first use, memoizes it, and falls back to a small naive pattern (/bot|crawl|http|lighthouse|scan|search|spider/i) if the engine cannot compile the full expression (it relies on lookbehind). isBot(userAgent) simply guards for a non-empty string and tests it against the pattern; helper exports like findBotMatch, findBotPatterns, createIsBotFromList, and legacy aliases are thin functions over the same list and regex. src/browser.ts attaches isBot to the global object for the UMD/CDN build.

Tech Stack The source is TypeScript targeting Node.js >=18, bundled with tsup into CommonJS, ESM, and a browser global build, with type declarations emitted. There are zero runtime dependencies; devDependencies cover jest and ts-jest for testing, prettier for formatting, pug for the docs page, and a user-agents dataset for test fixtures. Build, test, and format are driven by shell scripts under scripts/.

Code Quality The library is small and strongly typed, with explicit narrowing helpers (isNonEmptyString) and JSDoc on every export. A real test suite lives under tests/ with a spec suite plus committed snapshots and a dedicated efficiency test, and fixtures under fixtures/ exercise real bot and non-bot user agent samples. Accuracy is explicitly managed with documented tolerances for the fallback path (1% false positives, 75% coverage).

API Design The public surface is deliberately ergonomic: the primary path is one intuitively named isBot(userAgent) call, while power users get a coherent family of findBot* introspection helpers and createIsBot/createIsBotFromList factories for custom detection. Naming is consistent, backward-compatibility aliases ease major-version upgrades, and the README documents every named import in a single table with copy-paste examples, so getting started requires essentially no boilerplate.

Used by 23 apps in this directory

TypeScript
76%
AGPL 3.0

Abby

Developer Tools · Product Management

166

Statically typed feature flags, remote config, and A/B testing with framework-native SDKs for TypeScript teams.

View details
31
Repo Health
70
Technical
64
Dependency
Built with
TypeScript 76%
MDX 18%
Updated 1 years ago
TypeScript
100%
Apache 2.0

agentic-inbox

AI Agents · Mcp · Productivity

8,118

A self-hosted email client with an AI agent that reads your inbox, drafts replies automatically, and exposes full email operations over MCP — running entirely on Cloudflare Workers.

View details
31
Repo Health
74
Technical
77
Dependency
Built with
TypeScript 100%
Updated 5 months ago
Rust
67%
MIT

Bun

Developer Tools

96,068

An all-in-one JavaScript and TypeScript toolkit — one Rust-and-JavaScriptCore binary that replaces Node.js, npm, a bundler, and a test runner with faster equivalents.

View details
92
Repo Health
91
Technical
64
Dependency
Built with
Rust 67%
C++ 19%
TypeScript 10%
Updated 5 days ago
TypeScript
96%
Other

Cal.diy

Scheduling

48,697

The 100% MIT-licensed, community-driven scheduling platform — self-host your own booking infrastructure with no enterprise strings attached.

View details
91
Repo Health
86
Technical
65
Dependency
Built with
TypeScript 96%
Updated 6 days ago
TypeScript
45%
Other

Convex Backend

Databases · Developer Tools

12,617

Open-source reactive database that lets developers build live-updating apps with pure TypeScript, strong consistency, and real-time subscriptions—no separate API layer required.

View details
87
Repo Health
82
Technical
68
Dependency
Built with
TypeScript 45%
Rust 43%
Updated 6 days ago
TypeScript
92%
AGPL 3.0

Documenso

Digital Signiture

15,224

Self-hosted, open-source DocuSign alternative with legally binding PDF signatures, multi-party workflows, and a full REST and tRPC API.

View details
93
Repo Health
79
Technical
68
Dependency
Built with
TypeScript 92%
Updated 4 days ago
TypeScript
71%
Other

highlight.io

Analytics · Developer Tools · Monitoring

9,378

Open-source full-stack monitoring that unifies session replay, error tracking, logging, and distributed tracing so you can stop context-switching between tools.

View details
67
Repo Health
78
Technical
65
Dependency
Built with
TypeScript 71%
Go 16%
Updated 1 months ago
TypeScript
99%
MIT

KeystoneJS

CMS · Developer Tools

9,982

The superpowered headless CMS for developers built with GraphQL and React

View details
92
Repo Health
81
Technical
64
Dependency
Built with
TypeScript 99%
Updated 4 days ago
JavaScript
46%
MIT

Kutt

Analytics · Marketing

11,125

Self-hosted URL shortener with custom domains, per-link analytics, and zero build step required.

View details
74
Repo Health
62
Technical
72
Dependency
Built with
JavaScript 46%
Handlebars 24%
HTML 16%
Updated 4 weeks ago

Join founders buildingwith open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on Substack
Join 750+ subscribers