device-detector-js vs platform vs ua-parser-js
User Agent Parsing and Device Detection in JavaScript
device-detector-jsplatformua-parser-jsSimilar Packages:

User Agent Parsing and Device Detection in JavaScript

device-detector-js, platform, and ua-parser-js are JavaScript libraries designed to parse User-Agent strings to identify client environment details such as browser name, version, operating system, and device type. ua-parser-js is a lightweight, widely adopted solution that works in both browser and Node.js environments, offering detailed parsing results. platform (often referenced as platform.js) focuses on providing a clean abstraction of the runtime environment, historically popular in lodash ecosystems. device-detector-js is a JavaScript port of the PHP matomo/device-detector, aiming for high accuracy in device and bot detection by leveraging a large set of regex patterns.

Npm Package Weekly Downloads Trend

3 Years

Github Stars Ranking

Stat Detail

Package
Downloads
Stars
Size
Issues
Publish
License
device-detector-js05001.62 MB15-LGPL-3.0
platform03,246-346 years agoMIT
ua-parser-js010,1301.32 MB1513 days agoAGPL-3.0-or-later

User Agent Parsing and Device Detection in JavaScript

When building web applications, knowing the client's environment is often critical for analytics, security, or progressive enhancement. device-detector-js, platform, and ua-parser-js all solve this problem by parsing User-Agent strings, but they differ significantly in data depth, maintenance status, and API design. Let's compare how they handle real-world detection scenarios.

🛠️ Installation and Setup

All three packages are available via npm and work in Node.js environments. Browser support varies slightly depending on bundler configuration.

device-detector-js is installed directly and imported as a class instance.

// device-detector-js
import DeviceDetector from 'device-detector-js';

const detector = new DeviceDetector();
const result = detector.parse(userAgentString);

platform is typically imported as a singleton object that parses the global environment automatically.

// platform
import platform from 'platform';

// Automatically parses the current runtime
const result = platform;

ua-parser-js can be used as a standalone function or instantiated for reuse.

// ua-parser-js
import UAParser from 'ua-parser-js';

const parser = new UAParser(userAgentString);
const result = parser.getResult();

📊 Data Structure and Depth

The shape of the returned data determines how easily you can integrate these tools into your TypeScript or JavaScript logic.

device-detector-js returns a highly nested object with specific fields for client, device, and OS. It excels at identifying specific device models (e.g., "iPhone 13 Pro").

// device-detector-js output
{
  client: { type: 'browser', name: 'Chrome', version: '91.0' },
  device: { type: 'smartphone', brand: 'Apple', model: 'iPhone' },
  os: { name: 'iOS', version: '14.6' },
  bot: null
}

platform returns a flat object focused on a human-readable description and broad categories. It is less structured for programmatic device model detection.

// platform output
{
  name: 'Chrome',
  version: '91.0.4472.124',
  os: 'iOS 14.6',
  description: 'Chrome 91.0.4472.124 on iOS 14.6',
  layout: 'WebKit'
}

ua-parser-js returns a standardized object with three main sections: browser, device, and engine. It strikes a balance between detail and simplicity.

// ua-parser-js output
{
  browser: { name: 'Chrome', version: '91.0.4472.124' },
  device: { model: 'iPhone', type: 'mobile', vendor: 'Apple' },
  engine: { name: 'WebKit', version: '605.1.15' },
  os: { name: 'iOS', version: '14.6' }
}

🤖 Bot and Crawler Detection

Identifying non-human traffic is crucial for security and analytics accuracy. The libraries handle this differently.

device-detector-js has dedicated bot detection logic built into the parse result. It explicitly flags bots and often identifies the specific bot name.

// device-detector-js
const result = detector.parse(botUserAgent);
if (result.bot) {
  console.log(`Bot detected: ${result.bot.name}`);
}

platform does not have specialized bot detection. You would need to write custom regex logic to identify crawlers on top of the platform data.

// platform
// No built-in bot property
// Custom check required
const isBot = /bot|crawler|spider/i.test(platform.ua);

ua-parser-js includes basic device type detection which can hint at bots (e.g., undefined device types), but it does not have a dedicated "bot" section like device-detector-js. Specific bot identification often requires extending the regex list.

// ua-parser-js
const result = parser.getResult();
// Device type might be undefined or 'wearable' for some bots
// No explicit 'bot' flag in standard result

⚠️ Maintenance and Deprecation Status

Choosing a library for long-term projects requires checking its current maintenance status. Some of these packages have known issues or are in legacy mode.

device-detector-js is actively maintained as a port of the PHP Matomo library. It receives regular updates to its regex definitions to catch new devices and browsers. It is safe for new projects requiring deep device insights.

// device-detector-js
// Actively updated regex lists
// Suitable for production analytics

platform (platform.js) is historically significant but sees infrequent updates. It is often bundled with older versions of lodash. For new architectural decisions, it is generally recommended to evaluate more active alternatives unless you have a specific dependency requirement.

