WhatIsMyBrowser.com API - Version 2 - Integration Guide

Welcome

The WhatIsMyBrowser.com API provides an easy way to discover lots of useful things about web browser technology via an API.

We provide a detailed API Specification, Sample Code, and world class support.

The API integration guide you are now reading accompanies the specs, sample code and support, taking you from the beginning all the way to being set up and integrated with the API.

API Version: 2.4.8 - 29 September, 2022

Version 2 is deprecated

This documentation is for an older version of the API. Use the Version 3 Documentation for the most accurate browser detection. Read the Migration Guide for more information.

Sign Up

Before you can access the API, you need to register an account with us and get your API Key.

Once you have your API Key, you will send this as a HTTP header to show that your requests are authorised.

If you haven't already registered, you need to do so now. Go to the Sign up/Pricing page.

You are taken to a sign up form. Complete the form and submit it. We will send you an email containing a link to verify your email address. Once you click it, you will then be able to log in with your new account.

Accounts System

Once you are logged in, you will see the Accounts System landing page looking like this:

Screenshot of the Accounts System Logged In Landing Page

The Accounts System lets you do things like Change your Billing Details, Check your API Usage and Get your API Key.

Any time you need to change something relating to the API, this is where you need to go.

You can access it at: https://accounts.whatismybrowser.com/

Get your API Key

When you signed up with us, we automatically created an "Application" for you, which controls your API Key. To find that API key, simply click the Get your API Key link in the left column of the Accounts System. You will be taken to a page which shows you details about your application, including showing you your API Key.

Screenshot of the Application Page

Make a note of this API Key and keep it secret. It controls your access to the API. Anyone with a copy of it can access the API as you and use up your monthly quota.

Read the section on Authentication in this document for information about how to use this API Key.

Creating a new API Key

If your API Key is leaked, it will allow other people to perform API requests on your behalf.

If this happens, you need to generate a new API Key and stop using the old one.

