User Agent Parser

The /user_agent endpoint parses the provided user agent string and returns only the important data.

Method: POST

To make a request, semd the required parameters to the /user_agent endpoint via POST method with the authorization header.

Parameters

This endpoint accepts only one parameter, which is user_agent.

  • user_agent is the user-agent from which you want to extract information.

Responses

If the request succeeds, the response will look like as follows:

{
  "status": "success",
  "data": {
    "source_user_agent": "Mozilla/5.0 (Linux; Android 13; SAMSUNG SM-A528B) AppleWebKit/537.36 (KHTML, like Gecko) SamsungBrowser/21.0 Chrome/110.0.5481.154 Mobile Safari/537.36",
    "browser": {
      "name": "Samsung Internet",
      "version": "21.0",
      "major": "21"
    },
    "cpu": {},
    "device": {
      "type": "mobile",
      "model": "SM-A528B",
      "vendor": "Samsung"
    },
    "engine": {
      "name": "Blink",
      "version": "110.0.5481.154"
    },
    "os": {
      "name": "Android",
      "version": "13"
    }
  },
  "message": "User-Agent parsing was successful."
}

And if we don't provide user_agent parameter, then the error response would be as follows:

{
  "status": "error",
  "error": {
    "code": "MISSING_PARAMETER",
    "message": "'user_agent' string is required.",
    "details": "The 'user_agent' parameter is missing from the request body."
  }
}