Detect any Browser,
Device & OS in Real-Time

Instant, Secure User-Agent String Lookup JSON API
trusted by some of the smartest brands worldwide

Loved & Rated ★★★★★ 5/5 on
Start using the API — It's free!
ua: "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Safari/537.36"
type: "browser"
brand: "Apple"
name: "Mac"
url: "https://www.google.com/about/company"
os: Object {}
name: "macOS 10.14 Mojave"
code: "macos_10_14"
url: "https://en.wikipedia.org/wiki/MacOS_Mojave"
family: "macOS"
family_code: "macos"
family_vendor: "Apple Inc."
icon: "https://assets.userstack.com/icons/os/macosx.png"
icon_large: "https://assets.userstack.com/icons/os/macosx_big.png"
device: Object {}
is_mobile_device: false
type: "desktop"
brand: "Apple"
brand_code: "apple"
brand_url: "http://www.apple.com/"
name: "Mac"
browser: Object {}
name: "Chrome"
version: "70.0.3538.110"
version_major: "70"
engine: "WebKit/Blink"
crawler: Object {}
is_crawler: false
category: null
last_seen: null
  • Trusted by Thousands around the world:
  • Powerful & Scalable

    From a few hundred API requests a month all the way to several million a day — our scalable cloud infrastructure has got you covered at any stage.

  • Accurate System Data

    Backed by a daily updated and constantly monitored User-Agent database, the API delivers the highest level of accuracy & reliability.

  • Seamless Integration

    High in complexity and performance, sleek in design — our simple JSON REST API interface will get you started in just a few minutes.

  • Cost-Effective Solution

    Start off by making 100 monthly User-Agent requests for free. As soon as you need more, API premium plans start at only $9.99 a month.

Take Control of the Customer Journey

Don't let screen sizes get in the way of your conversions. Bring user experience to perfection and identify any device, browser and operating system by parsing User-Agent strings in real-time.

Highest Level of Compatibility

No need for a specific set of skills to parse User-Agent data — userstack API functionality can be implemented in under 10 minutes using any major programming languge.

  • PHP
  • Python
  • Nodejs
  • jQuery
  • Go
  • Ruby
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
$query = http_build_query([
  'access_key' => 'YOUR_ACCESS_KEY',
  'ua' => 'Mozilla/5.0 (iPad; CPU OS 9_3_2 like Mac OS X) AppleWebKit/601.1.46 (KHTML, like Gecko) Version/9.0 Mobile/13F69 Safari/601.1',
]);

$ch = curl_init('https://api.userstack.com/detect?' . $query);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);

$json = curl_exec($ch);
curl_close($ch);

$api_result = json_decode($json, true);

if ($api_result['device']['type'] === 'tablet') {
  echo "It's a tablet";
}

Take control of customer experience now — it's free Get Free API Key