{"repo":"logocomune/botdetector","free":true,"listed":false,"github":"https://github.com/logocomune/botdetector","clone":"git clone https://github.com/logocomune/botdetector.git","description":"BotDetector is a golang library that detects Bot/Spider/Crawler from user agent","language":"Go","stars":11,"topics":["go","botdetector","user-agent","golang-library","crawler","spider","bots","golang"],"license":"MIT","category":"scrapers-browser-automation","readme_excerpt":"BotDetector BotDetector is a Go library that detects bots, spiders, and crawlers by inspecting HTTP User-Agent strings. It ships with 1446 built-in rules covering all major search engine crawlers (Googlebot, Bingbot, Baiduspider, YandexBot, …), SEO tools, HTTP libraries, and other automated agents. Rules are matched case-insensitively using four strategies: exact match, prefix, suffix, and substring. Installation Requires Go 1.25.6 or later. Quick start Usage in an HTTP handler BotDetector is safe for concurrent use — create a single instance at startup and share it across goroutines. Options New accepts functional options. Multiple options can be combined. WithCache — LRU result cache Enables an LRU cache of the given size. Subsequent calls with the same User-Agent string return the cached result instantly, without re-scanning the rules. WithCache(0) or a negative size returns an error. WithRules — custom rule set Replaces the built-in rules with your own list. Use this when you only want to match a specific set of agents. Note: WithRules replaces all built-in rules. If you need to keep the defaults, use NewWithRules only when building a fully custom detector; otherwise extend via the rule pattern format below. Combining options Options are applied left to right. The most common combination is custom rules together with a cache: Rule syntax All patterns are matched case-insensitively . Pattern Match type Example pattern Matches Does not match ----------- ----------- --------","default_branch":null,"files":null,"tree":[],"storefront":"/r/logocomune","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/logocomune/botdetector/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}