// platform
// Mature / Maintenance mode
// Check for deprecation warnings in your specific context

ua-parser-js is widely used and maintained, but it has faced security advisories in the past regarding ReDoS (Regular Expression Denial of Service) vulnerabilities in older versions. Ensure you are using the latest patched version (v1.0.34 or higher) to mitigate these risks.

// ua-parser-js
// Ensure version >= 1.0.34 for security patches
// npm install ua-parser-js@latest

🌐 Environment Compatibility

How these libraries run in different JavaScript runtimes affects where you can use them.

device-detector-js is designed primarily for Node.js but can be bundled for the browser. It does not rely on global window objects, making it isomorphic.

// device-detector-js
// Works in Node.js and bundled browser code
const detector = new DeviceDetector();

platform was originally designed to detect the browser environment it runs in. While it can parse strings, its primary API often defaults to navigator.userAgent in browsers.

// platform
// Defaults to current environment if no UA provided
platform.os.name; // Checks window.navigator

ua-parser-js is fully isomorphic. It allows you to pass a custom User-Agent string or default to the environment. This makes it flexible for server-side rendering (SSR) where navigator is unavailable.

// ua-parser-js
// Explicitly pass UA for SSR
const parser = new UAParser(req.headers['user-agent']);

📌 Summary Table

Featuredevice-detector-jsplatformua-parser-js
Primary FocusDeep device & bot detectionRuntime environment descriptionGeneral UA parsing
Data StructureNested (client, device, os)Flat (name, version, os)Standard (browser, device, os)
Bot Detection✅ Built-in & Detailed❌ Custom Logic Required⚠️ Limited / Implicit
Device Models✅ Specific (e.g., iPhone 13)❌ Generic (e.g., iPhone)✅ Specific (varies by regex)
Maintenance✅ Active⚠️ Mature / Low Activity✅ Active (Watch Security)
Bundle SizeLarger (due to regex DB)SmallSmall to Medium

💡 The Big Picture

device-detector-js is the heavy-duty option 🏋️. Use it when accuracy is paramount, such as in analytics platforms, security firewalls, or when you need to serve specific assets to specific phone models. The trade-off is a larger bundle size due to the extensive regex database.

platform is the legacy choice 🕰️. It works well for simple feature detection in older stacks but lacks the structured depth needed for modern device-specific logic. Avoid it for new projects unless you are constrained by existing dependencies.

ua-parser-js is the standard utility 🔧. It offers the best balance of size, speed, and data structure for most frontend applications. It is the go-to for general browser detection, SSR hydration checks, and basic analytics. Just keep it updated to avoid security vulnerabilities.

Final Thought: For most modern frontend architectures, ua-parser-js provides the right mix of reliability and simplicity. Reserve device-detector-js for cases where you truly need to distinguish between an iPhone 12 and an iPhone 13, or when bot detection is a core requirement.

How to Choose: device-detector-js vs platform vs ua-parser-js

  • device-detector-js:

    Choose device-detector-js if you need high-fidelity device detection, including specific mobile models, bot identification, and detailed OS versioning. It is ideal for analytics, security logging, or content adaptation where knowing the exact device model matters. Be aware that it brings a larger dataset to ensure accuracy, which may impact bundle size compared to lighter alternatives.

  • platform:

    Choose platform if you are maintaining legacy codebases that already depend on it or if you need a very simple description string rather than structured data. However, note that this package is often considered mature or in maintenance mode with less frequent updates compared to others. For new projects requiring detailed structured parsing, evaluate more actively maintained alternatives first.

  • ua-parser-js:

    Choose ua-parser-js for a balanced approach that offers structured data (browser, engine, OS, device) with a small footprint. It is well-suited for general-purpose user agent parsing in both server-side and client-side applications. Its widespread adoption means you will find plenty of community support and type definitions, making it a safe default for most frontend architecture decisions.

README for device-detector-js

device-detector-js

Device-detector-js is a precise user agent parser and device detector written in TypeScript, backed by the largest and most up-to-date open-source user agent database.

Device-detector-js will parse any user agent and detect the browser, operating system, device used (desktop, tablet, mobile, tv, cars, console, etc.), brand and model. Works with Node.js and in the browser.

This library is heavily tested and relies on over 10,000 tests to detect thousands of user agent strings, even from rare and obscure browsers and devices.

This is a javascript port of Matomo device-detector (4.2.3).

Coveralls github CircleCI build node version npm version npm monthly downloads

Features

  • No dependencies
  • TypeScript support
  • Thoroughly tested

Demo

https://lx3rzx16x9.codesandbox.io/

Getting Started

Installation

To use device-detector-js in your project, run:

npm install device-detector-js

Usage

ES2015 import:
import DeviceDetector from "device-detector-js";
TypeScript import:
import DeviceDetector = require("device-detector-js");

Example - user agent detection:

import DeviceDetector from "device-detector-js";

const deviceDetector = new DeviceDetector();
const userAgent = "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.81 Safari/537.36";
const device = deviceDetector.parse(userAgent);

