v1.3.9 — Actively maintained

The open-source standard for bot detection.

Identify crawlers, spiders, and bots from any user-agent string. Three methods, zero dependencies, one Composer install.

php interactive shell
> $detect = new CrawlerDetect;
> $detect->isCrawler('');
=
> $detect->getMatches();
= ""
>

What sets it apart

Not another SaaS dashboard. A single PHP class that does one thing and does it well.

Zero network overhead

Pure regex matching against a local signature database. No API calls, no latency penalty, no third-party dependency.

Thousands of signatures

Community-maintained list of known bots, crawlers, and spiders. Updated regularly with new signatures as they appear in the wild.

Three-method API

isCrawler(), getMatches(), and setUserAgent(). That's the entire surface area. Works standalone or with Laravel, Symfony, and Yii.

Interactive demo

See it in action

Drop in any user-agent string and CrawlerDetect will analyse it in real time. Try it — it's instant.

Examples

Up and running in seconds

One Composer command. No config files, no service providers, no setup.

Install
$ composer require jaybizzle/crawler-detect
Usage
PHP
use Jaybizzle\CrawlerDetect\CrawlerDetect;

// Check the current visitor's user-agent
$detect = new CrawlerDetect();

if ($detect->isCrawler()) {
    // It's a bot
}

// Or pass any user-agent string
$detect->isCrawler('Googlebot/2.1'); // true

// Get the name of the matched bot
$detect->getMatches(); // "Googlebot"

Not just PHP

Community ports bring CrawlerDetect to every major language and runtime.