GET/v1/useragent
Parse a browser User-Agent string into browser, engine, OS and device
Omit ua to parse the User-Agent of the request itself.
PARAMETERS
- uaquery · string
- User-Agent stringe.g. Mozilla/5.0 (iPhone; CPU iPhone OS 17_5 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.5 Mobile/15E148 Safari/604.1
REQUEST
curl "https://api.apialmanac.com/v1/useragent" \ -H "X-API-Key: YOUR_KEY"
import requests
r = requests.get("https://api.apialmanac.com/v1/useragent", headers={"X-API-Key": "YOUR_KEY"})
print(r.status_code, r.headers.get("X-Gw-Remaining"))
print(r.json())
const r = await fetch("https://api.apialmanac.com/v1/useragent", {
headers: { "X-API-Key": "YOUR_KEY" }
});
console.log(r.status, r.headers.get("X-Gw-Remaining"));
console.log(await r.json());
RESPONSE
200OK
{
"ua": "Mozilla/5.0 (iPhone; CPU iPhone OS 17_5 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.5 Mobile/15E148 Safari/604.1",
"browser": {
"name": "Mobile Safari",
"version": "17.5",
"major": "17"
},
"engine": {
"name": "WebKit",
"version": "605.1.15"
},
"os": {
"name": "iOS",
"version": "17.5"
},
"device": {
"type": "mobile",
"vendor": "Apple",
"model": "iPhone"
},
"cpu": {
"architecture": null
},
"bot": false
}