console.log(device);

Output:

{
  "client": {
    "type": "browser",
    "name": "Chrome",
    "version": "69.0",
    "engine": "Blink",
    "engineVersion": ""
  },
  "os": {
    "name": "Mac",
    "version": "10.13",
    "platform": ""
  },
  "device": {
    "type": "desktop",
    "brand": "Apple",
    "model": ""
  },
  "bot": null
}

Example - bot detection:

import BotDetector from "device-detector-js/dist/parsers/bot";

const botDetector = new BotDetector();
const userAgent = "Mozilla/5.0 (iPhone; CPU iPhone OS 6_0 like Mac OS X) AppleWebKit/536.26 (KHTML, like Gecko) Version/6.0 Mobile/10A5376e Safari/8536.25 (compatible; Googlebot-Mobile/2.1; +http://www.google.com/bot.html)";
const bot = botDetector.parse(userAgent);

if (bot) {
  console.log(bot);
}

Output:

{
  "name": "Googlebot",
  "category": "Search bot",
  "url": "http://www.google.com/bot.html",
  "producer": {
    "name": "Google Inc.",
    "url": "http://www.google.com"
  }
}

API Documentation

new DeviceDetector([options])

  • options <[Object]> Options object which might have the following properties:
    • skipBotDetection <[boolean]> If true, bot detection will completely be skipped (bots will be detected as regular devices). Defaults to false.
    • versionTruncation <[0 | 1 | 2 | 3 | null]> Passing null disables version truncation, so full versions will be returned. Defaults to 1, only minor versions will be returned (e.g. X.Y).

TypeScript

Type definitions are included in this library and exposed via:

import { DeviceDetectorResult, DeviceDetectorOptions } from "device-detector-js";

⚠️ Browser Environment

Even though this library can run in the browser, it is strongly advised against doing so, unless you are not concerned with performance. Keep in mind that using this library in browser-side code means sending around 432 KB of Regex rules and 144 KB of javascript (uncompressed and unminified), which may result in a poor user experience for people with a slow Internet connection.

You may experience inconsistencies when running this library in a browser environment, as some browsers like Safari do not yet support lookbehind syntax.

What device-detector-js is able to detect

The lists below are auto generated and updated from time to time. Some of them might not be complete. Last update: 2021/01/08

List of detected operating systems:

AIX, Android, AmigaOS, Apple TV, Arch Linux, BackTrack, Bada, BeOS, BlackBerry OS, BlackBerry Tablet OS, Brew, CentOS, Chrome OS, CyanogenMod, Debian, Deepin, DragonFly, Fedora, Firefox OS, Fire OS, Freebox, FreeBSD, FydeOS, Gentoo, Google TV, HP-UX, Haiku OS, IRIX, Inferno, KaiOS, Knoppix, Kubuntu, GNU/Linux, Lubuntu, VectorLinux, Mac, Maemo, Mandriva, MeeGo, MocorDroid, Mint, MildWild, MorphOS, NetBSD, MTK / Nucleus, MRE, Nintendo, Nintendo Mobile, OS/2, OSF1, OpenBSD, Ordissimo, PlayStation Portable, PlayStation, Red Hat, RISC OS, Rosa, Remix OS, RazoDroiD, Sabayon, SUSE, Sailfish OS, SeewoOS, Slackware, Solaris, Syllable, Symbian, Symbian OS, Symbian OS Series 40, Symbian OS Series 60, Symbian^3, ThreadX, Tizen, TmaxOS, Ubuntu, watchOS, WebTV, Whale OS, Windows, Windows CE, Windows IoT, Windows Mobile, Windows Phone, Windows RT, Xbox, Xubuntu, YunOs, iOS, palmOS, webOS

List of detected browsers:

