← Back to Documentations

User Agent Parse API

Parse user agent strings into browser, operating system, device, engine, and bot details.

V1

/api/v1

First stable version for best-effort user agent parsing.

GET /api/v1/user-agent/parse Auth Required
Parse User Agent

Parses a user agent string and returns browser, OS, device type, rendering engine, and bot detection details.

Authentication
X-Api-Key: your_api_key
Query Parameters
Name Type Required Example Description
user_agent string optional Mozilla/5.0 (iPhone; CPU iPhone OS 17_4 like Mac OS X)... Optional user agent override. If omitted, the API parses the request User-Agent header.
Request Example
GET /api/v1/user-agent/parse
X-Api-Key: your_api_key
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/135.0.0.0 Safari/537.36
Response Example
{
    "success": true,
    "message": "User agent parsed successfully.",
    "data": {
        "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/135.0.0.0 Safari/537.36",
        "is_bot": false,
        "bot_name": null,
        "browser": {
            "name": "Chrome",
            "version": "135.0.0.0"
        },
        "operating_system": {
            "name": "Windows",
            "version": "10.0"
        },
        "device": {
            "type": "desktop",
            "brand": null,
            "model": null,
            "is_mobile": false,
            "is_tablet": false,
            "is_desktop": true
        },
        "rendering_engine": {
            "name": "Blink",
            "version": null
        },
        "note": "User agent parsing is best-effort and depends on the information exposed by the client."
    }
}
Error Response
{
    "success": false,
    "message": "The user agent field is required when the User-Agent header is missing.",
    "error_code": "VALIDATION_ERROR"
}