If you use with curl encode the URL:
Code:
curl -G -s "https://userstack.com/ua_api.php" --data-urlencode "ua=Mozilla/5.0 (Android 6.0.1; Mobile; rv:17.0) Gecko/17.0 Firefox/17.0" | jq
Paste the UserAgent after ua= and then you will get the JSON response which you can beautify with jq (Command-line JSON processor).