Skip to content
moxon home

User-Agent Parser

The /agent endpoint parses a User-Agent string and returns structured information about the browser, operating system, device, rendering engine, and whether the client is a bot. If no UA is provided, the request's own User-Agent header is used.

gethttps://api.moxon.dev/v4/agent

Use Cases

Detect the browser and OS of your visitors, identify bots and crawlers, serve device-specific content (mobile vs desktop), or log structured client metadata from raw User-Agent strings.

Try itget/v4/agent

Parameters

  • uastringoptional

    Raw User-Agent string to parse. Defaults to the request's User-Agent header.

Response Fields

  • rawstring

    The original User-Agent string

  • browser.namestring

    Detected browser name (e.g. Chrome, Firefox, Safari)

  • browser.versionstring

    Full browser version

  • browser.majorstring

    Major version number only

  • os.namestring

    Operating system name (e.g. macOS, Windows 10/11, iOS)

  • os.versionstring

    OS version string

  • device.typestring

    Device category: desktop, mobile, or tablet

  • device.vendorstring

    Device manufacturer (e.g. Apple, Samsung, Google)

  • engine.namestring

    Rendering engine (e.g. Blink, Gecko, WebKit)

  • engine.versionstring

    Engine version

  • botboolean

    true if the UA matches a known bot or crawler pattern

Code Examples

Error Handling

  • 400A User-Agent string is required.The ua parameter is empty and no User-Agent header was sent