User Agent Check API
The User Agent Check API parses raw HTTP User-Agent headers against a database of malicious patterns. The endpoint classifies the traffic and returns detailed metadata about the scanner, crawler, or tool if it detects a match. Use this endpoint to dynamically block reconnaissance tools and vulnerability scanners at the edge.
Endpoint
curl -X GET "https://ip-shield.riavzon.com/api/v1/check/user-agent/Nmap%20Scripting%20Engine%207.92" \
-H "x-api-key: YOUR_API_KEY"
The Nmap%20Scripting%20Engine%207.92 parameter in the URL path represents the URL-encoded User-Agent string you want to check.
Clean Response Example
When the API determines the User-Agent is safe, it returns a minimal payload indicating the check passed.
HTTP/1.1 200 OK
Content-Type: application/json
{
"ok": true,
"date": "2025-06-12T00:00:00.000Z",
"data": {
"clean": true
},
"meta": {
"total_credits": 10000,
"credits_remaining": 9999
}
}
Malicious Response Example
When the API detects a malicious or suspicious tool, it returns comprehensive data about the matched signature.
HTTP/1.1 200 OK
Content-Type: application/json
{
"ok": true,
"date": "2025-06-12T00:00:00.000Z",
"data": {
"useragent": "Nmap Scripting Engine 7.92",
"useragent_rx": "^Nmap Scripting Engine.*",
"description": "Nmap Network Mapper",
"tool": "Scanner",
"category": "Reconnaissance",
"link": "https://nmap.org/",
"priority": "high",
"severity": "critical"
},
"meta": {
"total_credits": 10000,
"credits_remaining": 9999
}
}
Response Fields
true when the request succeeds.true only if the User-Agent is benign, omitting the threat metadata.none, low, medium, high, critical).none, low, medium, high, critical).Error Response
Error responses, such as bad requests or rate limits, return the following JSON format.
HTTP/1.1 400 Bad Request
Content-Type: application/json
{
"ok": false,
"date": "2025-06-12T00:00:00.000Z",
"reason": "Missing user-agent parameter"
}
Error Fields
false for error responses.