v2

latestOpenAPI 3.1.0Proprietary2026-08-01122398.8 KB
User Agent

Parse a user-agent string

Parses a user-agent string into a structured record: client (with its type, version, maker, rendering engine, and browser-family flags), the operator the traffic acts for, os, device, and classification flags like is_bot and is_ai_crawler. Supply the string via the ua query parameter, or omit it to parse the request's own User-Agent header ("what browser am I?"). Parsing is first-party: the strings you submit are never forwarded to a third-party service. A leaf the string doesn't reveal ships as null, and a block whose every leaf resolved null collapses to a single null (os, client.engine, operator, and any maker), so guard those before reading into them. See https://restcountries.com/docs/user-agent for the full reference.

get/user-agent/v1

Query parameters

uastring

User-agent string to parse. Values may be sent raw, percent-encoded, or with + for spaces; a + is always read as a space. Omit it to parse the request's own User-Agent header.

response_fieldsstring

Comma-separated dot-path projection. Only the specified fields are returned. Example: names.common,codes.alpha_2,flag.emoji

response_fields_omitstring

Comma-separated dot-path blocklist. The specified fields are removed from the response. Useful for trimming heavy branches like names.translations.

prettyboolean

Set to true (a bare ?pretty, 1, or true) to pretty-print the JSON response; 0 or false keep it minified. Default is minified.

Response

Parse record for the resolved user-agent string, always a single object.