115 Browser, 2345 Browser, 360 Phone Browser, 360 Browser, Avant Browser, ABrowse, ANT Fresco, ANTGalio, Aloha Browser, Aloha Browser Lite, Amaya, Amigo, Android Browser, AOL Desktop, AOL Shield, Arora, Arctic Fox, Amiga Voyager, Amiga Aweb, Atom, Atomic Web Browser, Avast Secure Browser, AVG Secure Browser, Beaker Browser, Beamrise, BlackBerry Browser, Baidu Browser, Baidu Spark, Basilisk, Beonex, BlackHawk, Bunjalloo, B-Line, Blue Browser, Borealis Navigator, Brave, BriskBard, BrowseX, Browzar, Camino, CCleaner, Centaury, Coc Coc, Colibri, Comodo Dragon, Coast, Charon, CM Browser, Chrome Frame, Headless Chrome, Chrome, Chrome Mobile iOS, Conkeror, Chrome Mobile, CoolNovo, CometBird, COS Browser, Chim Lac, ChromePlus, Chromium, Cyberfox, Cheshire, Crusta, Crazy Browser, Cunaguaro, Chrome Webview, dbrowser, Deepnet Explorer, Delta Browser, Dolphin, Dorado, Dooble, Dillo, DuckDuckGo Privacy Browser, Ecosia, Epic, Elinks, Element Browser, Elements Browser, eZ Browser, EUI Browser, GNOME Web, Espial TV Browser, Falkon, Faux Browser, Firefox Mobile iOS, Firebird, Fluid, Fennec, Firefox, Firefox Focus, Firefox Reality, Firefox Rocket, Flock, Firefox Mobile, Fireweb, Fireweb Navigator, FreeU, Galeon, Ghostery Privacy Browser, Glass Browser, Google Earth, GOG Galaxy, Hawk Turbo Browser, hola! Browser, HotJava, Huawei Browser, IBrowse, iCab, iCab Mobile, Iridium, Iron Mobile, IceCat, IceDragon, Isivioo, Iceweasel, Internet Explorer, IE Mobile, Iron, Japan Browser, Jasmine, Jig Browser, Jig Browser Plus, Jio Browser, K.Browser, Kindle Browser, K-meleon, Konqueror, Kapiko, Kinza, Kiwi, Kode Browser, Kylo, Kazehakase, Cheetah Browser, LieBaoFast, LG Browser, Light, Links, Lovense Browser, LuaKit, Lulumi, Lunascape, Lunascape Lite, Lynx, mCent, MicroB, NCSA Mosaic, Meizu Browser, Mercury, Mobile Safari, Midori, Mobicip, MIUI Browser, Mobile Silk, Minimo, Mint Browser, Maxthon, MxNitro, Mypal, Monument Browser, MAUI WAP Browser, Navigateur Web, NFS Browser, Nokia Browser, Nokia OSS Browser, Nokia Ovi Browser, Nox Browser, NetSurf, NetFront, NetFront Life, NetPositive, Netscape, NTENT Browser, Oculus Browser, Opera Mini iOS, Obigo, Odin, Odyssey Web Browser, Off By One, OhHai Browser, ONE Browser, Opera GX, Opera Neon, Opera Devices, Opera Mini, Opera Mobile, Opera, Opera Next, Opera Touch, Ordissimo, Oregano, Origin In-Game Overlay, Origyn Web Browser, Openwave Mobile Browser, OmniWeb, Otter Browser, Palm Blazer, Pale Moon, Polypane, Oppo Browser, Palm Pre, Puffin, Palm WebPro, Palmscape, Phoenix, Phoenix Browser, PlayFree Browser, Polaris, Polarity, PrivacyWall, Microsoft Edge, QQ Browser Mini, QQ Browser, Qutebrowser, Quark, QupZilla, Qwant Mobile, QtWebEngine, Realme Browser, Rekonq, RockMelt, Samsung Browser, Sailfish Browser, Seewo Browser, SEMC-Browser, Sogou Explorer, Safari, Safe Exam Browser, SalamWeb, SFive, Shiira, SimpleBrowser, Sizzy, Skyfire, Seraphic Sraf, Sleipnir, Slimjet, 7Star, Smart Lenovo Browser, Snowshoe, Sogou Mobile Browser, Splash, Sputnik Browser, Sunrise, SuperBird, Super Fast Browser, surf, Stargon, START Internet Browser, Steam In-Game Overlay, Streamy, Swiftfox, Seznam Browser, T-Browser, t-online.de Browser, Tao Browser, TenFourFox, Tenta Browser, Tizen Browser, Tungsten, ToGate, TweakStyle, TV Bro, UBrowser, UC Browser, UC Browser Mini, UC Browser Turbo, UR Browser, Uzbl, Vivaldi, vivo Browser, Vision Mobile Browser, VMware AirWatch, Wear Internet Browser, Web Explorer, WebPositive, Waterfox, Whale Browser, wOSBrowser, WeTab Browser, Yahoo! Japan Browser, Yandex Browser, Yandex Browser Lite, Yaani Browser, Yolo Browser, Xiino, Xvast, Zvu

List of detected browser engines:

WebKit, Blink, Trident, Text-based, Dillo, iCab, Elektra, Presto, Gecko, KHTML, NetFront, Edge, NetSurf, Servo, Goanna

List of detected libraries:

aiohttp, curl, Faraday, Go-http-client, Google HTTP Java Client, Guzzle (PHP HTTP Client), HTTPie, HTTP_Request2, Java, libdnf, Mechanize, Node Fetch, OkHttp, Perl, Perl REST::Client, Postman Desktop, Python Requests, Python urllib, ReactorNetty, REST Client for Ruby, RestSharp, ScalaJ HTTP, urlgrabber (yum), Wget, WWW-Mechanize

List of detected media players:

Audacious, Banshee, Boxee, Clementine, Deezer, FlyCast, Foobar2000, Google Podcasts, iTunes, Kodi, MediaMonkey, Miro, mpv, Music Player Daemon, NexPlayer, Nightingale, QuickTime, Songbird, Stagefright, SubStream, VLC, Winamp, Windows Media Player, XBMC

List of detected mobile apps:

