REST Countries

User Agent parsing, as one API call.

Hand the User Agent API any user-agent string (or none at all) and get back one structured JSON record: the client, rendering engine, operating system, and device, plus whether the agent is a bot, an AI crawler, or an AI assistant.

Hardware resolves against 50,000+ device models, so a raw model code comes back as the phone people actually call it. Read-only, one bearer token, no SDK.

Get an API key Read the docs

Try a real request

// Fires a real request against the demo API key.
// Matched against 50,000+ device models, so hardware comes back by name.
// Click the button below to run it. The response opens in the Explorer panel.
const response = await fetch(
  'https://api.restcountries.com/user-agent/v1',
  { headers: { 'Authorization': 'Bearer rc_live_demo' } }
);
const result = await response.json();

Run this request → No string supplied parses the request's own agent. The response opens in an Explorer panel on the right.

Inside one record

Every block on every parse

One record under data.objects, always the same shape. A value the string doesn't reveal comes back null. There are no optional keys.

{
  "ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/150.0.0.0 Safari/537.36",
  "label": "Chrome (v150) on macOS",
  "client": {
    "type": "browser",
    "name": "Chrome",
    "version": { "full": "150.0.0.0", "major": 150 },
    "organization": { "name": null, "email": null, "url": null }
  },
  "engine": { "name": "Blink", "version": { "full": "150.0.0.0", "major": 150 } },
  "os": { "name": "macOS", "version": { "full": "10.15.7", "major": 10 } },
  "device": { "type": "desktop", "brand": "Apple", "model": "Macintosh" },
  "attributes": {
    "is_bot": false,
    "is_ai_crawler": false,
    "is_ai_assistant": false,
    "is_frozen": true,
    "is_mobile": false
  }
}
Browsers 100+ families, plus engines & OSes
Brands 3,000+ device makers recognized
Devices 50,000+ phone & tablet models
Bot categories 20+ incl. AI crawlers & assistants

Common questions

Before you wire it in

What do I pass in?

A user-agent string via ?ua=, or nothing at all, in which case the API parses the User-Agent header the request itself came in with. Either way you get back one record.

Does it detect bots and AI agents?

Yes. Every parse carries is_bot, plus dedicated flags for AI crawlers (GPTBot, ClaudeBot) and live AI-assistant fetches (ChatGPT-User), so you can tell an indexer from a user-triggered request.

Is there an SDK to install?

No. It's a single read-only GET endpoint returning JSON, authenticated with one bearer token. See the full reference →

Start parsing agents today.

Free tier covers most prototypes. Point at /user-agent/v1 and go.

Get an API key Read the docs