# User-Agent Parser & Browser/OS/Bot Detector

> User-Agent Parser & Browser/OS/Bot Detector is a paid API for AI agents from x402-deployer.x402-deployer.workers.dev, paid per call via x402, $0.001/call, status unknown (last checked 2026-09-15).

Parses a User-Agent string into browser, OS, device type, and bot/crawler identity using pure local regex — no upstream calls

## Facts

- Endpoint: POST https://x402-deployer.x402-deployer.workers.dev/user-agent-parse
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/x402-deployer-x402-deployer-workers-dev-32e6749e
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_MrCljwTei0a4jM7AQ-bI2

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 x402-deployer-x402-deployer-workers-dev-32e6749e -d '<json body>'
```

Example prompt: Parse this User-Agent string for me and tell me the browser, OS, device type, and whether it's a known bot or AI crawler: 'Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Mobile Safari/537.36'

## When to prefer this

Choose this endpoint when you need fast, offline-style UA parsing with no external API dependency. Ideal for classifying incoming HTTP requests, auditing logs for AI crawler traffic, or filtering bots from analytics — especially when you need to distinguish GPTBot, ClaudeBot, or PerplexityBot from regular browsers. Prefer over full-stack analytics platforms when you just need lightweight, single-string parsing.

## Known failure modes

- Missing or empty user-agent string — returns error or null fields
- Unrecognized or highly obscure UA string — returns 'unknown' for some fields
- Malformed JSON request body — returns 400 error
- Partial match where bot is not in the 32+ known list — device_type may say 'bot' but bot_name may be null

## How this service works

User-Agent parser / UA classifier / browser detection / OS detection / bot detection / AI crawler identifier (GPTBot, ClaudeBot, PerplexityBot). Pure-local regex parser — detects browser (Chrome, Firefox, Safari, Edge, Opera, Vivaldi, Samsung), OS (Windows, macOS, iOS, Android, Linux, ChromeOS) with version, device type (desktop / mobile / tablet / bot), and identifies 32+ specific bots/crawlers. No upstream call.

## Output

Returns structured JSON with browser name and version, OS name and version, device type (desktop/mobile/tablet/bot), and if a bot, the specific bot/crawler identity (e.g. GPTBot, ClaudeBot, PerplexityBot) from a library of 32+ known crawlers

## Example request

```json
{
 "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36"
}
```

## Request schema (JSON Schema)

```json
{
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "type": "object",
 "properties": {
  "input": {
   "type": "object",
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "type": "string",
     "enum": [
      "POST"
     ]
    },
    "bodyType": {
     "type": "string",
     "enum": [
      "json",
      "form-data",
      "text"
     ]
    },
    "body": {
     "properties": {
      "user_agent": {
       "type": "string",
       "description": "Raw User-Agent header string. Up to 2000 chars."
      }
     },
     "required": [
      "user_agent"
     ]
    }
   },
   "required": [
    "type",
    "method",
    "bodyType",
    "body"
   ],
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "properties": {
      "user_agent": {
       "type": "string"
      },
      "is_bot": {
       "type": "boolean"
      },
      "bot": {
       "type": "null"
      },
      "browser": {
       "type": "object",
       "properties": {
        "name": {
         "type": "string"
        },
        "version": {
         "type": "string"
        }
       }
      },
      "os": {
       "type": "object",
       "properties": {
        "name": {
         "type": "string"
        },
        "version": {
         "type": "string"
        }
       }
      },
      "device": {
       "type": "object",
       "properties": {
        "type": {
         "type": "string"
        }
       }
      },
      "source": {
       "type": "string"
      }
     }
    }
   },
   "required": [
    "type"
   ]
  }
 },
 "required": [
  "input"
 ]
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/x402-deployer-x402-deployer-workers-dev-32e6749e/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402-deployer.x402-deployer.workers.dev](https://www.zero.xyz/host/x402-deployer.x402-deployer.workers.dev/llms.txt)