AndroidDownloadManager, AntennaPod, Apple News, Baidu Box App, BeyondPod, BingWebApp, bPod, CastBox, Castro, Castro 2, CrosswalkApp, DingTalk, DoggCatcher, douban App, Facebook, Facebook Messenger, FeedR, Flipboard App, Google Go, Google Play Newsstand, Google Plus, Google Search App, HeyTapBrowser, iCatcher, Instacast, Instagram App, Instapaper, Keeper Password Manager, Kik, Line, LinkedIn, NewsArticle App, Overcast, Pinterest, Player FM, Pocket Casts, Podcast & Radio Addict, Podcast Republic, Podcasts, Podcat, Podcatcher Deluxe, Podkicker, Roblox, RSSRadio, Sina Weibo, Siri, Skyeng Teachers, Snapchat, SogouSearch App, tieba, TopBuzz, Twitter, U-Cursos, UnityPlayer, Viber, WeChat, WeChat Share Extension, WhatsApp, Yahoo! Japan, Yelp Mobile, YouTube and mobile apps using AFNetworking

List of detected PIMs (personal information manager):

Airmail, Barca, DAVdroid, Lotus Notes, MailBar, Microsoft Outlook, Outlook Express, Postbox, SeaMonkey, The Bat!, Thunderbird

List of detected feed readers:

Akregator, Apple PubSub, BashPodder, Breaker, Downcast, FeedDemon, Feeddler RSS Reader, gPodder, JetBrains Omea Reader, Liferea, NetNewsWire, Newsbeuter, NewsBlur, NewsBlur Mobile App, PritTorrent, Pulp, QuiteRSS, ReadKit, Reeder, RSS Bandit, RSS Junkie, RSSOwl, Stringer

List of brands with detected devices:

