apyhub
DEVELOPER TOOLS

Extract User Agent API

What it does

User Agent Parser turns a raw HTTP User-Agent header into structured browser, platform, device, and engine data. Send a single user_agent string in the request body, and get parsed metadata back in data.

Use it when you need to identify the client behind a request without maintaining your own user-agent parsing logic. The response includes browser details such as name, version, major and minor version, whether it looks like a bot, plus platform fields like name, short code, and version.

You also get device and engine information. Device data can include the device name, type, brand, code name, and an icon URL. Engine data includes the engine name and version. That makes this useful for analytics pipelines, bot detection, device-level reporting, and request logging where you want consistent client classification.

User Agent Parser is a simple way to normalize browser and device metadata from messy header strings into a predictable JSON response.

POST
Parse User-Agent string
http://localhost:8080/apyhub/parse-user-agent

QUICKSTART

GUIDE

Quickstart

Parse a raw User-Agent string into browser, platform, device, and engine details.

curl -X POST "http://localhost:8080/apyhub/parse-user-agent" \
  -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/120.0.0.0 Safari/537.36"}'

What you'll get back

Returns a JSON object with a data object field. data contains the parsed 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 and returns structured information about the detected browser, platform, device, and engine.

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 structured detection results for browser, platform, device, and engine.

ParameterTypeMandatoryDescription
dataObjectYesParsed user-agent details.
data.browserObjectYesBrowser information object.
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.versionStringNoBrowser version.
data.browser.major_versionStringNoBrowser major version.
data.browser.minor_versionStringNoBrowser minor version.
data.platformObjectYesPlatform information object.
data.platform.iconStringNoPlatform icon URL.
data.platform.nameStringNoPlatform name.
data.platform.shortStringNoPlatform short code.
data.platform.versionStringNoPlatform version.
data.deviceObjectYesDevice information object.
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 information object.
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.