To create a new API Key, click the big green button labeled Create new API Key below where your API Key is displayed in the Accounts System (follow the instructions above to get your API Key.

Monitor API usage

Keep an eye on your API account usage by looking at the Statistics Graph in the Accounts System.

To access it, click the Check API Usage link on the homepage of the Accounts system.

You can also visit the URL: https://accounts.whatismybrowser.com/buyer/stats

You will see a graph similar to the following one, showing your usage for the last month.

Screenshot of the Application Page

It will show you your usage for each API end-point seperately, including the number of hits per day. You can filter these end points by clicking the individual API Methods up the side, to toggle their display.

Change your API Plan

It is easy to change your API plan with us. Billing is calculated daily, on a pro rata basis, so if you change part-way through a month, you will be billed accordingly.

To change your API plan, log in to the Accounts System: https://accounts.whatismybrowser.com/.

The Accounts System Homepage

Screenshot of the Accounts System Logged In Landing Page

From the logged in Home Page, click the Change your plan link in the right-hand column to edit your Application.

Edit Your Application

Screenshot of the Application Edit page

This will take you to a page which will let you edit your Application. One of the things you can edit is the plan which you are on.

At the top of the page, you will see the API plan that your account is currently using. Click the red "Review/Change" link next to it to see its features and choose another plan.

Choose your new plan

Screenshot of choosing a new plan

You can explore the different plan levels by clicking on the different levels up the side of the window. You will see the different features available on each plan. When you've found the plan you want to switch to, click the green "Change Plan" button at the bottom of the pop-over. If you want to cancel changing plans, just close the pop-over by clicking the X in the top right hand corner.

Your new plan choice will be accepted and the pop-over window will close. Your account is now on the new plan and you have immediate access to its features.

API Versioning

We want to make it easy for you to track the continuing development of the API. Like most software, we maintain a version number of the API which makes it easy to tell when there have been additions or changes to the API.

The API Versioning scheme we use is as follows:

Fragment Example Value/s Meaning
First element 2.1.2 The major version of the API. A change to this denotes a significant change to the core API. We have only changed this once - in the move from Version 1 to Version 2.
Second element 2.1.2 A change to this denotes a significant addition or change to the API - typically a new API end point.
Third element 2.1.2 A change to this denotes a minor addition or change to the API - perhaps a bug fix or a new response JSON key has been added (eg in the case of 2.1.1 and 2.1.2).

API Version number is for structure and functionality only

Note that these API version numbers only concern the structure and functionality of the API, they have no bearing on the User Agent Parsing or the Software Version Number reporting which are typically updated and expanded daily.

The user agent parsing and software versions are continually checked and updated, and when they are updated: they do not affect the version number of the API.

The version number of the API will only increase when there are changes or additions to the API itself.

API Version History

View the WhatIsMyBrowser.com API Version History.

Get help

We are dedicated to providing you with the best support we can for the API.

We provide a detailed API Specification, Sample Code, FAQ and the API Integration Guide you're reading now. If none of these can answer your problem, don't hesitate to get in touch with us; we're always happy to help.

You can send us a message via our Main Website's Contact Form.

Please include as much detail as possible with your message as possible, including the specific error messages/codes you receive. We will reply as quickly as we can. Most responses are within a few hours.

Common Elements of the API

Introduction

Each end-point of the API has a different objective, and so naturally they each accept different types of requests and provide different responses; however, there are a few elements which are common between them, so to save repeating ourselves, we describe them here.

Request and Response structure

The structure of URLs for the API is: https://api.whatismybrowser.com/api/v2/end-point

There are a number of different end points, depending on what you want the API to do for you. Refer to the individual sections of this guide for the end points you want to integrate with.

Request structure

The request structure varies by endpoint but the general idea is that if you're POST-ing something for us to process (eg. a user agent or batch of user agents), you'll send the POST body as valid JSON and we'll take it from there.

If it's a GET request, whatever you're "getting" from us will be somewhere in the URL.

Check the documentation for the end point in question.

Note that we also allow and fulfil OPTIONS requests - without affecting your API quota - so that Javascript based API requests work (many JS implementations send a pre-flight OPTIONS request which fails if we don't allow OPTIONS).

Response structure

Each end point will return data relevant to itself, but there will also always be a result dictionary containing the result of your request. This is where you look to see whether your request worked. If there was a problem you'll find a description of the problem here too.

For example:

{ "some_kind_of_data_here": {...}, "result": { "code": "success", "message_code": "user_agent_parsed", "message": "The user agent was parsed successfully." } }

In this example, you can see that the message and message_code are from the User Agent Parse end point, but there is the common code key which will be either success or error.

Key Possible Values Description
code
  • success
  • error
A machine readable message that tells you whether your request was sent correctly and whether we handled it properly, or if there was some kind of problem on either end. Look at the message/message_code fields for more detail.
message Varies by end-point A human readable message that tells you specifically how your request was handled by the API.
message_code Varies by end-point A machine readable message that tells you specifically how your request was handled by the API.

The message fields

The message and message_code fields in the API response's result key will give you more detail about how your request was handled.

Generally speaking, if your request was successful, they will be something relating to your end point (eg. "The user agent was parsed successfully."). If there was some kind of problem the message will tell you more about the problem (eg. "No user_agents key was provided in the request"; or it may also be a more general kind of error: "No X-API-KEY header provided in the request".)

Message and Message Code

Inside the result key, the message key will contain a human readable message which is constructed for developers to read and get a better understanding of your request result, as well as this the message_code is specifically built for your software to inspect.

For example, your code can look for and handle scenarios like a message_code being usage_limit_exceeded, and know to not send any more API requests until the next month.

Your code should never inspect the contents of message and make decisions based on it. Instead: your code should look at message_code.

While we're always very careful... a human readable message string can still theoretically change - perhaps a minor punctuation correction, or meaningful clarification...

However message_code is specifically built to never change, so if your code checks for certain values, you can be assured that it will always work the same way.

Common message_code values

The following table doesn't show all of the message codes which the API can return. Each endpoint has one or more message/message codes when your request was successful. Those endpoints will also have some "error" messages/messages codes specific to them as well. Make sure to read the documentation for those end points for more information.

Here is a list of the common error messages/message codes which the API may return. Similar to the "success" results, they will appear in the JSON result similar to this - for example:

{ "maybe_some_kind_of_data_here": {...}, "result": { "code": "error", "message_code": "api_system_error", "message": "The API system has encountered a problem; we have been automatically notified and will resolve this issue as soon as possible." } }

Possible message_code when code is error

message_code Description
api_system_error Some kind of Server Side Error (500) has occurred.
invalid_api_version Version 2 of the API is the latest version. So if you try to access an end point starting with /api/v3/ or higher you will get this error.
invalid_http_request_method Your request was sent with the wrong method: Perhaps you sent it as a GET instead of a POST. (or maybe vice-versa)
missing_api_authentication Your request didn't contain the X-API-KEY.
Refer to Debugging Authentication.
usage_limit_exceeded Your account has gone over your monthly quota for this end point.
api_authentication_invalid The API Key sent in X-API-KEY was incorrect.
Maybe you generated a new one? Get your API Key.
endpoint_not_available_for_this_api_version Version 1 of the API has been deprecated (but not discontinued). However new end points will not be back-ported to Version 1.
You are trying to access one of the new end points on an older version of the API.
endpoint_not_available_for_your_plan You tried to access an API End Point that your plan doesn't have access to. Change your API Plan.
invalid_end_point 404 End Point not found. Check the URL.
invalid_json We couldn't decode valid JSON from your request. Help with debugging JSON issues.

HTTP Status Codes

As well as returning result messages and codes, we also return meaningful HTTP Status Codes.

Status Code Name Description
200 Success We handled your request successfully.
400 Bad request There was something wrong with your request.
Check the "message" fields for more information.
401 Invalid API Key Your API Key is wrong. Get your API Key.
403 Quota exceeded You have gone over your monthly limit. Monitor API usage.
404 Not Found The End Point URL you requested was incorrect.
405 Wrong method You did something like send a GET instead of a POST (or maybe a POST instead of a GET)
500 Server Error We've had some kind of error on our end.

TLS Security

You can access the API via either the http or https protocol.

We recommend using https.

Authentication

Authenticating your API requests is done by sending a HTTP Header called: X-API-KEY with the value being your API Key which you got by following the Get your API Key instructions.

Here are some relevant snippits of sample code showing this to give you the idea.

Authentication example using Python & the Requests Module

import requests headers = { 'X-API-KEY': config.api_key, } result = requests.post(api_url, data=json.dumps(post_data), headers=headers)

Authentication example using PHP & the cURL Module

$headers = [ 'X-API-KEY: '.$api_key, ]; curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);

As per the HTTP RFC 2616, header field names are not case sensitive, so it doesn't matter if you send the header as X-API-KEY or x-api-key.

For examples in more programming languages, please look at our Sample Code.

Authentication Issues and Errors

Missing API Key

If you don't send the your API Key in the X-API-KEY HTTP header, you will receive a response like:

{ "result": { "code": "error", "message": "No X-API-KEY header was provided in the request", "message_code": "missing_api_authentication" } }

This can happen for a number of reasons, check out the section on Debugging Authentication Problems.

Invalid API Key

If you send an incorrect X-API-KEY, you will receive a response like:

{ "result": { "code": "error", "message": "user key QWERTYIOPSDFJLKJ is invalid", "message_code": "api_authentication_invalid" } }

Note that the API Key that you sent through is included in the result message; so that you can confirm that you are sending the key that you intend to.

This error can occur if you generate a new API key but don't update your code to send the new API key through.

If you're stuck, check out the section on Debugging Authentication Problems.

No access to end point

If you send a valid API Key but your account's plan does not have access to the specified end point, you will receive a response like:

{ "result": { "code": "error", "message": "The plan your account is on (basic) does not have permission to access this API endpoint. Please upgrade to a plan which grants you access.", "message_code": "endpoint_not_available_for_your_plan" } }

You will get this kind of response if you do something like try to access the User Agent Batch Parser on the Basic plan.

If you want permission to access to the end point you're trying to use, you can upgrade your API Plan.

Usage Limit Exceeded

If you send a valid API key but your account has gone over it's monthly limit for this end point, you will receive a response like:

{ "result": { "code": "error", "message": "Your account has gone over its limit for this month. Please consider upgrading your plan.", "message_code": "usage_limit_exceeded" } }

Note that end points are metered independently of each other; so you might have exceeded the limit of one end point but can still use other ones.

You can monitor your account usage in the Accounts System -> View API Usage.

We will send you warning emails when you are at 90% and 100% of your limits.

User Agent Parsing

Introduction

The User Agent Parse end point allows you to send a User Agent String and received a detailed response back, describing as much as we can tell you about it in individual fields.

The User Agent Parse end point is designed for parsing individual user agents, one at a time; if you need to parse a large batch of user agents then you should look at the User Agent Batch Parsing end point.

User Agent Parse - Request and Response

Making an API request to the User Agent Parse end point is quite straightforward.

Request

End Point URL https://api.whatismybrowser.com/api/v2/user_agent_parse
HTTP Method POST
HTTP POST Body Send the user agent in a JSON dict; in a key called user_agent

HTTP POST Body

To send a user agent string to be parsed, you simply need to put it in a JSON key named user_agent and POST it to the API.

{ "user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.140 Safari/537.36" }

Response

This is an example response (with line breaks to make it readable) containing all parse fields for the user agent given in the example request (above).

{ "parse": { "simple_software_string": "Chrome 64 on Mac OS X (Mavericks)", "simple_sub_description_string": null, "simple_operating_platform_string": null, "software": "Chrome 64", "software_name": "Chrome", "software_name_code": "chrome", "software_version": "64", "software_version_full": [ "64", "0", "3282", "140" ], "operating_system": "Mac OS X (Mavericks)", "operating_system_name": "Mac OS X", "operating_system_name_code": "mac-os-x", "operating_system_version": "Mavericks", "operating_system_version_full": [ "10", "9", "5" ], "operating_system_flavour": null, "operating_system_flavour_code": null, "operating_system_frameworks": [], "operating_platform": null, "operating_platform_code": null, "operating_platform_code_name": null, "operating_platform_vendor_name": null, "software_type": "browser", "software_sub_type": "web-browser", "hardware_type": "computer", "hardware_sub_type": null, "hardware_sub_sub_type": null, "layout_engine_name": "Blink", "layout_engine_version": [], "extra_info": {}, "extra_info_dict": {}, "capabilities": [], "detected_addons": [], "is_abusive": false, "is_weird": false, "is_restricted": false, "is_spam": false, "user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.140 Safari/537.36" }, "sanitization": { "user_agent_sanitized": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.140 Safari/537.36" }, "version_check": { "is_checkable": true, "is_up_to_date": true, "latest_version": [ "64", "0", "3282", "140" ], "update_url": "https://www.whatismybrowser.com/guides/how-to-update-your-browser/chrome", "download_url": "https://www.google.com/chrome/", "release_date": "2018-01-24", "hours_released_ago": "278" }, "result": { "code": "success", "message": "The user agent was parsed successfully.", "message_code": "user_agent_parsed" } }

Parse Options

It's possible for you to specify options/settings for the way that user agents are parsed. To do this, include a dictionary of options values as a part of your request that will change how we parse it or return the response in certain circumstances.

To add parse options to your request, add another key containing a dictionary, along-side the user_agent key that you send in the JSON body. For example:

{ 'user_agent': "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/50.0.2625.0 Safari/537.36", "parse_options": { "allow_servers_to_impersonate_devices": true, "dont_sanitize_before_parse": true } }

Parse Option: Allow servers to impersonate devices

Our parser was built from the beginning to be as accurate as possible; so for example, when a Crawler (Bot) comes along (GoogleBot for example), we report its hardware as being a server - this is because the bot is actually running on a server somewhere.

However, sometimes bots will add extra fragments to make it seem like the request is actually coming from a Mobile device, such as a Phone or Tablet. We realise that some customers would prefer that the hardware the server is impersonating be detected, instead of the fact that it's running on a server.

To cater for this scenario, we've added an option which lets you control how we detect the hardware for servers (including analysers, site monitors and so on)

By default, we would detect the hardware for a user agent like:

Mozilla/5.0 (iPhone; U; CPU iPhone OS 4_1 like Mac OS X; en-us) AppleWebKit/532.9 (KHTML, like Gecko) Version/4.0.5 Mobile/8B117 Safari/6531.22.7 (compatible; Googlebot-Mobile/2.1; +http://www.google.com/bot.html)
as
{ "parse": { "software_name": "Googlebot Mobile", [...] "hardware_type": "server", "hardware_sub_type": null, "hardware_sub_sub_type": null, [...] } }
and the Operating System and Operating Platform values would all be null as well.

However, if you sent the same user agent with the setting enabled, eg:

{ 'user_agent': "Mozilla/5.0 (iPhone; U; CPU iPhone OS 4_1 like Mac OS X; en-us) AppleWebKit/532.9 (KHTML, like Gecko) Version/4.0.5 Mobile/8B117 Safari/6531.22.7 (compatible; Googlebot-Mobile/2.1; +http://www.google.com/bot.html)", "parse_options": { "allow_servers_to_impersonate_devices": true } }

the relevant parts of our response would be:

{ "parse": { "software_name": "Googlebot Mobile", [...] "hardware_type": "mobile", "hardware_sub_type": "phone", "hardware_sub_sub_type": null, "simple_operating_platform_string": "Apple iPhone", "operating_system_name": "iOS", "operating_system_name_code": "ios", "operating_system": "iOS 4.1", "operating_system_version": "4.1" "operating_system_version_full": [ "4", "1" ], "operating_platform": "iPhone", "operating_platform_vendor_name": "Apple", [...] } }

You can see that the hardware type/sub-type has been detected as "Mobile -> Phone", and the Operating System and Operating Platform show that it's an Apple iOS device.

The software will still be shown as GoogleBot, as this is what the agent is, but instead of appearing to be on a server, it gets detected as coming from a mobile device.

Notes:

  • The idea behind this is that you send that setting with every request to the API... you don't want to try to send it only with the bots or anything (...because how would you know in the first place!) - the setting only has any effect if the hardware is a Server. It's perfectly fine to just send it with every request.
  • If the user agent is for a bot that doesn't try to impersonate mobile hardware (eg. Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html), then it will be detected as running on a server as normal; this setting only has an effect when there's also the mobile-ish fragments as well (iPhone/Android/BlackBerry etc)
  • This setting works for the User Agent Batch Parsing end point as well.

Parse Option: Don't sanitize user agents before parsing them

If for some reason you don't want us to sanitize the user agent you provide before we parse it, you can set the "dont_sanitize_before_parse": true in the parse_options to stop it. We don't recommend it, but the option is there for you if you want.

Field Definitions

This is a detailed description of the parts of a user agent parse response.

The JSON in a successful response will contain parse and result dictionaries. If you are on any of the paid plans (Standard, Pro or Enterprise) you will also get a version_check dictionary which contains information about whether their software is up to date or not.

parse key elements

These are the fields you will find in a user agent parse response under the parse key.

The availablility of some of the user agent parse fields depends on which API plan your account has access to. If you don't have access, they will not appear in the response. It is easy to change your API plan.

Field Name Plan Example Value/s Description
simple_software_string
  • Basic
  • Std
  • Pro
  • Ent
Chrome 64 on Mac OS X (Mavericks) A nice description of the Software and Operating System (or Platform - when possible and when there’s not also an Operating System). Very human readable; intended to be shown to end-users.
simple_sub_description_string
  • Basic
  • Std
  • Pro
  • Ent
Internet Explorer 7 Compatibility View A nice sub-description of the software and/or platform being used. It won’t always have a value, but when it does, it always compliments or further explains the simple_software_string.
simple_operating_platform_string
  • Basic
  • Std
  • Pro
  • Ent
Samsung Galaxy Tab S2 9.7" (SM-T817R4) A nice description of whatever can be detected as the hardware platform. While the various parts of this string (operating platform, operating platform vendor name, operating platform code etc) will also be available in their individual respective fields, this field combines them in a readable form depending on which values are actually available.
software
  • Basic
  • Std
  • Pro
  • Ent
Chrome 64 The software name and a human readable / summarised version of the software (eg Chrome 64.0.3282.140 will be summarised here as "Chrome 64")
software_name
  • Basic
  • Std
  • Pro
  • Ent
Chrome The name of the software sending the request
software_name_code
  • Basic
  • Std
  • Pro
  • Ent
chrome A “slugged” version of the software_name - removed special characters, removed spaces, lower case, combined with single hyphens. Useful for referring to in your code/database.
software_version
  • Basic
  • Std
  • Pro
  • Ent
64 A "human readable"/simplified version of the version of the software being used. Note that it is a string, not an integer (to accomodate values like “3.8”).
software_version_full
  • Basic
  • Std
  • Pro
  • Ent
["64", "0", "3282", "140"] The full version of the software making the request.
operating_system
  • Basic
  • Std
  • Pro
  • Ent
Mac OS X (Mavericks) A nice, readable description of the Operating System and major version (if possible)
operating_system_name
  • Basic
  • Std
  • Pro
  • Ent
Mac OS X The name of the Operating System
operating_system_version
  • Basic
  • Std
  • Pro
  • Ent
Mavericks A “readable” version description of the Operating System - eg for OSX it might say "Mavericks" (instead of “10.9.5”) for Windows it might say 10 (instead of "NT 10.0")
operating_system_version_full
  • Basic
  • Std
  • Pro
  • Ent
["10", "9", "5"] The detailed version number for the Operating System (For Windows it might be ["NT 6.1"])
operating_system_name_code
  • Basic
  • Std
  • Pro
  • Ent
mac-os-x A "slugged" version of the operating_system_name. Useful for referring to in your code/database.
operating_system_flavour
  • Basic
  • Std
  • Pro
  • Ent
Debian Sometimes it’s even possible to determine a flavour / distribution / variant of an operating system. This allows (for example) all the different types of Linux to just be "Linux" and not "Debian Linux" to group them all together in your database or code, yet still make a distinction between the "flavours" of Linux when possible / desired.
operating_system_flavour_code
  • Basic
  • Std
  • Pro
  • Ent
debian A slugged version of operating_system_flavour
operating_platform
  • Pro
  • Ent
Galaxy Tab S2 9.7" (SM-T817R4) A nice, readable description of the Operating Platform
operating_platform_code
  • Pro
  • Ent
SM-T817R4 The product number/code number or other technical description of the operating platform.
operating_platform_code_name
  • Pro
  • Ent
Galaxy Tab S2 9.7" The branded name for the code/model
operating_platform_vendor_name
  • Pro
  • Ent
Samsung The name of the vendor/manufacturer of the platform.
operating_system_frameworks
  • Pro
  • Ent
[{ "code": "microsoft-dotnet", "name": "Microsoft .Net", "versions": [ { "simple": "4.0", "full": [ "4", "0E" ] }, { "simple": "4.0", "full": [ "4", "0C" ] }, { "simple": "3.5", "full": [ "3", "5", "30729" ] } ] }]
This field was designed to hold a detailed breakdown of all the Microsoft DotNet frameworks contained in a user-agent (because some user agents contain more than five or six of them!)
extra_info_dict
  • Pro
  • Ent
{ "Dalvik library version": "1.6.0", "System Build": "SU6-7.3" }
A dictionary of various other things which can be discovered from the user agent. If a software library can be detected, it will be found here.
extra_info
  • Pro
  • Ent
{ "10": [ "Internet Explorer 7 Compatibility View" ], "20": [ "Possibly running on Windows Server 2008", "Tablet PC" ] }
This contains various bits of information that can be gathered from the user agent but which doesn't fit in to any of the other API fields. It is a dictionary of lists; The ones in the 10 key are considered more important or interesting than the rest. They are the ones which are combined to make up the "simple_sub_description_string". Elements in the 20 element are of "medium" level significance. 30 has been reserved for "low" level significance.
capabilities
  • Pro
  • Ent
[ "Touch capability", "Silk Accelerated", "MIDP v2.1" ]
Various capabilities which have been detected.
detected_addons
  • Pro
  • Ent
[ "Yahoo Toolbar v7.3.0", "Windows Live Messenger v15.4", "ImageShack Toolbar v4.3" ]
Addons/Extensions which can be detected via the user agent. This section can only show addons which announce themselves in the user agent.
layout_engine_name
  • Pro
  • Ent
WebKit The name of the HTML Layout Engine
layout_engine_version
  • Pro
  • Ent
[ "537", "36"] The version number list of the HTML Layout Engine
software_type
  • Std
  • Pro
  • Ent
It can be one of these values:
  • browser
  • bot
  • application
A "top-level" description of the type of software making the request.
This allows us to broadly categorise software into these three major types of user agent, and then also be very specific about the type of software (via the software_sub_type field)
A browser implies a certain level of interactivity - the user is most likely directly browsing your site.
A bot seems to be some kind of automated system, crawling, analysing, monitoring your site.
An application is for the things which don’t fit into either of those two other categories - maybe its a billboard, or perhaps a download helper.
software_sub_type
  • Std
  • Pro
  • Ent
Possible values when software_type is browser:
  • web-browser
  • in-app-browser
Possible values when software_type is bot:
  • crawler
  • analyser
  • tool
  • security-analyser
  • site-monitor
  • feed-fetcher
Possible values when software_type is application:
  • billboard
  • download-helper
  • software-library
  • proxy
  • media-player
  • content-fetcher
  • assistant
The "sub-type" of the software - If you combine it with software_type, you will get a clear picture of the software making the request. These are the sub-types for the three software_type values.
hardware_type
  • Std
  • Pro
  • Ent
It can be one of these values:
  • mobile
  • computer
  • appliance
  • large-screen
  • server
  • vehicle
A “top-level” description of the type of hardware the software making the request is using.
hardware_sub_type
  • Std
  • Pro
  • Ent
Possible values when hardware_type is mobile:
  • phone
  • tablet
  • phablet
  • ebook-reader
  • handheld-game
  • music-player
  • pda
  • wearable
Possible values when hardware_type is computer:
  • desktop
  • portable
Possible values when hardware_type is appliance:
  • refrigerator
  • toaster
  • lightbulb
  • security-camera
Possible values when hardware_type is large-screen:
  • tv
  • billboard
  • media-player
  • game-console
Possible values when hardware_type is server:

None - Server doesn't have a hardware sub type

Possible values when hardware_type is vehicle:
  • car
The “sub-type” of the hardware - If you combine it with hardware_type, you will get a clear picture of the hardware the software making the request is running on. These are the sub-types for the seven hardware_type values.
Note that it’s not always possible to determine one of these hardware_sub_type values - for example most user agents on a computer look the same whether they’re on a desktop or a portable laptop...
hardware_sub_sub_type
  • Std
  • Pro
  • Ent
Possible values when hardware_sub_type is wearable:
  • watch
  • glasses
  • vr
In some cases, it’s possible to determine a third-level of specificity about the hardware being used (for now, this is only possible on mobile -> wearable devices)
is_abusive
  • Basic
  • Std
  • Pro
  • Ent
  • true
  • false
Whether or not this user agent contains a fragment which could be considered abusive or malicious. Often criminals will try to put SQL Injection attempts, XSS or command injection attempts into user agents because some sites don’t handle user agents properly. We believe that all our customers should have access to this field, so it's available for the Basic tier as well. Read more about our user agent checking features.
is_restricted
  • Std
  • Pro
  • Ent
  • true
  • false
Whether or not this user agent contains one or more "restricted" fragments in it. These are fragments which are either "crude or naughty", or which generally aren't considered right for public display. Read more about our user agent checking features.
is_spam
  • Std
  • Pro
  • Ent
  • true
  • false
Whether or not this user agent contains fragments which seem to be "spammy". Read more about our user agent checking features.
is_weird
  • Std
  • Pro
  • Ent
  • true
  • false
Whether or not this user agent seems "weird" in one way or another. We have many, many checks for different ways user agents can be weird, messed up or in some way weird, contradictory or generally have a problem. If the user agent you send us looks weird, we'll flag it for you. Read more about our user agent checking features.
is_weird_reason_code
  • Std
  • Pro
  • Ent
  • didnt_have_software_version_but_needs_one
  • has_contradictory_info
  • all_lower_case
  • has_obvious_rubbish_fragment
  • known_fake_structure
  • fake_version_number
  • missing_too_much_parse_data_to_not_be_weird
  • entirely_symbols

...and so on.... We have dozens of different sorts of checks like this.

There are so many reasons we might consider a useragent to be "weird" - many of them subtle - that we decided to add a field to describe the reason we're considering the user agent to be weird. For more information and the full list of reasons, read the feature page about detecting weird user agents.
user_agent
  • Basic
  • Std
  • Pro
  • Ent
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.140 Safari/537.36 The user agent which was sent to the API and parsed is also returned in the response, allowing you to confirm / debug exactly what we received.

Notes on is_abusive, is_weird, is_restricted, is_spam

These fields are best attempts at warning you if there may be problems with the user agent that you sent to our API. We don't disclose the specifics around restricted words, fragments, and patterns to help prevent criminals from finding workarounds.

sanitization key elements

These are the fields you will find in a user agent parse response under the sanitization key.

We will always include a "sanitized" version of the user agent in the response. You are welcome to ignore it or do whatever you need with it (for example, compare what you submitted to what was returned to see if we have fixed a problem with it, or perhaps store it in your system instead of the raw, unprocessed user agent that was originally submitted).

Sanitizing before parsing

By default, for our paid customers we will sanitize the user agents you submit, before parsing them. We do this because encoding problems in user agents can impact and degrade the quality of the parse results (eg our parser may look for two words separated by a space, but if the space is instead %20 then the parsing won't work properly). If for some reason you don't want us to do this before we parse them, you can set the "dont_sanitize_before_parse": true in the parse_options to stop it. We don't recommend it, but the option is there for you if you want.

The sanitization key is available for paid plans (Standard, Pro or Enterprise). If you need access to it it is easy to change your API plan.

Field Name Plan Example Value/s Description
user_agent_sanitized
  • Std
  • Pro
  • Ent
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.140 Safari/537.36 This field returns a copy of the user agent you sent after it's been processed by our "preprocessor". If there's nothing to fix, it will be the same as the user agent you sent (and what's returned in parse.user_agent)

Notes on sanitization/preprocessing

Sometimes user agents are sent to the API which have some types of problems with them that we can fix; our sanitizer / preprocessor fixes as many issues as possible before we parse the user agent you sent us. It's available on any of the paid plans (and can optionally be turned off if you want).

You may not need to worry about this feature; however it's very handy if you need to sanitize/prepare user agents before storing them in your database. Things like GUIDs or encoding problems can cause massive issues with duplication in your database. We built this originally for ourselves; because we had issues with millions of "almost-duplicate" user agents in our database; separated only by unique GUID or "anonymizer" strings.

There are three major functions of the sanitizer:

  1. Fixing encoding issues with user agents

    Sometimes user agents are encoded incorrectly when they are sent to the API.

    The main cause of this is that visitors are sending you user agents with encoding problems in the first place, but occasionally our customers have problems with their API code which isn't sending the requests to our API correctly.

    It will do things like convert:

    Mozilla/4.0+(compatible;+MSIE+6.0;+MS+Web+Services+Client+Protocol+2.0.50727.8940)

    In to:

    Mozilla/4.0 (compatible; MSIE 6.0; MS Web Services Client Protocol 2.0.50727.8940)

    Our preprocessor will these sorts of errors as best as possible.

  2. Removing GUIDs and other unique fragments from User Agents

    Something else the user agent preprocessor does is remove as many unique/random fragments as possible. For example, many user agents have GUIDs in them.

    It will reduce user agents like:

    Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; CK={cR1Oj2P+w+Wd8PdQtvneboQ7bvsE7SbR+Wvzp1APzmHlfbUGLHQT02pcw3jtBivKIwIgjn4fcfNyTuoijSW7Y3JExTmP7Zr0})

    In to:

    Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; CK={})

  3. Removing weird encoded fragments

    The sanitizer will also remove weird fragments that look like some kind of encoding, changing a user agent like:

    Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/31.0.1650.224 Safari/537.36 ijkypxh+p7TNu736xudKvZSwjSo=

    to:

    Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/31.0.1650.224 Safari/537.36

    We have dozens of different fixes for a wide variety of different unique strings we see in user agents.

  4. Removing date stamps

    We've seen lots of user agents with a variety of datestamps in them, presumably added at the time the request was made. The sanitizer will attempt to remove those fragments.

  5. Fixing general problems with user agents

    There's a third class of functionality that the preprocessor provides, and that's removing general, miscellaneous issues with user agents. For example, we've seen misbehaving user agent changing plugins accidentally wrapping user agents with quotation marks which again clog up your logs and database with "almost-duplicate" user agents. We'll automatically fix issues like this for you using the preprocessor.

These fixes work together, so that a user agent like this:

Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/31.0.1650.224 Safari/537.36 ijkypxh+p7TNu736xudKvZSwjSo= 2014-05-16T17:21:22.531Z

which is a user agent that our systems saw in the wild, is neatly reduced to:

Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/31.0.1650.224 Safari/537.36

which allows it to be neatly grouped together with other user agents of the same kind, if so desired.

version_check key elements

These are the fields you will find in a user agent parse response under the version_check key.

The version_check key is available for paid plans (Standard, Pro or Enterprise). If you need access to it it is easy to change your API plan.

Field Name Plan Example Value/s Description
is_checkable
  • Std
  • Pro
  • Ent
  • true
  • false
Whether or not the API is able to check if this software is up to date. Version Checking exists for Chrome, Safari, Edge, Firefox, Internet Explorer and Opera.
is_up_to_date
  • Std
  • Pro
  • Ent
  • true
  • false
Whether or not the software is considered up to date. Will not exist in the response if is_checkable is false.
latest_version
  • Std
  • Pro
  • Ent
["64", "0", "3282", "140"] If we provide version checking for this browser/software, then latest_version will contain what we consider the latest version. This is helpful for displaying messages like 'You should upgrade to version XYZ' to your users.
update_url
  • Std
  • Pro
  • Ent
https://www.whatismybrowser.com/guides/how-to-update-your-browser/chrome URL of webpage which will give instructions to upgrade their web browser (this will be present for only some browsers)
download_url
  • Std
  • Pro
  • Ent
https://www.google.com/chrome/ URL of a webpage where your user can download the browser from (this will be present for only some browsers)
release_date
  • Std
  • Pro
  • Ent
2020-05-24 The date (UTC) when the most recent version of this browser was released.
hours_released_ago
  • Std
  • Pro
  • Ent
156 How many hours ago (approximately) was this new version released.

Notes on Version Checking

Chrome version checks

When we perform "up to date" checks on Chrome user agents, by comparing the version number in the user agent to what we have on record as being the latest version number of Chrome, we compare just the first three version number fragments.

For example: we perform the version number comparison on 91.0.4472 instead of 91.0.4472.164.

The reason for this is that we have found that occasionally the version data from various online sources that we extract version numbers from for Chrome from is slightly different to what a completely up to date version of the Chrome browser itself reports as the latest version.

The difference is always in that fourth and final version fragment of the Chrome version number.

In other words, a fully up to date copy of Chrome might have a version number that the very last version fragment is behind what we have been told is the latest version number of Chrome. On the occasions that this happens, it results in an incorrect warning that the copy of Chrome is out of date.

Experimentation has shown that we actually get more accurate "version checks" by comparing just the first three version fragments instead of all four (as there are no longer false positives).

Notes on hours_released_ago

Some software packages (eg Chrome) don't release the latest version of their browser in all regions of the world all, at the one time. It can take many hours to complete a global distribution of the latest version.

As such, for some users in some regions, they may no longer technically have the very latest version of their browser, but their auto-update tool isn't able to download the latest version yet. This can be confusing if you tell them that they're out of date when their browser thinks that it isn't out of date...

The hours_released_ago field makes it easy to add a slight delay to the "please update your browser" message that you may show your users.

You might have a bit of code that does something like:

if is_up_to_date == False and hours_released_ago > 24: // Inform user to update their browser

We include this as an integer value in the API response to make it very easy for you to determine how long ago the latest version was released and if you want to show the message to your users.

The value will reset each time a new version of that software is released.

result key elements

Remember: there are some message_code values which are common to all end points (eg api_authentication_invalid) - Read more.

The following tables describe message_code values which are unique to the User Agent Parse end point.

Possible message_code when code is success

message_code Description
user_agent_parsed The user agent was parsed successfully.

Possible message_code when code is error

message_code Description
no_user_agent No user_agent provided in the request. You sent valid JSON but we didn't see the user_agent key in it.
invalid_user_agent_type You sent a user_agent value in the JSON but it wasn't a string (maybe it was a list or an int?).
user_agent_seems_like_a_hash You sent a user_agent value in the JSON but it didn't look like a user agent; it looked like a hash (32 characters, no spaces, A-F 0-9 characters. We've had customers accidentally sending md5s of user agents instead of the user agents themselves, so we added this check to help prevent this.

Caching the API Response

You are welcome (and even encouraged!) to implement a relatively short cache between your server and the API. This can help minimize parse times on your end for popular browsers and bots. If you get thousands of people using the exact same version of Chrome and Operating system - all with the exact same user agent, it makes sense to minimize youre quota use and increase the parse speed by caching our API result for a few hours.

Our version check info updates every three hours, so you might consider caching results for three hours.

User Agent Batch Parsing

Introduction

The original User Agent Parse end point was created for parsing individual user agents and returning a response very quickly. But if you've got a large batch of user agents stored in a database or set of log files and don't mind too much about how long it takes to process, it makes much more sense to send those user agents through in a large batch instead of making a different HTTP request for each user agent. This is where the user agent batch parsing end point comes in handy.

The maximum batch size is 500 user agents per request.

User Agent Parse Batch - Request and Response

Making an API request to the User Agent Parse Batch end point is quite straightforward.

Request

End Point URL https://api.whatismybrowser.com/api/v2/user_agent_parse_batch
HTTP Method POST
HTTP POST Body Send your batch of user agents in a JSON dictionary key called user_agents. You need a unique key in user_agents for each individual user agent, so that you can match up the parse results in the response.

HTTP POST Body

It doesn't matter what the individual keys of user_agents are, as long as they are unique to your HTTP request (it also doesn't matter if you reuse keys in different requests - each request is independent of other requests). If your batch of user agents is coming from a database, you might use the primary key for each user agent. As per the JSON specification, dictionaries can't be relied on to have a certain ordering - so you can't assume that the tenth parse result will correspond with the tenth user agent you sent through, and thus the unique key is necessary for you to be able to match user agent parse results back to what you sent through.

If you have no need to match them back to an original record (eg. to update a database) and instead are just making a report about each of your user agents, you can just start with an arbitary number and increment it for each one you send through - and then disregard it in the response and just loop over each result in parses.

{"user_agents": { "1": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/44.0.2403.155 Safari/537.36", "2": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/42.0.2311.135 Safari/537.36" }}

Response

This is an example response (with line breaks to make it readable) for the user agent batch given in the example request (above).

{ "parses": { "1": { "parse": { "hardware_type": "computer", "operating_system_name": "Mac OS X", "software_sub_type": "web-browser", "operating_system_version": "Yosemite", "simple_sub_description_string": null, "software_type": "browser", "hardware_sub_sub_type": null, "extra_info": {}, "software_version_full": [ "44", "0", "2403", "155" ], "software_name_code": "chrome", "layout_engine_name": "Blink", "capabilities": [], "operating_system_flavour_code": null, "detected_addons": [], "operating_system_flavour": null, "operating_system_frameworks": [], "hardware_sub_type": null, "software_name": "Chrome", "software_version": "44", "simple_operating_platform_string": null, "operating_platform_vendor_name": null, "operating_platform": null, "extra_info_dict": {}, "is_abusive": false, "is_weird": false, "is_restricted": false, "is_spam": false, "operating_system": "Mac OS X (Yosemite)", "operating_system_version_full": [ "10", "10", "4" ], "operating_platform_code": null, "operating_platform_code_name": null, "operating_system_name_code": "mac-os-x", "layout_engine_version": [], "simple_software_string": "Chrome 44 on Mac OS X (Yosemite)", "user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/44.0.2403.155 Safari/537.36", "software": "Chrome 44" }, "sanitization": { "user_agent_sanitized": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/44.0.2403.155 Safari/537.36" }, "version_check": { "latest_version": [ "64", "0", "3282", "119" ], "is_checkable": true, "is_up_to_date": false, "update_url": "https://www.whatismybrowser.com/guides/how-to-update-your-browser/chrome", "download_url": "https://www.google.com/chrome/", "release_date": "2015-07-21", "hours_released_ago": "147" }, "result": { "message": "The user agent was parsed successfully.", "code": "success", "message_code": "user_agent_parsed" } }, "2": { "parse": { "hardware_type": "computer", "operating_system_name": "Linux", "software_sub_type": "web-browser", "operating_system_version": null, "simple_sub_description_string": null, "software_type": "browser", "hardware_sub_sub_type": null, "extra_info": {}, "software_version_full": [ "42", "0", "2311", "135" ], "software_name_code": "chrome", "layout_engine_name": "Blink", "capabilities": [], "operating_system_flavour_code": null, "detected_addons": [], "operating_system_flavour": null, "operating_system_frameworks": [], "hardware_sub_type": null, "software_name": "Chrome", "software_version": "42", "simple_operating_platform_string": null, "operating_platform_vendor_name": null, "operating_platform": null, "extra_info_dict": { "Hardware Architecture": "x64" }, "is_abusive": false, "is_weird": false, "is_restricted": false, "is_spam": false, "operating_system": "Linux", "operating_system_version_full": [], "operating_platform_code": null, "operating_platform_code_name": null, "operating_system_name_code": "linux", "layout_engine_version": [], "simple_software_string": "Chrome 42 on Linux", "user_agent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/42.0.2311.135 Safari/537.36", "software": "Chrome 42" }, "sanitization": { "user_agent_sanitized": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/42.0.2311.135 Safari/537.36" }, "version_check": { "latest_version": [ "64", "0", "3282", "119" ], "is_checkable": true, "is_up_to_date": false, "update_url": "https://www.whatismybrowser.com/guides/how-to-update-your-browser/chrome", "download_url": "https://www.google.com/chrome/", "release_date": "2015-04-14", "hours_released_ago": "164" }, "result": { "message": "The user agent was parsed successfully.", "code": "success", "message_code": "user_agent_parsed" } } } "parse_stats": { "total": 2, "success": 2, "error": 0 }, "result": { "message": "This batch of user agents was processed successfully. Check `parse_stats` for details.", "code": "success", "message_code": "user_agents_batch_processed" } }

Parse Options

The User Agent Parse Batch end point has the same options as the standard User Agent Parse end point.

Please refer to Parse Options for the User Agent Parse end point and use them in the same way.

Field Definitions

This is a detailed description of the parts of a user agent parse batch response.

The JSON in a successful response will contain parses, parse_stats and result dictionaries.

parses key elements

The parses element is a dictionary - the keys are the unique keys you sent through in your user_agents dictionary. The contents of each parses element follow exactly the same rules as an individual user agent parse request. Each element will have it's own result key, just like an individual parse response, and if your account has access to version checking (ie. It's on a Standard, Pro or Enterprise plan), you will also get sanitization and version_check dictionaries.

Go through each user agent in parses and match it's key with whatever system you used to create the keys with in the first place - perhaps database "primary keys".

parse_stats key elements

To give you some summary information about your batch request, parse_stats contains a summary of the batch which was just processed.

total The total number of user agents in the parses element. It should match the number of user agents you sent through.
success Number of successful parses - even if a user agent couldn't be detected or was considered abusive, it will still be "successful" - it just means that there wasn't a problem with the actual request you made.
error Number of failed parses - perhaps a user agent in parses wasn't a string or there was some other core issue.

result key elements

Remember: there are some message_code values which are common to all end points (eg api_authentication_invalid) - Read more.

The following tables describe message_code values which are unique to the User Agent Parse Batch end point.

Possible message_code when code is success

message_code Description
user_agents_batch_processed The batch of user agents was parsed successfully.

Possible message_code when code is error

message_code Description
no_user_agents No user_agents provided in the request. You sent valid JSON but we didn't see the user_agents key in it.
invalid_user_agents_type You sent a user_agents value in the JSON but it wasn't a dict (maybe it was a string or a list?).
user_agents_was_empty You sent a user_agents value but it didn't have any user agents in it.
too_many_user_agents You sent too many user agents in the batch. The limit is 500.

Software Version Numbers

Introduction

The Software Version Numbers end point lets you get the latest version numbers of popular web browsers, operating systems and browser plugins via an API.

Version data also includes sample User Agents

The responses from this API end point also include some sample user agents for the browsing software in question. For example, when you look at Chrome's version data in the API response, you'll also see a series of user agents for Chrome on the various operating systems it runs on (Windows, macOS, Linux, iOS, Android). This can be very helpful if you need to impersonate those browsers when testing your systems. You don't have to use the user agents if you don't need them, but they're there if you do.

We also include sample user agents for the various Operating System version numbers we provide; there are some sample user agents for many of the popular web browsers for those operating systems: for example, if you look at the sample user Agents for Windows 10, we've got Chrome on Windows 10, Firefox on Windows 10, Edge on Windows 10 and Internet Explorer on Windows 10 user agents.

Software Version Numbers - Request and Response

Making an API request to the Software Version Numbers end point is quite straightforward.

Request

End Point URL https://api.whatismybrowser.com/api/v2/software_version_numbers/all
or:
https://api.whatismybrowser.com/api/v2/software_version_numbers/software_name_code
HTTP Method GET
URL element There is a software_name_code element in the URL. This specifies what to return version numbers for; it can either be all or something like chrome or macos.

URL element - software_name_code

You can use different values for the software_name_code URL element depending on what you need to do.

The "standard" or "default" thing to do would be to set it to all, so that you get all the version numbers we provide - you can then process the response extracting some or all of the software version numbers you need.

End point URL - requesting all version numbers:

https://api.whatismybrowser.com/api/v2/software_version_numbers/all

Even if you were only interested in the latest version numbers for Chrome and Firefox, it would still make sense to request all version numbers, and then just look for those two elements in the response. Doing it this way requires one HTTP request and one quota hit, instead of two HTTP requests and two quota hits.

If you really require version numbers for just one software package, you can request it like this:

End point URL - requesting version numbers for just one software package:

Instead of putting all in the url, use a the software name code that you want version data for. For example, requesting version data for chrome:

https://api.whatismybrowser.com/api/v2/software_version_numbers/chrome

The software name codes you can specifically request version data for are:

  • chrome
  • firefox
  • firefox-esr
  • edge
  • internet-explorer
  • safari
  • opera
  • vivaldi
  • yandex-browser
  • flash
  • java

Response

As discussed, you can either request version data for "all" software packages, or version data for just one specific software package by changing your request URL.

What you request will determine what is returned in the response.

Requesting version numbers for all software

You would send your request to the URL:

https://api.whatismybrowser.com/api/v2/software_version_numbers/all

And the response would have this structure:

{ "version_data": { "firefox": { "standard": { "latest_version": [ "74", "0", "1" ], "download_url": "https://www.mozilla.org/firefox/new/", "update_url": "https://www.whatismybrowser.com/guides/how-to-update-your-browser/firefox", "release_date": "2020-04-04", "package_type": "software", "sample_user_agents": { "windows": [ "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:74.0) Gecko/20100101 Firefox/74.0" ], "macos": [ "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:74.0) Gecko/20100101 Firefox/74.0" ], "linux": [ "Mozilla/5.0 (X11; Linux i686; rv:74.0) Gecko/20100101 Firefox/74.0", "Mozilla/5.0 (Linux x86_64; rv:74.0) Gecko/20100101 Firefox/74.0", "Mozilla/5.0 (X11; Ubuntu; Linux i686; rv:74.0) Gecko/20100101 Firefox/74.0", "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:74.0) Gecko/20100101 Firefox/74.0", "Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:74.0) Gecko/20100101 Firefox/74.0" ] } }, "android": { "latest_version": [ "68", "6", "0" ], "download_url": "https://play.google.com/store/apps/details?id=org.mozilla.firefox", "update_url": "https://www.whatismybrowser.com/guides/how-to-update-your-browser/firefox-android", "release_date": "2020-03-10", "package_type": "software", "sample_user_agents": { "standard": [ "Mozilla/5.0 (Android 10; Mobile; rv:68.0) Gecko/68.0 Firefox/68.6.0" ], "lg": [ "Mozilla/5.0 (Android 10; Mobile; LG-M255; rv:68.6.0) Gecko/68.6.0 Firefox/68.6.0" ] } }, "ios": { "latest_version": [ "24", "1" ], "download_url": "https://itunes.apple.com/us/app/apple-store/id989804926", "update_url": "https://www.whatismybrowser.com/guides/how-to-update-your-browser/firefox-ios", "release_date": "2020-04-01", "package_type": "software", "sample_user_agents": { "iphone": [ "Mozilla/5.0 (iPhone; CPU iPhone OS 10_15_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) FxiOS/24.1 Mobile/15E148 Safari/605.1.15" ], "ipad": [ "Mozilla/5.0 (iPad; CPU OS 10_15_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) FxiOS/24.1 Mobile/15E148 Safari/605.1.15" ], "ipod": [ "Mozilla/5.0 (iPod touch; CPU iPhone OS 10_15_4 like Mac OS X) AppleWebKit/604.5.6 (KHTML, like Gecko) FxiOS/24.1 Mobile/15E148 Safari/605.1.15" ] } } }, "firefox-esr": { "standard": { "latest_version": [ "68", "6", "1" ], "download_url": "https://www.mozilla.org/en-US/firefox/organizations/all/", "release_date": "2020-04-03", "package_type": "software", "sample_user_agents": { "windows": [ "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:68.6.1) Gecko/20100101 Firefox/68.6.1" ], "macos": [ "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:68.6.1) Gecko/20100101 Firefox/68.6.1" ], "linux": [ "Mozilla/5.0 (X11; Linux i686; rv:68.6.1) Gecko/20100101 Firefox/68.6.1", "Mozilla/5.0 (Linux x86_64; rv:68.6.1) Gecko/20100101 Firefox/68.6.1", "Mozilla/5.0 (X11; Ubuntu; Linux i686; rv:68.6.1) Gecko/20100101 Firefox/68.6.1", "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:68.6.1) Gecko/20100101 Firefox/68.6.1", "Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:68.6.1) Gecko/20100101 Firefox/68.6.1" ] } } }, "opera": { "standard": { "latest_version": [ "67", "0", "3575", "115" ], "download_url": "https://www.opera.com/", "release_date": "2020-03-28", "package_type": "software", "sample_user_agents": { "windows": [ "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.163 Safari/537.36 OPR/67.0.3575.115", "Mozilla/5.0 (Windows NT 10.0; WOW64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.163 Safari/537.36 OPR/67.0.3575.115" ], "macos": [ "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.163 Safari/537.36 OPR/67.0.3575.115" ], "linux": [ "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.163 Safari/537.36 OPR/67.0.3575.115" ] } }, "android": { "latest_version": [ "55", "2", "2719" ], "download_url": "https://play.google.com/store/apps/details?id=com.opera.touch", "release_date": "2019-12-17", "package_type": "software", "sample_user_agents": { "huawei": [ "Mozilla/5.0 (Linux; Android 10; VOG-L29) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.162 Mobile Safari/537.36 OPR/55.2.2719" ], "samsung": [ "Mozilla/5.0 (Linux; Android 10; SM-G970F) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.162 Mobile Safari/537.36 OPR/55.2.2719", "Mozilla/5.0 (Linux; Android 10; SM-N975F) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.162 Mobile Safari/537.36 OPR/55.2.2719" ] } } }, "flash": { "standard": { "latest_version": [ "32", "0", "0" ], "update": "344", "download_url": "https://get.adobe.com/flashplayer/", "release_date": "2020-03-11", "package_type": "plugin" }, "android": { "latest_version": [ "11", "1", "115" ], "update": "81", "release_date": "2013-09-10", "package_type": "plugin" } }, "internet-explorer": { "internet-explorer-xp": { "latest_version": [ "8" ], "download_url": "https://windows.microsoft.com/internet-explorer/download-ie", "update_url": "https://www.whatismybrowser.com/guides/how-to-update-your-browser/internet-explorer", "release_date": "2009-03-19", "package_type": "software", "sample_user_agents": { "standard:": [ "Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0)", "Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729)", "Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; InfoPath.2)", "Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 1.1.4322)" ] } }, "internet-explorer-vista": { "latest_version": [ "9" ], "download_url": "https://windows.microsoft.com/internet-explorer/download-ie", "update_url": "https://www.whatismybrowser.com/guides/how-to-update-your-browser/internet-explorer", "release_date": "2011-03-14", "package_type": "software", "sample_user_agents": { "standard": [ "Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.0; Trident/5.0)", "Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.0; WOW64; Trident/5.0)", "Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.0; Trident/5.0; BOIE9;ENUS)", "Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.0; Win64; x64; Trident/5.0)" ] } }, "internet-explorer-windows-7": { "latest_version": [ "11" ], "download_url": "https://windows.microsoft.com/internet-explorer/download-ie", "update_url": "https://www.whatismybrowser.com/guides/how-to-update-your-browser/internet-explorer", "release_date": "2019-12-10", "package_type": "software", "sample_user_agents": { "standard": [ "Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; rv:11.0) like Gecko", "Mozilla/5.0 (Windows NT 6.1; Trident/7.0; rv:11.0) like Gecko" ] } }, "internet-explorer-windows-8": { "latest_version": [ "10" ], "download_url": "https://windows.microsoft.com/internet-explorer/download-ie", "update_url": "https://www.whatismybrowser.com/guides/how-to-update-your-browser/internet-explorer", "release_date": "2016-12-13", "package_type": "software", "sample_user_agents": { "standard": [ "Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.2)", "Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.2; WOW64; Trident/6.0)", "Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.2; WOW64; x64; Trident/6.0)", "Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.2; Trident/6.0)" ] } }, "internet-explorer-windows-8-1": { "latest_version": [ "11" ], "download_url": "https://windows.microsoft.com/internet-explorer/download-ie", "update_url": "https://www.whatismybrowser.com/guides/how-to-update-your-browser/internet-explorer", "release_date": "2019-12-10", "package_type": "software", "sample_user_agents": { "standard": [ "Mozilla/5.0 (Windows NT 6.3; WOW64; Trident/7.0; rv:11.0) like Gecko", "Mozilla/5.0 (Windows NT 6.3; ARM; Trident/7.0; Touch; rv:11.0) like Gecko" ] } }, "internet-explorer-windows-10": { "latest_version": [ "11" ], "download_url": "https://windows.microsoft.com/internet-explorer/download-ie", "update_url": "https://www.whatismybrowser.com/guides/how-to-update-your-browser/internet-explorer", "release_date": "2019-12-10", "package_type": "software", "sample_user_agents": { "standard": [ "Mozilla/5.0 (Windows NT 10.0; WOW64; Trident/7.0; rv:11.0) like Gecko", "Mozilla/5.0 (Windows NT 10.0; WOW64; Trident/7.0; .NET4.0C; .NET4.0E; .NET CLR 2.0.50727; .NET CLR 3.0.30729; .NET CLR 3.5.30729; rv:11.0) like Gecko", "Mozilla/5.0 (Windows NT 10.0; Win64; x64; Trident/7.0; rv:11.0) like Gecko", "Mozilla/5.0 (Windows NT 10.0; Trident/7.0; rv:11.0) like Gecko" ] } }, "internet-explorer": { "latest_version": [ "11" ], "download_url": "https://windows.microsoft.com/internet-explorer/download-ie", "update_url": "https://www.whatismybrowser.com/guides/how-to-update-your-browser/internet-explorer", "release_date": "2019-12-10", "package_type": "software", "sample_user_agents": { "standard": [ "Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; rv:11.0) like Gecko", "Mozilla/5.0 (Windows NT 6.1; Trident/7.0; rv:11.0) like Gecko", "Mozilla/5.0 (Windows NT 10.0; WOW64; Trident/7.0; rv:11.0) like Gecko", "Mozilla/5.0 (Windows NT 6.3; WOW64; Trident/7.0; rv:11.0) like Gecko", "Mozilla/5.0 (Windows NT 10.0; WOW64; Trident/7.0; .NET4.0C; .NET4.0E; .NET CLR 2.0.50727; .NET CLR 3.0.30729; .NET CLR 3.5.30729; rv:11.0) like Gecko" ] } } }, "chrome": { "windows": { "latest_version": [ "80", "0", "3987", "163" ], "download_url": "https://www.google.com/chrome/", "update_url": "https://www.whatismybrowser.com/guides/how-to-update-your-browser/chrome", "release_date": "2020-04-03", "package_type": "software", "sample_user_agents": { "standard": [ "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.163 Safari/537.36", "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.163 Safari/537.36", "Mozilla/5.0 (Windows NT 10.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.163 Safari/537.36" ] } }, "macos": { "latest_version": [ "80", "0", "3987", "163" ], "download_url": "https://www.google.com/chrome/", "update_url": "https://www.whatismybrowser.com/guides/how-to-update-your-browser/chrome", "release_date": "2020-04-03", "package_type": "software", "sample_user_agents": { "standard": [ "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.163 Safari/537.36" ] } }, "linux": { "latest_version": [ "80", "0", "3987", "163" ], "download_url": "https://www.google.com/chrome/", "update_url": "https://www.whatismybrowser.com/guides/how-to-update-your-browser/chrome", "release_date": "2020-04-03", "package_type": "software", "sample_user_agents": { "standard": [ "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.163 Safari/537.36" ] } }, "android": { "latest_version": [ "80", "0", "3987", "162" ], "download_url": "https://play.google.com/store/apps/details?id=com.android.chrome", "update_url": "https://www.whatismybrowser.com/guides/how-to-update-your-browser/chrome-android", "release_date": "2020-04-01", "package_type": "software", "sample_user_agents": { "standard": [ "Mozilla/5.0 (Linux; Android 10;) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.162 Mobile Safari/537.36" ], "samsung": [ "Mozilla/5.0 (Linux; Android 10; SM-A205U) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.162 Mobile Safari/537.36", "Mozilla/5.0 (Linux; Android 10; SM-A102U) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.162 Mobile Safari/537.36", "Mozilla/5.0 (Linux; Android 10; SM-G960U) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.162 Mobile Safari/537.36", "Mozilla/5.0 (Linux; Android 10; SM-N960U) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.162 Mobile Safari/537.36" ], "lg": [ "Mozilla/5.0 (Linux; Android 10; LM-Q720) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.162 Mobile Safari/537.36", "Mozilla/5.0 (Linux; Android 10; LM-X420) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.162 Mobile Safari/537.36", "Mozilla/5.0 (Linux; Android 10; LM-Q710(FGN)) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.162 Mobile Safari/537.36" ] } }, "ios": { "latest_version": [ "80", "0", "3987", "95" ], "download_url": "https://itunes.apple.com/app/chrome-web-browser-by-google/id535886823", "update_url": "https://www.whatismybrowser.com/guides/how-to-update-your-browser/chrome-ios", "release_date": "2020-02-11", "package_type": "software", "sample_user_agents": { "iphone": [ "Mozilla/5.0 (iPhone; CPU iPhone OS 13_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) CriOS/80.0.3987.95 Mobile/15E148 Safari/604.1" ], "ipad": [ "Mozilla/5.0 (iPad; CPU OS 13_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) CriOS/80.0.3987.95 Mobile/15E148 Safari/604.1" ], "ipod": [ "Mozilla/5.0 (iPod; CPU iPhone OS 13_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) CriOS/80.0.3987.95 Mobile/15E148 Safari/604.1" ] } } }, "edge": { "windows-10": { "latest_version": [ "80", "0", "361", "109" ], "update_url": "https://www.whatismybrowser.com/guides/how-to-update-your-browser/edge", "release_date": "2020-04-02", "package_type": "software", "sample_user_agents": { "standard": [ "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.163 Safari/537.36 Edg/80.0.361.109" ] } }, "windows-10-mobile": { "latest_version": [ "80", "0", "361", "109" ], "release_date": "2020-04-02", "package_type": "software", "sample_user_agents": { "standard": [ "Mozilla/5.0 (Windows Mobile 10; Android 8.0.0; Microsoft; Lumia 950XL) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.163 Mobile Safari/537.36 Edge/80.0.361.109" ] } }, "xbox-one": { "latest_version": [ "44", "18363", "8131" ], "release_date": "2020-02-11", "package_type": "software", "sample_user_agents": { "standard": [ "Mozilla/5.0 (Windows NT 10.0; Win64; x64; Xbox; Xbox One) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.163 Safari/537.36 Edge/44.18363.8131" ] } } }, "java": { "standard": { "latest_version": [ "8" ], "update": "241", "download_url": "https://java.com/download/", "release_date": "2020-01-14", "package_type": "plugin" } }, "safari": { "macos": { "latest_version": [ "13", "1" ], "update_url": "https://www.whatismybrowser.com/guides/how-to-update-your-browser/safari", "release_date": "2020-03-24", "package_type": "software", "sample_user_agents": { "standard": [ "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_4) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.1 Safari/605.1.15" ] } }, "ios": { "latest_version": [ "13", "1" ], "update_url": "https://www.whatismybrowser.com/guides/how-to-update-your-browser/safari-iphone", "release_date": "2020-03-24", "package_type": "software", "sample_user_agents": { "iphone": [ "Mozilla/5.0 (iPhone; CPU iPhone OS 13_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.1 Mobile/15E148 Safari/604.1" ], "ipad": [ "Mozilla/5.0 (iPad; CPU OS 13_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.1 Mobile/15E148 Safari/604.1" ], "ipod": [ "Mozilla/5.0 (iPod touch; CPU iPhone 13_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.1 Mobile/15E148 Safari/604.1" ] } }, "ios-12": { "latest_version": [ "12", "1", "2" ], "update_url": "https://www.whatismybrowser.com/guides/how-to-update-your-browser/safari-iphone", "release_date": "2019-07-22", "package_type": "software" } }, "vivaldi": { "standard": { "latest_version": [ "2", "11" ], "download_url": "https://vivaldi.com/download/", "release_date": "2020-02-28", "package_type": "software", "sample_user_agents": { "windows": [ "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.163 Safari/537.36 Vivaldi/2.11", "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.163 Safari/537.36 Vivaldi/2.11" ], "macos": [ "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.163 Safari/537.36 Vivaldi/2.11" ], "linux": [ "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.163 Safari/537.36 Vivaldi/2.11", "Mozilla/5.0 (X11; Linux i686) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.163 Safari/537.36 Vivaldi/2.11" ] } } }, "yandex-browser": { "windows": { "latest_version": [ "19", "7", "3", "172" ], "download_url": "https://browser.yandex.com/", "release_date": "2019-08-17", "package_type": "software", "sample_user_agents": { "standard": [ "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.163 YaBrowser/19.7.3.172 Yowser/2.5 Safari/537.36", "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.163 YaBrowser/19.7.3.172 Yowser/2.5 Safari/537.36" ] } }, "ios": { "latest_version": [ "20", "3", "1", "252" ], "download_url": "https://browser.yandex.com/mobile/", "release_date": "2020-03-27", "package_type": "software", "sample_user_agents": { "iphone": [ "Mozilla/5.0 (iPhone; CPU iPhone OS 13_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.1 YaBrowser/20.3.1.252 Mobile/15E148 Safari/604.1" ], "ipad": [ "Mozilla/5.0 (iPad; CPU OS 13_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.1 YaBrowser/20.3.1.252 Mobile/15E148 Safari/605.1" ], "ipod": [ "Mozilla/5.0 (iPod touch; CPU iPhone 13_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.1 YaBrowser/20.3.1.252 Mobile/15E148 Safari/605.1" ] } }, "android": { "latest_version": [ "20", "2", "2", "121" ], "download_url": "https://browser.yandex.com/mobile/", "release_date": "2020-02-28", "package_type": "software", "sample_user_agents": { "standard": [ "Mozilla/5.0 (Linux; arm_64; Android 10; SM-G965F) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.162 YaBrowser/20.2.2.121 Mobile Safari/537.36" ] } }, "macos": { "latest_version": [ "19", "6", "0", "1583" ], "download_url": "https://browser.yandex.com/", "release_date": "2019-05-01", "package_type": "software", "sample_user_agents": { "standard": [ "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.163 YaBrowser/19.6.0.1583 Yowser/2.5 Safari/537.36" ] } } }, "chrome-os": { "standard": { "latest_version": [ "80", "0", "3987", "162" ], "platform_version": [ "12739", "111", "0" ], "update_url": "https://www.whatismybrowser.com/guides/how-to-update-your-operating-system/chrome-os", "release_date": "2020-04-01", "package_type": "operating-system", "sample_user_agents": { "chrome": [ "Mozilla/5.0 (X11; CrOS x86_64 12739.111.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.162 Safari/537.36", "Mozilla/5.0 (X11; CrOS armv7l 12739.111.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.162 Safari/537.36", "Mozilla/5.0 (X11; CrOS aarch64 12739.111.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.162 Safari/537.36" ], "x86_64": [ "Mozilla/5.0 (X11; CrOS x86_64 12739.111.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.162 Safari/537.36" ], "armv7l": [ "Mozilla/5.0 (X11; CrOS armv7l 12739.111.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.162 Safari/537.36" ], "aarch64": [ "Mozilla/5.0 (X11; CrOS aarch64 12739.111.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.162 Safari/537.36" ] } } }, "macos": { "standard": { "latest_version": [ "10", "15", "4" ], "release_date": "2020-03-24", "package_type": "operating-system", "sample_user_agents": { "safari": [ "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_4) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.1 Safari/605.1.15" ], "firefox": [ "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:74.0) Gecko/20100101 Firefox/74.0" ], "chrome": [ "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.163 Safari/537.36" ], "vivaldi": [ "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.163 Safari/537.36 Vivaldi/2.11" ], "edge": [ "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.163 Safari/537.36 Edg/80.0.361.109" ] } } }, "ios": { "standard": { "latest_version": [ "13", "4" ], "update_url": "https://www.whatismybrowser.com/guides/how-to-update-your-operating-system/ios", "release_date": "2020-03-24", "package_type": "operating-system", "sample_user_agents": { "safari": [ "Mozilla/5.0 (iPhone; CPU iPhone OS 13_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.1 Mobile/15E148 Safari/604.1" ], "chrome": [ "Mozilla/5.0 (iPhone; CPU iPhone OS 13_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) CriOS/80.0.3987.95 Mobile/15E148 Safari/604.1" ], "firefox": [ "Mozilla/5.0 (iPhone; CPU iPhone OS 13_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) FxiOS/24.1 Mobile/15E148 Safari/605.1.15" ] } } }, "windows": { "standard": { "latest_version": [ "1909" ], "build": [ "10", "0", "18363", "753" ], "release_date": "2020-04-01", "package_type": "operating-system", "sample_user_agents": { "edge": [ "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.163 Safari/537.36 Edg/80.0.361.109" ], "internet-explorer": [ "Mozilla/5.0 (Windows NT 10.0; WOW64; Trident/7.0; rv:11.0) like Gecko" ], "chrome": [ "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.163 Safari/537.36", "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.163 Safari/537.36", "Mozilla/5.0 (Windows NT 10.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.163 Safari/537.36" ], "firefox": [ "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:74.0) Gecko/20100101 Firefox/74.0" ], "vivaldi": [ "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.163 Safari/537.36 Vivaldi/2.11", "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.163 Safari/537.36 Vivaldi/2.11" ] } } }, "android": { "standard": { "latest_version": [ "10" ], "release_date": "2019-09-03", "package_type": "operating-system", "sample_user_agents": { "chrome": [ "Mozilla/5.0 (Linux; Android 10;) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.162 Mobile Safari/537.36", "Mozilla/5.0 (Linux; Android 10; SM-A205U) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.162 Mobile Safari/537.36", "Mozilla/5.0 (Linux; Android 10; SM-A102U) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.162 Mobile Safari/537.36", "Mozilla/5.0 (Linux; Android 10; SM-G960U) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.162 Mobile Safari/537.36", "Mozilla/5.0 (Linux; Android 10; SM-N960U) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.162 Mobile Safari/537.36", "Mozilla/5.0 (Linux; Android 10; LM-Q720) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.162 Mobile Safari/537.36", "Mozilla/5.0 (Linux; Android 10; LM-X420) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.162 Mobile Safari/537.36", "Mozilla/5.0 (Linux; Android 10; LM-Q710(FGN)) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.162 Mobile Safari/537.36" ], "firefox": [ "Mozilla/5.0 (Android 10; Mobile; rv:68.0) Gecko/68.0 Firefox/68.6.0", "Mozilla/5.0 (Android 10; Mobile; LG-M255; rv:68.6.0) Gecko/68.6.0 Firefox/68.6.0" ] } } } }, "result": { "code": "success", "message_code": "software_version_numbers_returned", "message": "Software Version Numbers were returned successfully" } }

Requesting version numbers for a specific software name code

This is an example response (with line breaks to make it readable) for requesting version numbers for just iOS.

You would send your request to the URL:

https://api.whatismybrowser.com/api/v2/software_version_numbers/ios

And the response would have this structure:

{ "version_data": { "ios": { "standard": { "latest_version": [ "13", "4" ], "update_url": "https://www.whatismybrowser.com/guides/how-to-update-your-operating-system/ios", "release_date": "2020-03-24", "package_type": "operating-system", "sample_user_agents": { "safari": [ "Mozilla/5.0 (iPhone; CPU iPhone OS 13_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.1 Mobile/15E148 Safari/604.1" ], "chrome": [ "Mozilla/5.0 (iPhone; CPU iPhone OS 13_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) CriOS/80.0.3987.95 Mobile/15E148 Safari/604.1" ], "firefox": [ "Mozilla/5.0 (iPhone; CPU iPhone OS 13_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) FxiOS/24.1 Mobile/15E148 Safari/605.1.15" ] } } } }, "result": { "code": "success", "message_code": "software_version_numbers_returned", "message": "Software Version Numbers were returned successfully" } }

You can see that it shows you the latest version of iOS in the latest_version list, and then also has a sample_user_agents dictionary, where it groups one or more sample user agents for each software name code. Note that the version number given for each is also the latest version: so in the Chrome section, you get a user agent for the latest version of Chrome on the latest version of Macos.

These are done as lists, so if there was more than one variant, then the different variants would appear in the list for that software name code.

Field Definitions

This is a detailed description of the parts of a software version numbers response.

The JSON in a successful response will contain version_data and result dictionaries.

version_data key elements

Each key in the version_data dictionary corresponds to a different software package, and contains the software version number/s for it.

If you send a request for "all, the keys which will exist under version_data are:

  • chrome
  • firefox
  • firefox-esr
  • edge
  • internet-explorer
  • safari
  • opera
  • vivaldi
  • yandex-browser
  • flash
  • java
If you send a request for one of the above "software name codes", the response will contain version numbers for just that software, under that key in version_data.

Each one of these "software name codes" then contains one or more "streams". For example, we provide version data for the latest version of chrome for five streams: windows, macos, linux, android and ios.

Elements for each stream in a software_name_code key

latest_version is the only element guaranteed to be present; all other fields will appear depending on the individual software package.

latest_version Contains a list of version number fragments.
update Only exists for flash and java. This is a number additional to the latest_version - it's an "update" or "revision" number. eg. Sometimes there is a Flash update without Adobe releasing a new "version" - the update value increases but the version number stays the same.
update_url A URL giving instructions on how to update this software to the latest version. It will be a link to one of our tutorials showing you how to update your web browser. You can direct your user there to get further help.
download_url The software vendor's download page - where your user can download the latest version from.
package_type A description of the "type" of package this is - eg. it can be software which refers to the actual agent (typically a browser (but also in theory a bot or an application etc...)), or it can be plugin for things like Flash and Java. With version 2.4.1 of the API we now include version numbers for operating systems too, so you will also see: operating-system.
release_date We'll do our best to include the release date of the software or plugin; this isn't always perfectly accurate because some versions of sotware are gradually rolled out across the install-base and so it's hard to determine when exactly it was "officially" released, but it generally gives a good indication.
sample_user_agents With version 2.4.2 of the API we now include some sample user agents for each software or operating system as best as we can.
sample_user_agents is a dictionary containing keys for all the relevant groupings for the software or operating system. If it's for a software package (ie. Chrome) it will include keys for each of the operating systems it runs on - conversely, if it's for an operating system (ie Windows), it will include keys for each of the major browsers that run on Windows.
Inside each key is a list of one or more user agents for that combination of software and operating system. Some combinations may have multiple variants, which is why this is done as a list - so there will always be one or more valid user agents in it. Each variant will include the latest version number string/s. So for example, the sample Chrome user agents on macOS will include the latest version number of Chrome and the latest version number of macOS

result key elements

Remember: there are some message_code values which are common to all end points (eg api_authentication_invalid) - Read more.

Possible message_code when code is success

message_code Description
software_version_numbers_returned Software version number/s were returned. You don't need to worry about the plurality of "numbers" vs "number" in the code - this will always be "software_version_numbers_returned" - even if you requested a single "software name code", or there was only one stream.

Possible message_code when code is error

message_code Description
invalid_software_name_code You didn't provide a valid software_name_code. It either needs to be all, or one of the software_name_codes.

User Agent Database Dump URL

Introduction

Our systems get sent a huge variety of user agents over the normal course of their operation; we collect millions of user agents from the homepage of whatismybrowser.com and the user agent parsing API itself. We collect and organise those millions of user agents to help us develop the user agent parser, as well as to provide our big user agent listing.

We also make weekly database dumps of this these user agents - each with with the results of our user agent parser for each user agent - and we make it available for you to download: customers on Pro or Enterprise plans can make a simple API request and receive the URL for the latest database dump of user agents. You can then load them into your systems to help you do research or develop your own product or system.

Search the database instead of downloading it

As we continue to add more and more user agents into our database, it admittedly becomes more and more unweildy to use. Our database now has hundreds of millions of user agents in it and the filesize is many gigabytes. This can be a bit much for some users who want to just do some basic user agent queries.

So, we've launched a user agent database search API end point. Instead of having to download and import hundreds of millions of records each week, you can just send some simple API requests and get all the user agent information you need. Check it out to see if it will make your life easier.

Don't need to automate your database downloads? Use our web-based GUI instead.

If you don't need to automate your downloads of this database and prefer to manually download a database dump yourself, please have a look at our handy frontend for getting the same downloads. It will make the API request for you and show you the download links immediately.

If you have an API key for a Pro or Enterprise plan, you can download a copy right now.

User Agent Database Dump URL - Request and Response

Making an API request to get the latest User Agent Database Dump URL is quite straightforward. Simply make a GET request with the Auth Key header and a file_format url parameter and you'll get a JSON response that gives you the URL of the dump to download as well as some helpful meta data.

As of version 2.4.8, we now default to offering a "delta" of the database each week. Each one of these contains only the new user agents since the last extract, in order to keep the size smaller and the data quicker to handle.

Request

End Point URL https://api.whatismybrowser.com/api/v2/user_agent_database_dump_url
HTTP Method GET
HTTP GET Parameters
  • file_format - Specify the data dump format to get
  • dump_type - Optionally specify whether you want the latest full or delta dump

Sample CURL command

Here's a sample curl command that demonstrates a request:

curl 'https://api.whatismybrowser.com/api/v2/user_agent_database_dump_url?file_format=csv' -H 'Accept: application/json, text/javascript, */*;' -H 'X-API-KEY: YOURAPIAUTHKEYHERE'

A request to this API Endpoint will return the latest database dump (whether the latest extract is a "full" dump or a "delta").

Easy to use Web Interface

We've got a simple web user interface for making these requests if you'd prefer that:

Web UI for downloading the database via the API

Please have a look at it and make sure to to inspect the page source; it's got some basic Javascript which makes the request for you; feel free to copy it and use it in your own system if you need.

Delta and Full database extracts

When we first started sharing database extracts in 2018, there was only about 500,000 records, and this was a very manageable amount of data to handle. In the years since then, the size of the database has grown incredibly, now several hundreds of millions of records, and it's at the point where the size of it is now causing issues for a lot of our customers, as well as introducing a lot of wasted bandwidth, space, and energy to work with.

There is also just so much data in there that isn't used by a majority of customers, that we've made the decision to start releasing "deltas" of the database each week, instead of dumping hundreds of millions of records each time.

This will allow those customers who just need "the latest user agents" to get them each week without the overhead of a lot of very old user agents that they don't need. It also increases the load time significantly for everyone who is downloading and importing them.

Customers who just need "the latest user agents" and who don't need very old ones can download and import the database deltas each week, and choose to purge their systems after whatever time period suits them.

Customers who want an ever expanding collection of user agents - new and old - can simply keep loading the deltas on top of their existing database.

You can control the types of dump URLs that the database returns by specifying the dump_type URL parameter. If you don't specify anything, you will receive the latest dump each week, whether it is a full one or a delta.

The database is now size limited

To combat the fact that the database continues to grow in size, and was getting close to half a billion records, we now limit the size of the database.

We will continue to dump the weekly "deltas" as normal. There is no real difference to users of the database download feature, except: that depending on how you use the database dumps, there may end up being duplicate user agents in your database.

Our database will never have duplicates in it; but the issue could arise if you combined the individual dumps that we provide, over time.

This can happen if a user agent is added to our database, you download a dump containing it and load it in to your system. Some time later, we remove that user agent from our database because it's old. But then later; the same user agent is re-added to the database. Because it no longer existed in our dataset, it will be added as a new record (with a new database ID). Then, it will be soon exported in our next database dump. When your system downloads that latest database delta, it will try to load the same user agent which is now in a new record on top of your data. This may cause problems for you.

Our MySQL database dumps use the INSERT IGNORE statement to help minimize issues with this; the new, duplicate data won't be loaded.

This also means that the times_seen and first_seen_at values are no longer "for all time"; they are just for as long as a user agent has been in the database.

HTTP GET Parameters

file_format - the format of the large database dump:

https://api.whatismybrowser.com/api/v2/user_agent_database_dump_url?file_format=mysql

or:

https://api.whatismybrowser.com/api/v2/user_agent_database_dump_url?file_format=csv

or:

https://api.whatismybrowser.com/api/v2/user_agent_database_dump_url?file_format=parquet

or:

https://api.whatismybrowser.com/api/v2/user_agent_database_dump_url?file_format=txt

We provide the database dumps in MySQL, CSV, Parquet, and Plain Text formats. The MySQL, CSV, and Parquet files also contain the various parse fields, the Plain Text version contains just the user agents.

dump_type - the type of the database dump:

You can optionally specify the dump_type parameter; it can be either full or delta. If you do this, the API will return the URL of the latest dump of that type. If you don't specify it, it will return the latest URL, whether it is a full or a delta extract.

The most common scenario is that you would not specify the dump_type parameter and instead just keep loading the data regardless if it was a full or a delta.

If for some reason you only want to handle "full" extracts and not use the "deltas", you would specify to only receive "full" dumps. We will only be generating full dumps every few months; the rest of the time, only delta extracts will be provided.

Same format/structure

The files are structured the same way, the only difference is that they contain less data data.

Deltas don't include updated meta data or parse data for older user agents

The deltas only contain new records; they don't update the various meta data fields, such as times_seen, first_seen_at, last_seen_at, and so on.

The API response includes the type

The API response JSON includes an indication of the "type" of dump that is being provided (in the dump_type field. This lets you easily determine the type of the dump in case you need to handle the different types differently in your system.

Example url for accessing only full extracts:

https://api.whatismybrowser.com/api/v2/user_agent_database_dump_url?file_format=mysql&dump_type=full

Response

The response format is the same regardless of which file format you have requested.

For example, the request to the URL:

https://api.whatismybrowser.com/api/v2/user_agent_database_dump_url?file_format=mysql

would have a response similar to:

{ "user_agent_database_dump": { "url": "https://whatismybrowser-uadb.s3.amazonaws.com/user-agent-database/whatismybrowser-user-agent-database-2022-09-28-03-08--mysql-delta-W6YtmyK5EFoBpBaW.tar.gz", "num_of_useragents": 45650328, "file_format": "mysql", "sha_sum_256": "1168a67de51325cb6b06690e548fd9e9f3fb02303e411c4a34ed45376a992f63", "dump_type": "delta", "created_at": "2022-09-29T05:40:04.720" }, "result": { "code": "success", "message_code": "user_agent_database_dump_url_returned", "message": "The latest user agent database dump url (and associated data) was returned successfully" } }

Field Definitions

This is a detailed description of the parts of a User Agent Database Dump URL response.

The JSON in a successful response will contain the user_agent_database_dump dictionary.

user_agent_database_dump key elements

url The full URL of the latest database dump to download. Your system should download and unzip this file.
num_of_useragents An integer showing the number of user agents this database dump contains.
file_format This matches whatever file format you requested and is included for clarity.
created_at When this database dump was finalised and uploaded to our server for distribution.
sha_sum_256 After we have "tarred" and "gzipped" the database dump, SQL create file and README.txt, we generate a hash of the resulting .tar.gz file and include it here for your verification.

result key elements

Remember: there are some message_code values which are common to all end points (eg api_authentication_invalid) - Read more.

Possible message_code when code is success

message_code Description
user_agent_database_dump_url_returned The user agent database URL was successfully returned.

Possible message_code when code is error

message_code Description
invalid_file_format You didn't provide a valid file_format value.
missing_payment_details You must enter valid payment details before you can access the URLs for the database. Please log in to the Accounts System and update your details.
last_payment_failed Your last API payment failed. You are not allowed to access the database URLs until payment has been made.

The database dumps

We provide copies of our user agent database dumps in MySQL, CSV, Parquet and Plain Text formats. We are considering other formats, so please let us know if this would help you.

Fields

A quick glance at the actual contents of a database dump will make it instantly clear the format of the data we provide.

However to be explicit about it: we provide a id column which is the same as our database's primary key. This means that if/when you load in new user agents from a new database dump from us, you can know that the id's of the new dump match the existing ones and you can choose to update them or so on.

As we further develop our user agent parsing library, the values in some or all of the parse fields may change over time. We have a bot which faithfully works it's way through our database reparsing each of the user agents using the latest copy of our parser.

We also then provide the user_agent column, which contains a user agent string.

The other columns include the number of times that user agent has been seen, the first and last times the user agent has been seen by our systems, as well as the fields from the output of our user agent parser. This saves you having to reparse the user agents yourself and instead very easily run queries against them or group them how you would like to.

Note that other than the PRIMARY KEY index there are no other indexes in the "create" sql we provide. We highly recommend adding your own database indexes based on the sorts of queries you will be running.

Sanitization

We often see obviously "fake" user agents; either random strings of garbage, obscenities or "silly" messages. We've given a lot of attention to removing these bogus user agents from our dumps. We don't guarantee that the database is perfect but we've done our best. If you notice any user agents in the database which you don't think should be included, please let us know the id of it and we'll have a look.

Automating your integration

This API end point and data dumps have been specifically built to make it easy to automate loading these user agents into your own system.

In regards to the MySQL database dumps: The .tar.gz file contains two seperate SQL scripts: one to create a table which will accomodate the user agent data, and another (much larger) script which contains the actual user agent data. It is assumed that the most common work flow of our customers is to create the table once and then regularly import new user agents from the latest data base dump file.

For this reason, we took care to make sure that the CREATE table query was in a separate file to the INSERT queries. This lets you very easily and quickly add the new data to the existing table which you may have. This also helps if you have added your own extra fields to that table; you don't need to recreate them as well, the new INSERT queries should just go nicely on top. Further to this we have also made sure the "insert" script actually uses INSERT IGNORE INTO statements which will add new rows but not fail if there is already an existing row which matches.

While the actual file you download from our CDN will have an unpredictable datetime stamp and a random fragment to obsfucate the URL, once you have downloaded and extracted the file, the filenames inside will always be the same: create-table-whatismybrowser_useragent.sql and whatismybrowser-user-agent-database.sql. Your automation scripts can rely on those two files existing.

If you have any problems with automating the handling of these database dumps; please let us know via the Contact form; we are keen to maintain a system that makes it easy for you to use.

User Agent Database Troubleshooting

We have a User Agent Database FAQ for further help on working with and resolving problems with using the User Agent Database extracts.

Debugging

Introduction

Have you run into a problem? Something not working the way you were expecting? Here are some tips to get you on the right track.

If there's anything you think is missing here, or if you need further help, refer to our Get Help and we'll sort you out!

Debugging Authentication Problems

The two message_code errors relating to authentication which can occur are: missing_api_authentication and api_authentication_invalid.

  • missing_api_authentication

    This happens when - for some reason - our API servers don't see the X-API-KEY HTTP Header in your request.

    Common reasons for this are:

    • The header is misspelled in your request
    • Your code isn't sending it properly (it's not actually putting it in the request)
    • Your server is behind some kind of proxy/gateway which is stripping that header out

  • api_authentication_invalid

    This happens when the API key you send in the HTTP Header is incorrect.

    Common reasons for this are:

A good way of checking to see exactly what your system is sending in its API requests is a handy website called RequestBin. Read our section on Debugging using RequestBin for instructions on how to use it.

Debugging JSON Problems

There are two main classes of JSON problems that you may encounter when using the API:

Requests containing invalid JSON

These kinds of errors - where the API returns a result -> message_code of invalid_json - occur mainly when developers try to construct the JSON themselves by hand - as opposed to using whatever JSON library their programming language provides to do the heavy-lifting for you.

For example, hand-crafting JSON in python (don't do this!):

import requests user_agent = "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/44.0.2403.155 Safari/537.36" hand_made_json = '{"user_agent": "%s"}' % user_agent result = requests.post(api_url, data=hand_made_json, headers=headers)

In the fourth line of the example above, you can see the actual JSON string being constructed by hand: '{"user_agent": "%s"}' % user_agent.

That example does actually work; but it's very prone to problems.

You become responsible for getting the JSON format perfect; if you miss a semi-colon:

hand_made_json = '{"user_agent" "%s"}' % user_agent

you'll get:

{ "result": { "message": "Expecting : delimiter: line 1 column 15 (char 14)", "code": "error", "message_code": "invalid_json" } }

This isn't likely to happen on simple examples, but when you start to get into the batch processing requests and other more complicated requests, problems become more likely. Since all modern languages provide some kind of in-built JSON library, you should just take advantage of it and make your own life easier.

From a security/integrity perspective, it's also a bad idea to roll your own JSON strings. The "hand made" example above is vulnerable to injection issues (what if the user agent had a " in it? It would break your JSON.) And so you have to start to worry about escaping values... and suddenly things just got a lot more complicated for you.

Instead, (in the case of Python), you should use the inbuilt json module, which provides all of these niceties, making it much, much easier for you to generate JSON that won't be syntactically wrong (and which is also automatically escaped, etc).

For example, properly creating JSON in python:

import requests import json user_agent = "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/44.0.2403.155 Safari/537.36" post_data = { 'user_agent': user_agent, } result = requests.post(api_url, data=json.dumps(post_data), headers=headers)

On line 5, a normal Python dictionary is created, using "user_agent" as the only key. Then on the last line, where the request is sent, json.dumps() is used to automatically convert that python dictionary into a JSON dictionary, where escaping and other things are safely considered.

If you use your language's inbuilt JSON functions, you are much more likely to prevent invalid_json errors.

Incorrect JSON structure

Sending the wrong JSON structure in your request will result in errors like:

{ "result": { "message": "There was a problem extracting the user agent field from your request. There was no `user_agent` key in the JSON you sent.", "code": "error", "message_code": "no_user_agent" } }

This is occuring because the JSON structure didn't look like:

{ "user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.140 Safari/537.36" }

Maybe "user_agents" was misspelled:

{ "usr_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.140 Safari/537.36" }

and so we couldn't find it in your request.

Maybe it was nested under something else by mistake:

[{ "user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.140 Safari/537.36" }]

And so, while both of those examples are syntactically correct JSON, they will result in a no_user_agent message_code because we couldn't find user_agent where it was supposed to be.

If you get an error like this, make sure that you are sending the JSON with the correct structure.

You can use RequestBin and look at the POST BODY section to see what you've sent through. You can also use a JSON validator to ensure that what you're sending is valid JSON and conforms to the structure we expect.

Debugging API requests with RequestBin

A great tool for debugging problems with the API is a website called RequestBin. It lets you send any kind of HTTP request to your own special location on their site, where they then give you a detailed read-out of exactly what you sent; including headers, parameters and request body. This shows you exactly what your server is transmitting (or not transmitting) and it can be an invaluable tool in locating problems.

1. Create a RequestBin:

  1. Visit their homepage: https://requestbin.com/
  2. Complete the Captcha
  3. We recommend you tick the Private (only viewable from this browser) checkbox
  4. Click the green Create a RequestBin button.
The site then takes you to a new page which shows you your unique Bin URL at the top of the page in a large font.

Screenshot of the top of a new RequestBin page

2. Use your RequestBin:

In the code that you're debugging; change the request URL from https://api.whatismybrowser.com/api/v2/... to the url at the top of your RequestBin page (eg. https://requestbin.com/abcd1234 ).

So now, when you run your code, instead of sending the request to the WhatIsMyBrowser.com API servers, it sends that request to your unique RequestBin URL.

RequestBin will now be expecting your request, so when you execute your code, it captures the request and shows you exactly what you sent.

3. Inspect your RequestBin

After you've triggered your code to send its request to the RequestBin you've just created, press Refresh in your browser to reload the "inspect" page for your RequestBin. You should see a read-out showing information about what you just sent.

If you send more than one request to the same RequestBin, additional requests are added to the top of the page, one after the other.

Debugging Authentication problems using RequestBin

Here are some screenshots of parse_user_agent requests sent through RequestBin with different sorts of authentication problems.

Missing X-API-KEY
This screenshot shows a scenario where the X-API-KEY wasn't sent to the server. Note that you can't see it anywhere in the list of headers.
Screenshot of RequestBin's readout
This generates a missing_api_authentication message code when it is sent to our server.

If you are getting missing_api_authentication errors from the API; send a request to your RequestBin and if it is similar to this one - missing a X-API-KEY header - then something is definitely wrong with your request. Confirm that nothing is stripping out that header before it reaches us (switch to the https protocol to help prevent this), make sure your code is actually setting the header on your request, and make sure that you haven't misspelled the header name (remember, capitalisation of the header name doesn't matter).

Incorrect X-API-KEY
This screenshot shows a scenario where the X-API-KEY was sent to the server but is wrong. It appears in the list of headers but it's the QWERTYIOPSDFJLKJ clearly an incorrect key (copied and pasted from an example at the start of this guide!)
Screenshot of RequestBin's readout
This generates a api_authentication_invalid message code when it is sent to our server.

If you are getting api_authentication_invalid errors from the API; send a request to your RequestBin and inspect the result. Does your X-API-KEY header have the wrong key in it by mistake? Compare it with your key in the Accounts System. Have you created a new API key but are still sending the old one by mistake? Is the key being truncated somehow?

In both requests, you can also see the "RAW BODY" of the HTTP POST request at the bottom; it contains the valid JSON that our test script generated and sent to the server.

Debugging JSON problems using RequestBin

When you send your requests to RequestBin, you will see the Raw HTTP POST Body displayed at the bottom of the read-out in green.

Invalid JSON
This screenshot of a RequestBin shows a scenario where invalid JSON was sent.

Screenshot of RequestBin's readout with invalid JSON

This generates a invalid_json message code when it is sent to our server. Please notice the missing colon between the user_agent key and the user agent string which is causing this error.

If the problem with your JSON is not immediately apparent to you, you can copy and paste the Raw HTTP Body into a JSON Validator tool, which will validate and format it to be readable.

Screenshot of a JSON Validator showing an error message

If your JSON has a syntax error, the validator will indicate where it thinks the problem is. This example is telling you that it expects a colon, not a string.

If you're still stuck, you are always welcome to contact us and we'll see if we can spot the problem for you.

Conclusion

Introduction

This is the end of the API Integration Guide. We hope you've found it useful.

Hopefully by this point, your system is hooked up to the API and working without any problems.

If you're having any issues, don't hesitate to contact us to get further help. We're always willing to give you whatever we can to get you going.

Feedback

We are very focused on providing a high quality product and excellent documentation. If there's anything you think is wrong or missing from the documentation, or from the API itself, then please let us know about it. We're always looking for feedback on what we're doing. Good or bad - let us know.

Testimonials

We love it when our customers love our API, and if you'd like to share how the API has made your job easier, or how easy it was to get connected then we'd love to feature you in our testimonials section.

Even if you just want your logo to be included in the "This API is used by..." section, let us know!

References

API Specification

We use Swagger UI to provide an interactive API Specification.

Sample Code

We provide sample code for a number of popular programming languages, to give you examples on how to get started.

Support

In addition to the sample code and this Integration Guide, we have a support section which can give you further help.

Accounts System

Any time you need to discover or change something about your API account with us, head to our Accounts System: https://accounts.whatismybrowser.com/

There you can:

  • Change your billing details
  • Upgrade/Downgrade your API plan
  • Cancel your API plan
  • Get and change your API key
  • Monitor your monthly API usage
  • Contact us with questions or suggestions

Back to the main API page