Identify if a response is an antibot challenge from CloudFlare, Akamai, DataDome, Vercel, PerimeterX, Shape Security, and more, including CAPTCHA providers like reCAPTCHA and hCaptcha.
npm install is-antibot

!Last version


> Identify if a response is an antibot challenge from CloudFlare, Akamai, DataDome, Vercel, and more.
- CloudFlare - Bot management and challenge pages
- Vercel - Attack mode protection
- Akamai - Bot Manager and Web Application Protector
- DataDome - Bot protection with CAPTCHA challenges
- PerimeterX - Behavioral bot detection
- Shape Security - Enterprise bot management
- Kasada - Advanced bot mitigation
- Imperva/Incapsula - Web application firewall
- AWS WAF - Amazon Web Services Web Application Firewall
- reCAPTCHA - Google's CAPTCHA service (v2 and v3)
- hCaptcha - Privacy-focused CAPTCHA alternative
- FunCaptcha - Arkose Labs interactive challenges
- GeeTest - AI-powered CAPTCHA
- Cloudflare Turnstile - Privacy-preserving CAPTCHA alternative
Websites receiving massive quantities of traffic throughout the day, like LinkedIn, Instagram, or YouTube, have sophisticated antibot systems to prevent automated access.
When you try to fetch the HTML of these sites without the right tools, you often hit a 403 Forbidden, 429 Too Many Requests, or a "Please prove you're human" challenge, leaving you with a response that contains no useful data.
is-antibot is a lightweight, vendor-agnostic JavaScript library that identifies when a response is actually an antibot challenge, helping you understand when and why your request was blocked.
``bash`
$ npm install is-antibot --save
The library is designed for evaluating a HTTP response:
`js
const isAntibot = require('is-antibot')
const response = await fetch('https://example.com')
const { detected, provider } = isAntibot(response)
if (detected) {
console.log(Antibot detected: ${provider})`
}
The library expects a Fetch Response object, a Node.js Response object, or an object representing HTTP response headers as input.
You can also pass optional body and url parameters for enhanced detection:
`js`
const result = isAntibot({
headers: response.headers,
body: await response.text(),
url: response.url
})
The library returns an object with the following properties:
- detected (boolean): Whether an antibot challenge was detectedprovider` (string|null): The name of the detected provider (e.g., 'cloudflare', 'recaptcha')
-
is-antibot © microlink.io, released under the MIT License.
Authored and maintained by microlink.io with help from contributors.
> microlink.io · GitHub microlink.io · X @microlinkhq