DEV Community

Cover image for Discover The Device Fingerprint & Bot Detection API
Etuge Anselm for Dakidarts

Posted on

Discover The Device Fingerprint & Bot Detection API

Detect unique device/browser fingerprints and identify potential bots or automated tools.
Support POST (JSON body) requests.

Device Fingerprint & Bot Detection API


Base URL

device-fingerprint-bot-detection-api.p.rapidapi.com
Enter fullscreen mode Exit fullscreen mode

Endpoint

πŸ”Ή POST /fingerprint

Generates a fingerprint from custom JSON input.
Supports both snake_case and camelCase keys.

Request Body (JSON)

  • user_agent or userAgent (string, optional) β†’ Browser User-Agent.
  • ip (string, optional) β†’ Client IP address (defaults to request’s remote address).
  • headers (object, optional) β†’ Custom headers dictionary.

Example

curl -X POST http://127.0.0.1:5000/fingerprint \
  -H "Content-Type: application/json" \
  -d '{
        "userAgent": "Mozilla/5.0 (X11; Linux)",
        "ip": "203.0.113.9",
        "headers": {"X-Test-Header":"boom"}
      }'
Enter fullscreen mode Exit fullscreen mode

Response

{
  "fingerprint": "2c9e2a54d6a5f0f6f83b4a88964b94f84b309c1e17c2d4f31cbf10c0f5a1c123",
  "ip": "203.0.113.9",
  "user_agent": "Mozilla/5.0 (X11; Linux)",
  "risk": {
    "risk_score": 0,
    "risk_level": "low",
    "reasons": []
  }
}
Enter fullscreen mode Exit fullscreen mode

πŸ” Risk Detection

Risk score is computed using heuristic rules:

  • Missing User-Agent β†’ +40
  • Suspicious UA keywords (headless, puppeteer, selenium, etc.) β†’ +50
  • AJAX automation header (X-Requested-With: XMLHttpRequest) β†’ +20
  • Proxy headers (X-Forwarded-For, CF-Connecting-IP) β†’ flagged in reasons

Risk Levels

  • low β†’ 0–29
  • medium β†’ 30–69
  • high β†’ 70+

Top comments (0)