# 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, version, rendering engine, OS, device class, and flags for known bots and AI crawlers (GPTBot, ClaudeBot, PerplexityBot).

## Facts

- Endpoint: POST https://api.24klabs.ai/api/v1/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-54d4301e
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_TltG4Mn8986DwAJzPHG08

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-54d4301e -d '<json body>'
```

Example prompt: Can you parse this user-agent string for me — 'Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Mobile Safari/537.36' — 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 decomposition of a raw User-Agent string, especially when detecting AI crawlers (GPTBot, ClaudeBot, PerplexityBot) is a priority. It is more suitable than regex-based solutions for agents that need reliable bot/AI detection without maintaining their own UA-parser libraries. At $0.002 per call it is cost-effective for on-demand log enrichment or real-time request classification.

## Known failure modes

- Empty or missing user-agent string returns a validation error
- Malformed or truncated user-agent strings may result in partial/unknown fields
- Unrecognized or novel AI crawlers not yet in the database will not be flagged
- Payment failure or insufficient USDC balance blocks the request
- Rate limiting may occur under high-volume usage

## 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 object with browser name, browser version, rendering engine, operating system name and version, device class (desktop/mobile/tablet/bot), and boolean flags indicating whether the user-agent belongs to a known bot or a specific AI crawler (GPTBot, ClaudeBot, 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-54d4301e/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)