2E, 3Q, 4Good, 4ife, 360, 8848, A1, Accent, Ace, Acer, Advan, Advance, AGM, Ainol, Airness, Airties, AIS, Aiwa, Akai, Alba, Alcatel, Alcor, ALDI SÜD, Alfawise, Aligator, AllCall, AllDocube, Allview, Allwinner, Altech UEC, Altice, altron, Amazon, AMGOO, Amigoo, Amoi, Andowl, Anry, ANS, Aoson, Apple, Archos, Arian Space, Ark, ArmPhone, Arnova, ARRIS, Artel, Artizlee, Asano, Asanzo, Ask, Assistant, Asus, AT&T, Atom, Audiovox, Avenzo, AVH, Avvio, Axxion, Azumi Mobile, BangOlufsen, Barnes & Noble, BBK, BB Mobile, BDF, Becker, Beeline, Beelink, Beetel, BenQ, BenQ-Siemens, Bezkam, BGH, Bigben, BIHEE, Billion, BioRugged, Bird, Bitel, Bitmore, Bkav, Black Bear, Black Fox, Blackview, Blaupunkt, Blu, Bluboo, Bluedot, Bluegood, Bluewave, Bmobile, Bobarry, bogo, Boway, bq, Brandt, Bravis, Brondi, Bush, CAGI, Capitel, Captiva, Carrefour, Casio, Casper, Cat, Celcus, Celkon, Changhong, Cherry Mobile, China Mobile, Chuwi, Clarmin, Cloudfone, Cloudpad, Clout, CnM, Coby Kyros, Comio, Compal, Compaq, ComTrade Tesla, Concord, ConCorde, Condor, Conquest, Contixo, Coolpad, Cowon, CreNova, Crescent, Cricket, Crius Mea, Crony, Crosscall, Cube, CUBOT, CVTE, Cyrus, Daewoo, Danew, Datang, Datawind, Datsun, Dbtel, Dell, Denver, Desay, DeWalt, DEXP, Dialog, Dicam, Digi, Digicel, Digihome, Digiland, Digma, Diva, Divisat, DMM, DNS, DoCoMo, Doffler, Dolamee, Doogee, Doopro, Doov, Dopod, Doro, Droxio, Dune HD, E-Boda, E-Ceros, E-tel, Easypix, EBEST, Echo Mobiles, ECS, EE, EKO, Eks Mobility, ELARI, Element, Elenberg, Elephone, Eltex, Energizer, Energy Sistem, Enot, Epik One, Ergo, Ericsson, Ericy, Essential, Essentielb, eSTAR, Eton, eTouch, Etuline, Eurostar, Evercoss, Evertek, Evolio, Evolveo, EvroMedia, ExMobile, EXO, Explay, Extrem, Ezio, Ezze, Fairphone, Famoco, FarEasTone, Fengxiang, Fero, FiGO, FinePower, Finlux, FireFly Mobile, Fly, FNB, Fondi, Fonos, FORME, Forstar, Fortis, Foxconn, Freetel, Fujitsu, G-TiDE, Garmin-Asus, Gateway, Gemini, General Mobile, GEOFOX, Geotel, Ghia, Ghong, Gigabyte, Gigaset, Ginzzu, Gionee, Globex, GOCLEVER, Goly, Gome, GoMobile, Google, Goophone, Gradiente, Grape, Gree, Grundig, Hafury, Haier, HannSpree, Hardkernel, Hasee, Helio, Hezire, Hi-Level, Highscreen, Hipstreet, Hisense, Hitachi, Hoffmann, Hometech, Homtom, Hoozo, Hosin, Hotel, Hotwav, How, HP, HTC, Huadoo, Huawei, Humax, Hurricane, Hyrican, Hyundai, i-Cherry, i-Joy, i-mate, i-mobile, iBall, iBerry, iBrit, IconBIT, iDroid, iGet, iHunt, Ikea, iKoMo, iLA, iLife, iMars, IMO Mobile, Impression, Inco, iNew, Infinix, InFocus, Inkti, InnJoo, Innostream, Inoi, INQ, Insignia, Intek, Intex, Inverto, Invin, iOcean, iPro, IQM, Irbis, Iris, iRola, iRulu, iSWAG, iTel, iTruck, iVA, iView, iVooMi, iZotron, JAY-Tech, JFone, Jiayu, Jinga, JKL, Jolla, Just5, JVC, K-Touch, Kaan, Kaiomy, Kalley, Kanji, Karbonn, KATV1, Kazam, KDDI, Kempler & Strauss, Keneksi, Kenxinda, Kiano, Kingsun, Kivi, Klipad, Kocaso, Kodak, Kogan, Komu, Konka, Konrow, Koobee, Koolnee, Kooper, KOPO, Koridy, KRONO, Krüger&Matz, KT-Tech, Kuliao, Kult, Kumai, Kyocera, Kzen, LAIQ, Land Rover, Landvo, Lanix, Lark, Lava, LCT, Leagoo, Ledstar, LeEco, Leff, Lemhoov, Lenco, Lenovo, Leotec, Le Pan, Lephone, Lesia, Lexand, Lexibook, LG, Lingwin, Linsar, Loewe, Logic, Logicom, Lumigon, Lumus, Luna, Luxor, LYF, M.T.T., M4tel, Macoox, Majestic, Mann, Manta Multimedia, Masstel, Matrix, Maxcom, Maxtron, MAXVI, Maxwest, Maze, meanIT, Mecer, Mecool, Mediacom, MediaTek, Medion, MEEG, MegaFon, Meitu, Meizu, Melrose, Memup, Metz, MEU, MicroMax, Microsoft, Minix, Mintt, Mio, Miray, Mito, Mitsubishi, MIXC, MiXzo, MLLED, MLS, Mobicel, Mobiistar, Mobiola, Mobistel, MobiWire, Mobo, Modecom, Mofut, Motorola, Movic, Mpman, MSI, MTC, MTN, Multilaser, MYFON, MyPhone, Myria, Mystery, MyTab, MyWigo, National, Navitech, Navon, NEC, Neffos, Neomi, Netgear, NeuImage, Newgen, Newland, Newman, NewsMy, NEXBOX, Nexian, NEXON, Nextbit, NextBook, NextTab, NGM, NG Optics, Nikon, Nintendo, NOA, Noain, Nobby, Noblex, Nokia, Nomi, Nomu, Nordmende, NorthTech, Nos, Nous, NuAns, NUU Mobile, Nuvo, Nvidia, NYX Mobile, O+, O2, Oale, Obi, Odys, Okapia, Onda, OnePlus, Onix, ONN, OpelMobile, Openbox, OPPO, Opsson, Orange, Orbic, Ordissimo, Ouki, Oukitel, OUYA, Overmax, Ovvi, Owwo, Oysters, Oyyu, OzoneHD, P-UP, Palm, Panacom, Panasonic, Pantech, PCBOX, PCD, PCD Argentina, PEAQ, Pentagram, Phicomm, Philco, Philips, Phonemax, phoneOne, Pioneer, Pixelphone, Pixus, Planet Computers, Ployer, Plum, PocketBook, POCO, Point of View, Polaroid, PolyPad, Polytron, Pomp, Poppox, Positivo, Positivo BGH, PPTV, Premio, Prestigio, Primepad, Primux, Prixton, Proline, ProScan, Protruly, PULID, Q-Touch, Q.Bell, Qilive, QMobile, Qtek, Quantum, Quechua, Qumo, R-TV, Ramos, Ravoz, Razer, RCA Tablets, Reach, Readboy, Realme, RED, Reeder, Rikomagic, RIM, Rinno, Ritmix, Ritzviva, Riviera, Roadrover, Rokit, Roku, Rombica, Ross&Moor, Rover, RoverPad, RT Project, RugGear, Runbo, Ryte, Safaricom, Sagem, Salora, Samsung, Sanei, Sansui, Santin, Sanyo, Savio, Schneider, Sega, Selenga, Selevision, Selfix, SEMP TCL, Sencor, Sendo, Senkatel, Senseit, Senwa, SFR, Sharp, Shift Phones, Shtrikh-M, Shuttle, Sico, Siemens, Sigma, Silelis, Silent Circle, Simbans, Siragon, Sky, Skyworth, Smadl, Smailo, Smart, SMARTEC, Smartfren, Smartisan, Softbank, Solone, Sonim, Sony, Sony Ericsson, Soundmax, Soyes, SPC, Spectrum, Spice, SQOOL, Star, Starlight, Starmobile, Starway, STF Mobile, STK, Stonex, Storex, Sugar, Sumvision, Sunstech, SunVan, Sunvell, SuperSonic, Supra, Swipe, SWISSMOBILITY, Swisstone, Symphony, Syrox, T-Mobile, Takara, Tanix, TB Touch, TCL, TD Systems, TechniSat, TechnoTrend, TechPad, Techwood, Teclast, Tecno Mobile, Tele2, Telefunken, Telego, Telenor, Telit, Tesco, Tesla, Tetratab, teXet, ThL, Thomson, Thuraya, TIANYU, Time2, Timovi, Tinai, Tinmo, TiPhone, Tolino, Tone, Tooky, Top House, Toplux, Torex, Toshiba, Touchmate, Transpeed, TrekStor, Trevi, Trifone, Tronsmart, True, TTEC, Tunisie Telecom, Turbo, Turbo-X, TurboKids, TVC, TWM, Twoe, Tymes, U.S. Cellular, Ugoos, Uhans, Uhappy, Ulefone, Umax, UMIDIGI, Unihertz, Unimax, Uniscope, UNIWA, Unknown, Unnecto, Unonu, Unowhy, UTOK, UTStarcom, VAIO, Vastking, Venso, Verico, Verizon, Vernee, Vertex, Vertu, Verykool, Vesta, Vestel, VGO TEL, Videocon, Videoweb, ViewSonic, Vinga, Vinsoc, Vipro, Vitelcom, Viumee, Vivax, Vivo, Vizio, VK Mobile, VKworld, Vodacom, Vodafone, Vonino, Vontar, Vorago, Vorke, Voto, Voxtel, Voyo, Vsmart, Vsun, Vulcan, VVETIME, Walton, Web TV, Weimei, WellcoM, Westpoint, Wexler, Wieppo, Wigor, Wiko, Wileyfox, Winds, Wink, Winmax, Wiseasy, Wizz, Wolder, Wolfgang, Wonu, Woo, Wortmann, Woxter, X-BO, X-TIGI, X-View, X.Vision, Xgody, Xiaolajiao, Xiaomi, Xion, Xolo, Xoro, Xshitou, Xtouch, Yandex, Yarvik, Yes, Yezz, Yoka TV, Yota, Ytone, Yu, Yuandao, Yusun, Yxtel, Zatec, Zebra, Zeemi, Zen, Zenek, Zentality, Zfiner, Zidoo, Ziox, Zonda, Zopo, ZTE, Zuum, Zync, ZYQ, öwn

