Skip to content

Extensions Submodule > Libraries

Libraries ​

Extends browser detection to include tools used in programs to interact with web content or automate browsing tasks.

List of Detected Libraries ​

Library
Adobe AIRhackneyOkHttp
aiohttpHTTP.rbPHP SOAP
Apache HttpClientHTTPXPHPCrawl
Apache NutchJavaPostman Runtime
AxiosJava HTTP ClientRequests
BunJettyREST Client
CohttpjsdomScrapy
Dartlibwww-perlSuperAgent
Denolua-resty-httpUndici
Go HTTP ClientNeedleurllib
Gotnode-fetchurllib3
GuzzleNode.js

Code Example ​

js
import { UAParser }  from 'ua-parser-js';
import { Libraries } from 'ua-parser-js/extensions';

const axios = 'axios/1.7.2';
const pythonRequests = 'python-requests/2.32';
const scrapy = 'Scrapy/1.5.0 (+https://scrapy.org)';
const libParser = new UAParser(Libraries);

console.log(libParser.setUA(axios).getBrowser());
// {name: "axios", version: "1.7.2", major: "1", type: "library"}

console.log(libParser.setUA(pythonRequests).getBrowser());
// {name: "python-requests", version: "2.32", major: "2", type: "library"}

console.log(libParser.setUA(scrapy).getBrowser());
// {name: "Scrapy", version: "1.5.0", major: "1", type: "library"}

UAParser.js v2 is licensed under AGPLv3 or PRO licenses.