← Docs

Useragent API

Device, OS, browser, and bot, from one header.

Turn a User-Agent into device, OS, browser, and bot answers, down to brand and model. Prefer the User-Agent header. Use ?ua= to test a specific string.

Chromium browsers also send Sec-CH-UA-* Client Hints. Forward them when you have them. The classic string alone still works. Paid ?deep=true adds brand, model, versions, and bot detail.

Parse

Bare GET /useragent parses the User-Agent that made the request. No key needed. With ?ua= it is a keyed lookup.

GET
api.parseapi.com/useragent
Device, OS, browser, bot. Prefer User-Agent header, or pass ?ua=. Accepts Sec-CH-UA-* hints
Explore
Parameters 3
User-Agentstring · header · optional

User-Agent string to parse (defaults to the request UA)

uastring · query · optional

User-Agent string to parse instead of the request UA (requires a key)

deepboolean · query · optional

When true, include optional detail in deep. Access depends on the endpoint: pooled detail, an included paid-plan profile, or a metered check. Core values stay unchanged.

This example sends specific headers. Copy the request to run it in your own environment.

import { parseAPI } from '@parseapi/sdk';

const parse = parseAPI("YOUR_API_KEY");
const result = await parse.useragent("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");
console.log(result);

Run on your server with a secret key. Calling from a browser or app?

SDK calls include your API key. Choose HTTP for the request without a key.

Example response
{
  "useragent": "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",
  "device": "desktop",
  "os": "macOS",
  "browser": "Chrome",
  "bot": false,
  "mobile": false
}

Response fields

useragent
Original User-Agent string
device
desktop | mobile | tablet | tv | console | wearable | car | camera | speaker | bot | other
os
Operating system (e.g. macOS, Windows, Android, iOS)
browser
Browser, app, or library name (e.g. Chrome, curl), bot name for bots
bot
Bot, crawler, or headless browser
mobile
Phone or tablet

Deep

Paid. Device brand and model (SM-G998B becomes Samsung Galaxy S21 Ultra 5G), versions, and engine. Bots come back named and categorized. AI crawlers like GPTBot carry ai: true.

This example sends specific headers. Copy the request to run it in your own environment.

import { parseAPI } from '@parseapi/sdk';

const parse = parseAPI("YOUR_API_KEY");
const result = await parse.useragent("Mozilla/5.0 (Linux; Android 12; SM-G998B) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/110.0.0.0 Mobile Safari/537.36", { deep: true });
console.log(result);

Run on your server with a secret key. Calling from a browser or app?

Example response
{
  "useragent": "Mozilla/5.0 (Linux; Android 12; SM-G998B) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/110.0.0.0 Mobile Safari/537.36",
  "device": "mobile",
  "os": "Android",
  "browser": "Chrome Mobile",
  "bot": false,
  "mobile": true,
  "deep": {
    "device": {
      "type": "mobile",
      "brand": "Samsung",
      "model": "Galaxy S21 Ultra 5G",
      "cpu": null,
      "touchscreen": true
    },
    "os": {
      "name": "Android",
      "version": "12",
      "platform": null
    },
    "browser": {
      "name": "Chrome Mobile",
      "version": "110.0.0.0",
      "type": "browser"
    },
    "engine": {
      "name": "Blink",
      "version": null
    },
    "headless": false
  }
}

Deep fields

deep.device
Type, brand, model (e.g. Samsung Galaxy S21 Ultra 5G), CPU, touchscreen
deep.os
Name, version, platform (ARM/x64 from hints)
deep.browser
Name, version, client type. Brands when Sec-CH-UA present
deep.engine
Rendering engine and version
deep.bot
For bots: name, category (e.g. AI Data Scraper), url, vendor
deep.ai
For bots: AI crawler or scraper (GPTBot, ClaudeBot, …)
deep.headless
Automation framework detected (HeadlessChrome, Playwright, …)

Client Hints

Client Hints are structured headers (Sec-CH-UA-*) from Chromium browsers. Send the classic User-Agent plus any hints you received. We use both.

They matter more every year: modern Chrome freezes the UA string (every Android phone says Android 10; K), so hints are the only source for the real model and OS version. Sec-CH-UA-Model restores the device, Sec-CH-UA-Platform-Version distinguishes Windows 11 from 10, and Sec-CH-UA-Arch reveals the CPU.

Missing hints are fine. We fall back to the User-Agent string. Forward headers exactly as your client sent them.

This example sends specific headers. Copy the request to run it in your own environment.

curl "https://api.parseapi.com/useragent?deep=true" \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Parse-Version: 2.0.0" \
  -H "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" \
  -H 'Sec-CH-UA: "Chromium";v="120", "Google Chrome";v="120", "Not_A Brand";v="8"' \
  -H 'Sec-CH-UA-Platform: "macOS"' \
  -H "Sec-CH-UA-Mobile: ?0" \
  -H 'Sec-CH-UA-Arch: "arm"' \
  -H 'Sec-CH-UA-Bitness: "64"' \
  -H 'Sec-CH-UA-Full-Version-List: "Chromium";v="120.0.6099.109", "Google Chrome";v="120.0.6099.109", "Not_A Brand";v="10.0.0.4"'

Run on your server with a secret key. Calling from a browser or app?

Example response
{
  "useragent": "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",
  "device": "desktop",
  "os": "macOS",
  "browser": "Chrome",
  "bot": false,
  "mobile": false,
  "deep": {
    "device": {
      "type": "desktop",
      "brand": "Apple",
      "model": null,
      "cpu": "arm64",
      "touchscreen": false
    },
    "os": {
      "name": "macOS",
      "version": "10.15.7",
      "platform": "ARM"
    },
    "browser": {
      "name": "Chrome",
      "version": "120.0.6099.109",
      "type": "browser",
      "brands": [
        {
          "brand": "Chromium",
          "version": "120.0.6099.109"
        },
        {
          "brand": "Google Chrome",
          "version": "120.0.6099.109"
        }
      ]
    },
    "engine": {
      "name": "Blink",
      "version": null
    },
    "headless": false
  }
}

Questions? Email