{"uid":"cap_ZhIXq-zU02rXajGM_-i7g","slug":"swift-bot-labs-toolbox-user-agent-parser-249a3c6c","name":"Swift Bot Labs Toolbox – User-Agent Parser","description":"62 small, deterministic utility APIs (DNS and e-mail checks, web extraction, EVM decoding, x402 checks, IP math, JSON/CSV, hashing, conversions). No account or API key: pay per call in USDC with x402.","url":"https://x402-toolbox.swiftbotlab.workers.dev/v1/user-agent?utm_source=zero.xyz","method":"GET","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method"],"properties":{"type":{"type":"string","const":"http"},"method":{"enum":["GET","HEAD"],"type":"string"},"headers":{"type":"object","additionalProperties":{"type":"string"}},"queryParams":{"type":"object","required":["ua"],"properties":{"ua":{"type":"string"}},"additionalProperties":false},"discoverable":{"type":"boolean"}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object"}}}}},"responseSchema":{"type":"json","example":{"ok":true,"tool":"user-agent","result":{"os":null,"bot":"GPTBot","isBot":true,"device":"bot","browser":null,"botCategory":"ai-crawler"}}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.003","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.003/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.003","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.003","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_wjHGDz2cVeoiW-9Fh-Ebp","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.003","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Parses a User-Agent string and returns structured metadata including browser, OS, device type, and bot classification","exampleAgentPrompt":"Can you parse this user agent string for me — 'Mozilla/5.0 (compatible; GPTBot/1.0; +https://openai.com/gptbot)' — and tell me whether it's a bot, what kind, and what browser and OS it's using?","exampleUseCases":[{"title":"Identify AI crawler hitting your site","prompt":"Someone is hammering my website and the user agent is 'Mozilla/5.0 (compatible; GPTBot/1.0; +https://openai.com/gptbot)' — can you tell me if that's a bot, what category it is, and whether I should be worried?"},{"title":"Classify visitor device type from logs","prompt":"I have this user agent from my access logs: 'Mozilla/5.0 (iPhone; CPU iPhone OS 16_0 like Mac OS X) AppleWebKit/605.1.15' — can you parse it and tell me the device type, OS, and browser?"},{"title":"Screen API requests for bot traffic","prompt":"Before processing this request, can you check if the user agent 'python-requests/2.28.0' is a bot or a human browser, and what category it falls into?"}],"resultDescription":"A JSON object with fields: ok (boolean), tool name ('user-agent'), and a result object containing: os (string or null), bot (string or null — bot name if detected), isBot (boolean), device (string e.g. 'bot', 'mobile', 'desktop'), browser (string or null), and botCategory (string or null e.g. 'ai-crawler').","failureModes":["Missing 'ua' query parameter returns an error response","Unrecognized or malformed UA string may return nulls for most fields but still succeeds","Payment failure (x402) if USDC balance is insufficient or x402 handshake fails","Rate limits or worker errors on the Cloudflare edge may return 5xx"],"whenToPreferThis":"Choose this endpoint when you need a fast, cheap, no-account-required UA parser that distinguishes AI crawlers (like GPTBot, Claude, etc.) from regular browsers and generic bots — especially useful for agents that need to screen HTTP requests or analyze log data without setting up a full analytics pipeline. Prefer it over heavyweight analytics SDKs when you just need structured UA breakdown per-call at $0.003 USDC.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-31T18:37:54.633Z","isFirstParty":false,"canonicalSlug":"swift-bot-labs-toolbox-user-agent-parser-249a3c6c"}