apyhub
Back
▣ DEVELOPER TOOLS · SECURITY & PRIVACY

Extract User Agent API

Hosted on ApyHub

What it does

User Agent Parser turns a raw HTTP user_agent string into structured browser, platform, device, and engine data. Send the header value you receive from a request, and get back the parsed client details you can use in analytics, support, or bot filtering.

The request body accepts one field: user_agent. The response wraps everything under data, with required browser, platform, device, and engine objects. Browser data includes the browser name, type, version, major and minor version, and an is_bot flag. Platform data includes the OS name, short code, version, and icon. Device data includes the device name, type, brand, code name, and icon. Engine data includes the rendering engine name and version.

Use User Agent Parser when you need to segment traffic by browser or operating system, detect desktop versus mobile clients, or flag automated requests. It is a direct fit for request logging pipelines, fraud checks, and product analytics that need a normalized view of the client behind each HTTP request.

POST
Parse User-Agent string
https://api.eu.apyhub.com/apyhub/parse-user-agent-string

QUICKSTART

GUIDE

Quickstart

Parse a raw User-Agent string to identify the browser, platform, device, and engine.

curl -X POST "https://api.eu.apyhub.com/apyhub/parse-user-agent-string" \
  -H "apy-token: $APY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "user_agent" : "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/105.0.0.0 Safari/537.36"
}'

What you'll get back

Returns a JSON object with a data object containing browser, platform, device, and engine objects.

{
  "data": {
    "browser": {},
    "platform": {},
    "device": {},
    "engine": {}
  }
}
TRY ITLIVE · 20 ATOMS
Loading your default key…
The full key is used to call the gateway and stays in this tab — never sent to orbit or saved.
body*
Raw HTTP User-Agent header value to parse.

About this endpoint

What it does

Parses a raw HTTP User-Agent string from the request body and returns a structured breakdown of the browser, platform, device, and engine details it detects.

Request Body

ParameterTypeDescription
user_agentStringRaw HTTP User-Agent header value to parse.

Response

Returns a JSON object with a data object field. The data object contains the parsed browser, platform, device, and engine objects.

ParameterTypeDescription
dataObjectParsed user-agent details. Contains browser, platform, device, and engine.
data.browserObjectBrowser details.
data.browser.iconStringBrowser icon URL.
data.browser.nameStringBrowser name.
data.browser.typeStringBrowser type.
data.browser.is_botBooleanIndicates whether the user agent is identified as a bot. The schema also allows a string value.
data.browser.versionStringFull browser version.
data.browser.major_versionStringMajor browser version.
data.browser.minor_versionStringMinor browser version.
data.platformObjectPlatform details.
data.platform.iconStringPlatform icon URL.
data.platform.nameStringPlatform name.
data.platform.shortStringShort platform code.
data.platform.versionStringPlatform version.
data.deviceObjectDevice details.
data.device.iconStringDevice icon URL.
data.device.nameStringDevice name.
data.device.typeStringDevice type.
data.device.brandStringDevice brand.
data.device.code_nameStringDevice code name.
data.engineObjectEngine details.
data.engine.nameStringEngine name.
data.engine.versionStringEngine version.
▣ COMMON ERRORS

Errors any endpoint can return

400bad_request

Required parameter missing or malformed body.

401unauthorized

API key missing, revoked, or not authorized for this service.

429rate_limited

Your plan's per-second rate exceeded. Retry with exponential backoff.

503upstream_busy

Backend temporarily unavailable. Try again in a few seconds.