81trust / 100

Dev Useragent Parse

by AgentTools in Search & web

x402 APIPassing, checked 2 min ago

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. Use this when an agent needs to uA string → browser, engine, OS and device.

GET https://agenttools-hub.vercel.app/api/v1/dev/useragent-parse

Last 30 days

All checks passedSome failedAll failedNot checked
Uptime
100%
Response time
149 ms typical, 149 ms slowest 5%
Last check
2 min ago
Next check
in 29 min

How to call it

# See the payment challenge (nothing is charged)
curl -i -X GET "https://agenttools-hub.vercel.app/api/v1/dev/useragent-parse?userAgent=Mozilla%2F5.0+%28Windows+NT+10.0%3B+Win64%3B+x64%29+AppleWebKit%2F537.36+%28KHTML%2C+like+Gecko%29+Chrome%2F126.0.0.0+Safari%2F537.36"
import { wrapFetchWithPayment } from "@x402/fetch";
import { x402Client } from "@x402/core/client";
import { ExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";

const client = new x402Client().register(
  "eip155:8453",
  new ExactEvmScheme(privateKeyToAccount(process.env.AGENT_KEY)),
);
const pay = wrapFetchWithPayment(fetch, client);

// Not sure it's safe to pay? Preflight it first for $0.005:
// GET https://toolvet.app/api/v1/check?url=https%3A%2F%2Fagenttools-hub.vercel.app%2Fapi%2Fv1%2Fdev%2Fuseragent-parse
const res = await pay("https://agenttools-hub.vercel.app/api/v1/dev/useragent-parse?userAgent=Mozilla%2F5.0+%28Windows+NT+10.0%3B+Win64%3B+x64%29+AppleWebKit%2F537.36+%28KHTML%2C+like+Gecko%29+Chrome%2F126.0.0.0+Safari%2F537.36");
console.log(await res.json());

Example 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"
}

Example output

{
  "result": {
    "answer": "Chrome 126.0.0.0 on Windows 10",
    "answerLabel": "Parsed User-Agent",
    "details": [
      {
        "label": "Browser",
        "value": "Chrome 126.0.0.0"
      },
      {
        "label": "Engine",
        "value": "Blink 126.0.0.0"
      },
      {
        "label": "OS",
        "value": "Windows 10"
      },
      {
        "label": "Device type",
        "value": "desktop"
      },
      {
        "label": "Device",
        "value": "—"
      }
    ],
    "steps": [
      "Tokenize the UA string",
      "Match browser, engine, OS and device patterns (ua-parser-js)"
    ],
    "value": null
  },
  "tool": "useragent-parse"
}

Security scan

  • No findings. We scan names, descriptions and tool definitions for hidden instructions and other prompt-injection patterns.

Recent checks

WhenResultHTTPTimePrice
2 min agoPassed402215 ms$0.002
5 h agoPassed402149 ms$0.002