# User Agent Parser API

> User Agent Parser parses user agent strings to extract browser, operating system, and hardware details. It identifies device types, CPU architecture, and bot traffic, so you can run user agent detection on every incoming HTTP request.

**Endpoint:** `POST https://api.apiverve.com/v1/useragentparser`  
**Category:** Parsers  
**Cost:** 2 credits per call  
**Canonical page:** https://apiverve.com/marketplace/useragentparser

## Overview

A user agent lookup and device detection API. User Agent Parser works by analyzing the user agent string provided and extracting information about the browser, operating system, and device. It uses advanced algorithms to parse the user agent string and return the information in a structured format.

## Authentication

Every call carries your key in an `x-api-key` header. The same key works across the whole
APIVerve catalog — there are no per-API subscriptions. Responses always use the same three
top-level keys: `status`, `error`, and `data`.

## Example request

```bash
curl -X POST "https://api.apiverve.com/v1/useragentparser" \
  -H "x-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"ua":"Mozilla/5.0 (Windows NT 6.4) AppleWebKit/537.36.0 (KHTML, like Gecko) Chrome/60.0.0.0 Safari/537.36.0"}'
```

## Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `ua` | string | Yes | The user agent string to parse |

## Response fields

- `ua` — string · The original user agent string that was parsed
- `browser` — object · Browser detected in the user agent; empty when none is recognised
  - `browser.name` — string · Name of the browser (e.g., Chrome, Firefox, Safari)
  - `browser.version` — string · Full version of the browser (e.g., 60.0.0.0)
  - `browser.major` — string · Major version number of the browser · (premium)
- `engine` — object · Rendering engine detected in the user agent
  - `engine.name` — string · Name of the rendering engine (e.g., Blink, WebKit) · (premium)
  - `engine.version` — string · Version of the rendering engine · (premium)
- `os` — object · Operating system detected in the user agent
  - `os.name` — string · Operating system name (e.g., Windows, macOS, Linux)
  - `os.version` — string · Version of the operating system
- `device` — object · Device information object (type, vendor, model)
- `cpu` — object · CPU architecture information (architecture type and details)
- `isMobile` — boolean · Whether the user agent is from a mobile device
- `isBot` — boolean · Whether the user agent appears to be a bot/crawler
- `deviceType` — string · Device class: desktop, mobile, tablet, console, smarttv, wearable, embedded, xr or bot; null when it can't be determined
- `clientType` — string · What sent the request: browser, bot (a crawler, from the same list as Bot Detector), library (an HTTP client such as curl or python-requests) or unknown
- `library` — object · The HTTP client library or tool, when clientType is library; null otherwise · (premium)
- `isSuspicious` — boolean · Whether the user agent carries an attack payload or is malformed (Log4Shell, Shellshock, SQL or HTML injection, path traversal, control characters, over 1,024 characters) · (premium)
- `suspiciousReasons` — array · Which checks matched: log4shell, shellshock, html_injection, sql_injection, path_traversal, command_injection, control_characters, overlong · (premium)
- `osVersionFrozen` — boolean · Whether the OS version is a frozen placeholder (user agent reduction): Chromium reports Windows 10 on Windows 11, macOS 10.15.7 on every Mac and Android 10 with model K; Safari 26 reports iOS 18.6 · (premium)
- `versionCheck` — object · How far the browser and OS are behind current releases; null for bots, libraries and unparsed agents. Data refreshed weekly from endoflife.date and Microsoft's Edge feed · (premium)
  - `versionCheck.browserFamily` — string · Chrome, Edge, Firefox or Safari; null for browsers not tracked · (premium)
  - `versionCheck.latestVersion` — string · Latest stable release of that browser · (premium)
  - `versionCheck.majorsBehind` — number · How many newer major versions exist · (premium)
  - `versionCheck.isOutdated` — boolean · Two or more majors behind and that major no longer supported (a supported Firefox ESR is not outdated) · (premium)
  - `versionCheck.osEndOfLife` — object · Whether the OS release is past end of support (iOS, Android, Windows 8.1 and older); null when unknown or the version is frozen · (premium)
- `summary` — string · Human-readable summary of browser and OS · (premium)

## Sample response

```json
{
  "status": "ok",
  "error": null,
  "data": {
    "ua": "Mozilla/5.0 (Windows NT 6.4) AppleWebKit/537.36.0 (KHTML, like Gecko) Chrome/60.0.0.0 Safari/537.36.0",
    "browser": {
      "name": "Chrome",
      "version": "60.0.0.0",
      "major": "60"
    },
    "engine": {
      "name": "Blink",
      "version": "60.0.0.0"
    },
    "os": {
      "name": "Windows",
      "version": "10"
    },
    "device": {},
    "cpu": {},
    "isMobile": false,
    "isBot": false,
    "deviceType": "desktop",
    "clientType": "browser",
    "library": null,
    "isSuspicious": false,
    "suspiciousReasons": [],
    "osVersionFrozen": true,
    "versionCheck": {
      "browserFamily": "Chrome",
      "latestVersion": "156",
      "majorsBehind": 95,
      "isOutdated": true,
      "osEndOfLife": null
    },
    "summary": "Chrome 60 on Windows 10"
  }
}
```

## Use cases

- **Adaptive Asset Delivery** — Web servers inspect the device type and mobile flag to serve lightweight media assets and alternate layouts to smartphones and tablets.
- **Crawler Traffic Segregation** — When incoming requests arrive, API gateways read the bot flag to filter out search engine spiders and scrapers from application metrics.
- **Compatibility Banner Triggers** — Flag outdated client environments before pages fail by evaluating the reported browser version against required feature sets.
- **Platform Installer Matching** — To route downloads accurately, software distribution sites match the visitor's operating system and CPU architecture directly to the right installer package.

## SDKs

- **npm** — `npm install @apiverve/useragentparser` (https://www.npmjs.com/package/@apiverve/useragentparser)
- **PyPI** — `pip install apiverve-useragentparser` (https://pypi.org/project/apiverve-useragentparser/)
- **NuGet** — `dotnet add package APIVerve.API.UserAgentParser` (https://www.nuget.org/packages/APIVerve.API.UserAgentParser)
- **Source** — https://github.com/apiverve/useragentparser-api

## More

- Full reference: https://docs.apiverve.com/ref/useragentparser
- Get an API key: https://dashboard.apiverve.com
- Full catalog: https://apiverve.com/marketplace
