User Agents¶
Parse User-Agent strings into structured browser, OS, device, and bot data.
POST /api/v1/ua¶
Parse a single User-Agent string.
Parameters
Name |
In |
Required |
Description |
|---|---|---|---|
|
body |
yes |
The User-Agent string to parse |
|
query |
no |
Comma-separated list of response fields to include |
Example
curl -X POST https://api.apicrate.io/api/v1/ua \
-H "X-API-Key: $KEY" \
-H "Content-Type: application/json" \
-d '{"ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36"}'
{
"client": {
"type": "browser",
"name": "Chrome",
"version": "120.0",
"engine": "Blink",
"engine_version": "120.0"
},
"os": {
"name": "Mac",
"version": "10.15",
"platform": "x64"
},
"device": {
"type": "desktop",
"brand": "Apple",
"model": ""
},
"bot": null
}
POST /api/v1/ua/bulk¶
Parse multiple User-Agent strings in a single request.
Parameters
Name |
In |
Required |
Description |
|---|---|---|---|
|
body |
yes |
Array of objects, each with a |
|
query |
no |
Comma-separated list of response fields to include |
Example
curl -X POST https://api.apicrate.io/api/v1/ua/bulk \
-H "X-API-Key: $KEY" \
-H "Content-Type: application/json" \
-d '{
"ua_list": [
{"ua": "Mozilla/5.0 (iPhone; CPU iPhone OS 17_0 like Mac OS X)"},
{"ua": "Googlebot/2.1 (+http://www.google.com/bot.html)"}
]
}'
{
"results": [
{
"ua": "Mozilla/5.0 (iPhone; CPU iPhone OS 17_0 like Mac OS X)",
"client": {"type": "browser", "name": "Mobile Safari", "version": "17.0"},
"os": {"name": "iOS", "version": "17.0"},
"device": {"type": "smartphone", "brand": "Apple", "model": "iPhone"},
"bot": null
},
{
"ua": "Googlebot/2.1 (+http://www.google.com/bot.html)",
"client": null,
"os": null,
"device": null,
"bot": {"name": "Googlebot", "category": "Search bot", "producer": "Google Inc."}
}
]
}
POST /api/v1/ua/compat/device-atlas¶
Parse User-Agent strings using a DeviceAtlas-compatible request and response format. Accepts a plain JSON array of UA strings and returns results keyed by each input string.
Parameters
Name |
In |
Required |
Description |
|---|---|---|---|
(body) |
body |
yes |
JSON array of User-Agent strings |
Example
curl -X POST https://api.apicrate.io/api/v1/ua/compat/device-atlas \
-H "X-API-Key: $KEY" \
-H "Content-Type: application/json" \
-d '["Mozilla/5.0 (Linux; Android 14) AppleWebKit/537.36 Chrome/120.0.0.0 Mobile Safari/537.36"]'