apyhub
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
http://localhost:8080/apyhub/parse-user-agent-string
QUICKSTARTGUIDE

Quickstart

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

curl -X POST "http://localhost:8080/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

ParameterTypeMandatoryDescription
user_agentStringYesRaw 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.

ParameterTypeMandatoryDescription
dataObjectYesParsed user-agent details. Contains browser, platform, device, and engine.
data.browserObjectYesBrowser details.
data.browser.iconStringNoBrowser icon URL.
data.browser.nameStringNoBrowser name.
data.browser.typeStringNoBrowser type.
data.browser.is_botBooleanNoIndicates whether the user agent is identified as a bot. The schema also allows a string value.
data.browser.versionStringNoFull browser version.
data.browser.major_versionStringNoMajor browser version.
data.browser.minor_versionStringNoMinor browser version.
data.platformObjectYesPlatform details.
data.platform.iconStringNoPlatform icon URL.
data.platform.nameStringNoPlatform name.
data.platform.shortStringNoShort platform code.
data.platform.versionStringNoPlatform version.
data.deviceObjectYesDevice details.
data.device.iconStringNoDevice icon URL.
data.device.nameStringNoDevice name.
data.device.typeStringNoDevice type.
data.device.brandStringNoDevice brand.
data.device.code_nameStringNoDevice code name.
data.engineObjectYesEngine details.
data.engine.nameStringNoEngine name.
data.engine.versionStringNoEngine version.

Body

Name
Type
Description
bodyREQUIRED
object
▣ 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.