Skip to main content
POST
/
v1
/
web
/
detect
Detect Protection
curl --request POST \
  --url https://api.example.com/v1/web/detect \
  --header 'Content-Type: application/json' \
  --data '
{
  "url": "<string>",
  "timeout": 123,
  "country": "<string>"
}
'
{
  "url": "https://protected-site.com",
  "antibot_systems": [
    {
      "system": "cloudflare_turnstile",
      "confidence": 0.92,
      "details": "Turnstile widget detected in page HTML"
    }
  ],
  "captcha_systems": [],
  "is_blocked": true,
  "blocking_type": "cloudflare",
  "recommendation": "Use browser engine with anti_bot enabled",
  "credits_used": 1,
  "duration_ms": 1240
}
Quickly scan a URL to identify which anti-bot and CAPTCHA systems are in use. Results are cached per domain for 5 minutes — cached hits cost 0 credits.

Request Body

url
string
required
The URL to analyze for anti-bot and CAPTCHA protection systems. Must be a valid HTTP or HTTPS URL.
timeout
integer
default:15000
Request timeout in milliseconds. Range: 100060000.
country
string
ISO 3166-1 alpha-2 country code for proxy geo-targeting. Some sites show different protection depending on the visitor’s location.
{ "country": "US" }

Response

url
string
The analyzed URL.
antibot_systems
array
List of anti-bot systems detected on the page.
captcha_systems
array
List of CAPTCHA systems detected on the page.
is_blocked
boolean
Whether the page is currently showing a blocking/challenge page.
blocking_type
string
Type of blocking detected (e.g., cloudflare, datadome). null if not blocked.
recommendation
string
Suggested scraping strategy based on the detected protection. For example: "Use browser engine with anti_bot enabled".
credits_used
integer
Credits charged for this request. 1 for a fresh scan, 0 for a cached result.
duration_ms
integer
Response time in milliseconds.

Examples

Basic detection

curl -X POST "https://scrapebadger.com/v1/web/detect" \
  -H "x-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"url": "https://example.com"}'

Detect with geo-targeting

{
  "url": "https://region-restricted-site.com",
  "country": "DE",
  "timeout": 20000
}

Error Responses

StatusDescription
400Invalid URL
402Insufficient credits
429Rate limit exceeded
500Unexpected server error
{
  "url": "https://protected-site.com",
  "antibot_systems": [
    {
      "system": "cloudflare_turnstile",
      "confidence": 0.92,
      "details": "Turnstile widget detected in page HTML"
    }
  ],
  "captcha_systems": [],
  "is_blocked": true,
  "blocking_type": "cloudflare",
  "recommendation": "Use browser engine with anti_bot enabled",
  "credits_used": 1,
  "duration_ms": 1240
}