User Agent Parser API

Introduction

The User-Agent (UA) Parser API is a highly efficient and easy-to-use parsing tool that delivers clearly reliable and defined information based on the provided UA string.

The UA string is a piece of information that is included in the header of an HTTP request made by a user's web browser. This string typically contains information about the user's web browser, operating system, and device. However, the varying formats in which different browsers provide this string can make it challenging to interpret this data accurately, often requiring significant effort in coding and testing an effective parser.

This API significantly simplifies the task of parsing UA strings, providing a simple and straightforward solution.

The UA string can be used by web servers to identify the type of device and browser that is making the request and to serve up content that is optimised for that device and browser. The User-Agent string is often used in web analytics to track user activity and to provide insights into the types of devices and browsers that are accessing a website.

It can also be utilised to recognise bot traffic (denoted by 'isSpider' in the output data) by examining the distinctive User-Agent strings typically used by bots. This enables website administrators to identify and restrict bot traffic, guaranteeing accurate analytics and optimal usage of server resources by genuine users, thereby enhancing the overall user experience on the website.

Get Started

This API is part of the IP Geolocation API Package and is available in free and paid plans. Please visit the IP Geolocation API Package package page for limits and pricing information.

Endpoints

IPv4 only API Endpoint

Use this endpoint to force API calls routed over the IPv4 network only

GET
https://api.bigdatacloud.net/data/user-agent-info

Dual-Stack API Endpoint

This endpoint has native IPv6 support and backs the API calls routed over both IPv4 and IPv6 networks

GET
https://api-bdc.net/data/user-agent-info

Request

Parameter
userAgentRaw
Type
string
Required
Yes
Description
User agent string input
Parameter
key
Type
string
Required
Yes
Description
Your API key

Responses

200
Success

Sample Query

GET
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]

Schema

application/json
devicestring
The Device type parsed from the user agent string
osstring
The OS parsed from the user agent string
userAgentstring
The User-Agent parsed from the input user agent string
familystring
The family of the device, if available
versionMajorstring
The major version of the user agent, if available
versionMinorstring
The minor version of the user agent, if available
versionPatchstring
Patch version of the user agent, if available
isSpiderboolean
Returns true if the device is likely to be a spider or a bot device
isMobileboolean
Returns true if the device is likely to be of a mobile type
userAgentDisplaystring
The user agent as a readable string
userAgentRawstring
The user agent string, the input for the UA parser

Sample Response

JSON View
400
Bad request

Sample Response

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

Sample Response

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

Sample Response

JSON View
Was this page helpful?