x402AgentTools

๐ŸชชUser-Agent Parser

Parse a User-Agent header into structured data: browser (name/version), rendering engine, operating system, and device type/vendor/model. Deterministic โ€” the same string always parses identically.

Worked examples

Chrome on Windows

GET /api/v1/dev/useragent-parse?userAgent=Mozilla%2F5.0%20(Windows%20NT%2010.0%3B%20Win64%3B%20x64)%20AppleWebKit%2F537.36%20(KHTML%2C%20like%20Gecko)%20Chrome%2F126.0.0.0%20Safari%2F537.36

Result: Chrome 126.0.0.0 on Windows 10

iPhone Safari

GET /api/v1/dev/useragent-parse?userAgent=Mozilla%2F5.0%20(iPhone%3B%20CPU%20iPhone%20OS%2017_5%20like%20Mac%20OS%20X)%20AppleWebKit%2F605.1.15%20(KHTML%2C%20like%20Gecko)%20Version%2F17.5%20Mobile%2F15E148%20Safari%2F604.1

Result: Mobile Safari 17.5 on iOS 17.5

An agent's own client

GET /api/v1/dev/useragent-parse?userAgent=GPTBot%2F1.1%20(%2Bhttps%3A%2F%2Fopenai.com%2Fgptbot)

Result: Unknown browser on Unknown OS

Machine API (x402)

$0.001 / call

This tool is also a JSON API for AI agents. Requests without payment receive 402 Payment Required plus instructions; agents pay USDC on Base via the x402 protocol โ€” no accounts, no API keys.

GET /api/v1/dev/useragent-parse?userAgent=Mozilla%2F5.0%20(Windows%20NT%2010.0%3B%20Win64%3B%20x64)%20AppleWebKit%2F537.36%20(KHTML%2C%20like%20Gecko)%20Chrome%2F126.0.0.0%20Safari%2F537.36 HTTP/1.1
Host: agenttools-hub.vercel.app

โ†’ 402 (payment required, instructions in headers)
โ†’ 200 (after X-PAYMENT header; JSON body below)

{
  "tool": "dev/useragent-parse",
  "input": {"userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36"},
  "result": { "value": null, "answer": "Chrome 126.0.0.0 on Windows 10" }
}

Agent docs: /llms.txt ยท OpenAPI spec ยท integration guide

About this tool

User-Agent strings are compressed chaos. This turns one into clean structured fields โ€” browser, engine, OS, device type and model โ€” deterministically, so an agent analyzing logs or tailoring responses never misreads the platform.

Frequently asked questions

Can I trust UA strings?

No โ€” they're client-supplied and trivially spoofed. Great for analytics and formatting; never for security decisions.

Related tools