User Agent Parser API

Every HTTP request includes a user-agent string — a snippet of text identifying the browser, operating system, and device making the request. The format varies significantly across clients, and parsing it reliably requires keeping up with a constantly changing landscape of browsers, bots, and device types.

This API handles that parsing for you. Pass in a raw user-agent string and get back structured data: browser name and version, operating system, device type, and whether the request is coming from a bot or crawler (the isSpider field).

The bot detection in particular is useful for keeping analytics clean and ensuring server resources are spent on genuine users rather than automated traffic.

GEThttps://api-bdc.net/data/user-agent-info

Parameters

ParameterTypeRequiredDescription
userAgentRawstringOptionalUser agent string input
keystringOptionalYour API key

Responses

200OK

Sample Request

https://api-bdc.net/data/user-agent-info?userAgentRaw=Mozilla/5.0 (iPhone; CPU iPhone OS 7_0 like Mac OS X) AppleWebKit/537.51.1 (KHTML, like Gecko) Version/7.0 Mobile/11A465 Safari/9537.53 (compatible; bingbot/2.0; http://www.bing.com/bingbot.htm)&key=[YOUR API KEY]

Sample Response

JSON View

Response Schema

devicestringThe Device type parsed from the user agent string
osstringThe OS parsed from the user agent string
userAgentstringThe User-Agent parsed from the input user agent string
familystringThe family of the device, if available
versionMajorstringThe major version of the user agent, if available
versionMinorstringThe minor version of the user agent, if available
versionPatchstringPatch version of the user agent, if available
isSpiderbooleanReturns true if the device is likely to be a spider or a bot device
isMobilebooleanReturns true if the device is likely to be of a mobile type
userAgentDisplaystringThe user agent as a readable string
userAgentRawstringThe user agent string, the input for the UA parser
400Bad request

Sample Response

JSON View
403Access denied, or your quota limit has exceeded

Sample Response

JSON View
500An error has occurred and did not complete your request. Please try again

Sample Response

JSON View