# agent402.tools User-Agent Parser

> agent402.tools User-Agent Parser is a paid API for AI agents from agent402.tools, paid per call via x402, $0.001/call, status unknown (last checked 2026-09-14).

Parses a User-Agent string to extract browser name, version, operating system, device class, and detect bots.

## Facts

- Endpoint: POST https://agent402.tools/api/user-agent
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/agent402-tools-user-agent-parser-177c0839
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_bKZP4WGXpSaFo-6GYIrpM

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability agent402-tools-user-agent-parser-177c0839 -d '<json body>'
```

Example prompt: Can you parse this user-agent string and tell me what browser, OS, and device type it is, and whether it's a bot? The string is: 'Mozilla/5.0 (iPhone; CPU iPhone OS 17_0 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.0 Mobile/15E148 Safari/604.1'

## When to prefer this

Use this endpoint when you need fast, heuristic-based parsing of HTTP User-Agent strings to classify browsers, operating systems, device types, or detect bot traffic — especially in agent pipelines that process web request logs or filter automated traffic.

## Known failure modes

- Empty or missing 'ua' field returns an error
- Malformed or truncated user-agent strings may produce partial or low-confidence results
- Unknown or very new user agents may not be recognized and return unknown fields
- Payment not included or insufficient USDC returns 402 Payment Required

## How this service works

Heuristic user-agent string parser: browser, version, OS, device class, and bot detection.

## Output

Returns parsed components of the User-Agent string including browser name and version, operating system, device class (e.g. mobile/desktop/tablet), and a bot detection flag.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "ua": {
   "type": "string",
   "description": "User-Agent header value"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "os": "Windows",
  "bot": false,
  "device": "desktop",
  "browser": "Chrome",
  "version": "125.0"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/agent402-tools-user-agent-parser-177c0839/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from agent402.tools](https://www.zero.xyz/host/agent402.tools/llms.txt)
