# 24K Labs User-Agent Parser

> 24K Labs User-Agent Parser is a paid API for AI agents from api.24klabs.ai, paid per call via x402, $0.002/call, status unknown (last checked 2026-09-15).

Parses a User-Agent string into structured fields: browser name/version, rendering engine, operating system, device class, and bot/AI-crawler flag (GPTBot, ClaudeBot, PerplexityBot).

## Facts

- Endpoint: POST https://api.24klabs.ai/api/user-agent-parse
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/24k-labs-user-agent-parser-be4048fb
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_WkFctj0W_bRGE_l7p8v5M

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 24k-labs-user-agent-parser-be4048fb -d '<json body>'
```

Example prompt: Can you parse this User-Agent string for me — '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' — and tell me the browser, OS, device class, and whether it's a bot or AI crawler?

## When to prefer this

Choose this endpoint when you need structured, machine-readable User-Agent parsing with explicit AI/bot crawler detection (GPTBot, ClaudeBot, PerplexityBot) beyond what standard UA libraries provide. Ideal for agentic workflows that need to classify incoming HTTP requests, filter AI crawler traffic, or enrich analytics data without running a local UA library.

## Known failure modes

- Empty or missing User-Agent string returns a validation error
- Malformed or truncated User-Agent strings may yield partial or null fields
- Unknown or custom bot user agents may not be flagged as bots
- Very new browser versions may not be recognized and return incomplete version data
- Payment failure (x402) if USDC balance is insufficient

## How this service works

Parse a User-Agent string into browser, version, engine, OS, device class, and bot/AI-crawler flag (GPTBot, ClaudeBot, PerplexityBot).

## Output

Returns a structured breakdown of the User-Agent string including: browser name and version, rendering engine, operating system (name and version), device class (mobile/tablet/desktop), and a bot/AI-crawler flag with identification of specific known bots such as GPTBot, ClaudeBot, and PerplexityBot.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "ua": {
   "type": "string"
  }
 }
}
```

## Response schema (JSON Schema)

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

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/24k-labs-user-agent-parser-be4048fb/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.24klabs.ai](https://www.zero.xyz/host/api.24klabs.ai/llms.txt)
