User-Agent Info is a simple free web service API that do OS detection, Browser detection and Device detection via User-Agent string.
The core of this api is based on uap-coreBrowserscope’s user agent parser which is good enough for most use cases.
The excellent open source uap-core project has a single YAML file that contains regular expression patterns for
parsing user-agent strings and can be easily integrated in most web applications that runs on PHP, Java, Ruby, Python,
Perl, C# and more.
Various Use Cases
API Usage via Bash/cURL
Need to deploy your awesome Python, PHP or Ruby web application to the cloud?
Check out Digital Ocean,
they provide realiable and affordable servers.
Their tutorials are also a great resource so you can deploy webapps easily.
How to do device detection in various programming languages?
Device detection in PHP
You can get your website visitor user-agent string via $_SERVER['HTTP_USER_AGENT'].
Device detection in Python
Flask and Django are two of the most popular Python web frameworks. With Flask you can get the user-agent string
via request.headers.get('User-Agent'). In Django via request.META.get('HTTP_USER_AGENT', '').
Device detection in Ruby
In Ruby on Rails, you can get the user-agent string via request.user_agent.