Zum Inhalt springen
POST AI agent ready /v1/useragent/parse

User Agent Parser API - Free UA String Decoder

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.

Parameters

stringrequired

User agent string to parse.

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?
It detects search engine crawlers (Googlebot, Bingbot), social media bots (Twitterbot, Facebot), monitoring tools, headless browsers (Puppeteer, Playwright), and common scraping libraries.
What happens if the user agent string is malformed?
The parser extracts as much information as possible. Fields it cannot determine are returned as null. The endpoint does not return an error for unrecognized strings.
Can I detect the device manufacturer?
Yes. The device object includes vendor (e.g. Apple, Samsung, Google) and model (e.g. iPhone, Galaxy S24) when the user agent contains that information.
Does this work with non-browser user agents?
Yes. It handles user agents from curl, Postman, Python requests, and other HTTP libraries. These are parsed with their tool name and version.
What if I do not send a user_agent field?
The endpoint automatically parses the User-Agent header from your HTTP request. This lets you detect your own client's browser and device without extracting the header yourself.

Get your API key

Free tier includes 5 requests per minute with no credit card required. Upgrade for higher limits.