User-Agent Parser API: Browser, OS, and Device in JSON
Parsing User-Agent strings yourself means shipping a regex database that goes stale with every browser release.
Send the raw UA string and get back structured fields: browser name and version, engine, operating system, and device type.
Parse a User-Agent string
curl -G "https://user-agent-parser14.p.rapidapi.com/parse" \
--data-urlencode "ua=Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0 Safari/537.36" \
-H "X-RapidAPI-Key: YOUR_KEY" \
-H "X-RapidAPI-Host: user-agent-parser14.p.rapidapi.com"const ua = encodeURIComponent(navigator.userAgent);
const res = await fetch(
"https://user-agent-parser14.p.rapidapi.com/parse?ua=" + ua,
{ headers: {
"X-RapidAPI-Key": "YOUR_KEY",
"X-RapidAPI-Host": "user-agent-parser14.p.rapidapi.com",
} }
);
const parsed = await res.json();What you get back
The response breaks the UA into browser (name and version), engine, OS (name and version), and device (type, and vendor/model where detectable) — ready to log, segment analytics, or branch on device type.
Common uses
Tag analytics events with real device and browser data, gate features by browser version, or detect bots and mobile clients server-side without bundling a parser into every service.
Run it in production
User-Agent Parser has a permanent free tier — 1,000 requests a month, no credit card. Paid plans start at $5/month for 100,000 requests.
FAQ
Do I need to URL-encode the UA string?
Yes. Pass the User-Agent as the ua query parameter, URL-encoded (or use curl's --data-urlencode).
Is the parser kept up to date?
It uses a maintained UA dataset, so new browsers and devices are recognized without you shipping updates.
Can it run server-side and client-side?
Either. It is a plain HTTPS GET, callable from any backend or from the browser.