List of detected bots:

360Spider, Aboundexbot, Acoon, Adbeat, AddThis.com, ADMantX, ADmantX Service Fetcher, aHrefs Bot, Alexa Crawler, Alexa Site Audit, Amazon Route53 Health Check, Amorank Spider, Analytics SEO Crawler, ApacheBench, Applebot, Arachni, archive.org bot, Ask Jeeves, AspiegelBot, Awario, Awario, Backlink-Check.de, BacklinkCrawler, Baidu Spider, Barkrowler, BazQux Reader, BDCbot, BingBot, BitlyBot, Blekkobot, BLEXBot Crawler, Bloglovin, Blogtrottr, BoardReader, BoardReader Blog Indexer, Bountii Bot, BrandVerity, Browsershots, BUbiNG, Buck, BuiltWith, Butterfly Robot, Bytespider, CareerBot, Castro 2, Catchpoint, CATExplorador, ccBot crawler, Charlotte, Cliqzbot, CloudFlare Always Online, CloudFlare AMP Fetcher, Cloudflare Diagnostics, Collectd, CommaFeed, ContentKing, CSS Certificate Spider, Cốc Cốc Bot, Datadog Agent, Datanyze, Dataprovider, Daum, Dazoobot, Discobot, Domain Re-Animator Bot, Domains Project, DotBot, DuckDuckGo Bot, Easou Spider, eCairn-Grabber, EMail Exractor, EmailWolf, Embedly, evc-batch, ExaBot, ExactSeek Crawler, Ezooms, eZ Publish Link Validator, Facebook External Hit, Feedbin, FeedBurner, Feedly, Feedspot, Feed Wrangler, Fever, Findxbot, Flipboard, FreshRSS, Generic Bot, Generic Bot, Genieo Web filter, Gigablast, Gigabot, Gluten Free Crawler, Gmail Image Proxy, Goo, Googlebot, Google Cloud Scheduler, Google Favicon, Google PageSpeed Insights, Google Partner Monitoring, Google Search Console, Google Stackdriver Monitoring, Google Structured Data Testing Tool, Grammarly, Grapeshot, GTmetrix, Heritrix, Heureka Feed, HTTPMon, HubPages, HubSpot, ICC-Crawler, ichiro, IDG/IT, IIS Site Analysis, Inktomi Slurp, inoreader, IP-Guide Crawler, IPS Agent, Kaspersky, Kouio, Larbin web crawler, LCC, Let's Encrypt Validation, Lighthouse, Linkdex Bot, LinkedIn Bot, LTX71, Lycos, Magpie-Crawler, MagpieRSS, Mail.Ru Bot, masscan, Mastodon Bot, Meanpath Bot, MetaInspector, MetaJobBot, MicroAdBot, Mixrank Bot, MJ12 Bot, Mnogosearch, MojeekBot, Monitor.Us, Munin, Nagios check_http, NalezenCzBot, nbertaupete95, Netcraft Survey Bot, netEstate, NetLyzer FastProbe, NetResearchServer, Netvibes, NewsBlur, NewsGator, NLCrawler, Nmap, Nutch-based Bot, Nuzzel, oBot, Octopus, Omgili bot, Openindex Spider, OpenLinkProfiler, OpenWebSpider, Orange Bot, Outbrain, PagePeeker, PaperLiBot, parse.ly, Petal Bot, Phantomas, PHP Server Monitor, Picsearch bot, PingAdmin.Ru, Pingdom Bot, Pinterest, PocketParser, Pompos, PritTorrent, PRTG Network Monitor, QuerySeekerSpider, Quora Link Preview, Qwantify, Rainmeter, RamblerMail Image Proxy, Reddit Bot, Riddler, Robozilla, Rogerbot, ROI Hunter, RSSRadio Bot, SafeDNSBot, Scooter, ScoutJet, Scrapy, Screaming Frog SEO Spider, ScreenerBot, Semantic Scholar Bot, Semrush Bot, Sensika Bot, Sentry Bot, Seobility, SEOENGBot, SEOkicks-Robot, Seoscanners.net, Serendeputy Bot, Server Density, Seznam Bot, Seznam Email Proxy, Seznam Zbozi.cz, ShopAlike, Shopify Partner, ShopWiki, SilverReader, SimplePie, SISTRIX Crawler, SISTRIX Optimizer, Site24x7 Website Monitoring, Siteimprove, SiteSucker, Sixy.ch, Skype URI Preview, Slackbot, SMTBot, Snapchat Proxy, Sogou Spider, Soso Spider, Sparkler, Speedy, Spinn3r, Spotify, Sprinklr, Sputnik Bot, sqlmap, SSL Labs, Startpagina Linkchecker, StatusCake, Superfeedr Bot, Survey Bot, Tarmot Gezgin, TelegramBot, The Knowledge AI, theoldreader, TinEye Crawler, Tiny Tiny RSS, TLSProbe, TraceMyFile, Trendiction Bot, TurnitinBot, TweetedTimes Bot, Tweetmeme Bot, Twingly Recon, Twitterbot, UkrNet Mail Proxy, UniversalFeedParser, Uptimebot, Uptime Robot, URLAppendBot, Vagabondo, Velen Public Web Crawler, Vercel Bot, Visual Site Mapper Crawler, VK Share Button, W3C CSS Validator, W3C I18N Checker, W3C Link Checker, W3C Markup Validation Service, W3C MobileOK Checker, W3C Unified Validator, Wappalyzer, WebbCrawler, WebDataStats, Weborama, WebPageTest, WebSitePulse, WebThumbnail, WeSEE:Search, WikiDo, Willow Internet Crawler, WooRank, WordPress, Wotbox, XenForo, YaCy, Yahoo! Cache System, Yahoo! Japan BRW, Yahoo! Link Preview, Yahoo! Slurp, Yahoo Gemini, Yandex Bot, Yeti/Naverbot, Yottaa Site Monitor, Youdao Bot, Yourls, Yunyun Bot, Zao, Ze List, zgrab, Zookabot, ZumBot

Built with

  • Matomo device detector - A powerful device detection library.
  • node.js - Cross-platform JavaScript run-time environment for executing JavaScript code server-side.
  • TypeScript - Typed superset of JavaScript that compiles to plain JavaScript.
  • Jest - Delightful JavaScript Testing.

Contributing

When contributing to this project, please first discuss the change you wish to make via issue, email, or any other method with the owners of this repository before making a change.

Update the README.md with details of changes to the library.

Execute yarn test and update the tests if needed.

How to update to a newer version of matomo?

This library needs to be updated when matomo releases a new version of their library. Here's how to proceed:

  1. Pull the master branch from this repo
  2. Update the https://github.com/matomo-org/device-detector#{version-number} to the latest version of matomo device detector in the package.json
  3. Run yarn fixtures to update to the latest fixtures. This will download new fixtures based on the version specified in the package.json
  4. Run yarn test and update the library if some tests are failing
  5. Open a PR

Why do tests fail after downloading new fixtures?

When matomo releases a new version, they usually add support for new brands. Those brands needs to be copied over to this file.

Authors

License

This is a free/libre library under license LGPL v3 or later.