User Agent Parser API - Detect Browser, OS & Device
Parses a user agent string into browser, engine, OS, and device components. Detects bots, crawlers, and headless browsers. If no user_agent field is provided, the caller's User-Agent header is used.
Code examples
curl -X POST https://api.botoi.com/v1/useragent/parse \
-H "Content-Type: application/json" \
-d '{"user_agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36"}'When to use this API
Build a browser compatibility dashboard
Parse user agent strings from your analytics logs to calculate the percentage of visitors on each browser and version. Identify when old browser versions drop below your support threshold so you can sunset polyfills and reduce bundle size.
Filter bot traffic from conversion metrics
Before counting a page view or signup event, parse the user agent and check the is_bot flag. Exclude bot traffic from your conversion funnel reports to get accurate numbers for real human visitors.
Serve device-optimized responses
Parse the user agent at the edge to determine whether the visitor is on mobile, tablet, or desktop. Return a lighter payload for mobile users or redirect tablet visitors to a touch-optimized layout.
Frequently asked questions
What bot types does this endpoint detect?
What happens if the user agent string is malformed?
Can I detect the device manufacturer?
Does this work with non-browser user agents?
What if I do not send a user_agent field?
Get your API key
Free tier includes 5 requests per minute with no credit card required. Upgrade for higher limits.