{"id":49763,"library":"wreq-js","title":"wreq-js","description":"wreq-js (v2.3.1) is a Node.js/TypeScript HTTP client that bypasses TLS fingerprinting checks (JA3/JA4) used by Cloudflare, DataDome, and other anti-bot services. It provides browser impersonation profiles for Chrome, Firefox, Safari, Edge, Opera, and OkHttp without running a full browser, using native Rust bindings from the wreq library for high throughput. Unlike alternatives like CycleTLS (Go subprocess) or got-scraping (JS customization), wreq-js offers a fetch-style API, built-in session and cookie management, proxy support, WebSocket helper, and TypeScript-first design with generated definitions. Prebuilt binaries are available for macOS, Linux, and Windows; installation may require a Rust toolchain if no matching prebuilt artifact is found. Development is active with community releases via npm.","status":"active","version":"2.3.1","language":"javascript","source_language":"en","source_url":"https://github.com/sqdshguy/wreq-js","tags":["javascript","cloudflare","cloudflare-bypass","anti-bot","bypass","tls-fingerprint","browser-fingerprint","ja3","ja4","typescript"],"install":[{"cmd":"npm install wreq-js","lang":"bash","label":"npm"},{"cmd":"yarn add wreq-js","lang":"bash","label":"yarn"},{"cmd":"pnpm add wreq-js","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"Named export, not default. ESM-only; no CJS support.","wrong":"import fetch from 'wreq-js'","symbol":"fetch","correct":"import { fetch } from 'wreq-js'"},{"note":"ESM-only; require() will fail. Use import statement.","wrong":"const createSession = require('wreq-js').createSession","symbol":"createSession","correct":"import { createSession } from 'wreq-js'"},{"note":"Type import for session instance type. Not available as runtime value.","symbol":"Session","correct":"import type { Session } from 'wreq-js'"},{"note":"Named export for WebSocket helper. Not default.","wrong":"import ws from 'wreq-js'","symbol":"WebSocket","correct":"import { WebSocket } from 'wreq-js'"},{"note":"Function to set proxy globally. Only available in v2.x.","symbol":"setGlobalProxy","correct":"import { setGlobalProxy } from 'wreq-js'"}],"quickstart":{"code":"import { fetch, createSession } from 'wreq-js';\n\n// Ephemeral fetch with browser impersonation\nconst res = await fetch('https://httpbin.org/ip', {\n  browser: 'chrome_142',\n  os: 'windows',\n});\nconsole.log(await res.json());\n\n// Session-based flow with cookie persistence\nconst session = await createSession({\n  browser: 'chrome_142',\n  os: 'macos',\n});\n\ntry {\n  const loginRes = await session.fetch('https://example.com/login', {\n    method: 'POST',\n    body: JSON.stringify({ username: 'user', password: process.env.PASSWORD || 'pass' }),\n    headers: { 'Content-Type': 'application/json' },\n  });\n  if (!loginRes.ok) {\n    console.error('Login failed');\n    process.exit(1);\n  }\n  const profileRes = await session.fetch('https://example.com/profile');\n  console.log(await profileRes.json());\n} finally {\n  session.close();\n}","lang":"typescript","description":"Demonstrates basic fetch with browser impersonation and a session-based flow with cookie persistence. Uses environment variable for auth."},"warnings":[{"fix":"Use import statements or switch to dynamic import().","message":"All module exports are ESM-only. CommonJS require() will fail.","severity":"breaking","affected_versions":">=2.0.0"},{"fix":"Always specify 'browser' and 'os' options when calling standalone fetch() or creating a session.","message":"The 'fetch' function without explicit 'browser' option defaults to a minimal TLS fingerprint that may be blocked.","severity":"deprecated","affected_versions":">=2.0.0"},{"fix":"Install Rust via rustup.rs or use a Docker image with Rust preinstalled.","message":"Installation may require a Rust toolchain if no prebuilt native binary matches your platform.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Wrap session usage in try/finally block and always call close().","message":"Sessions must be closed with session.close() to release native resources; failure to do so causes memory leaks.","severity":"breaking","affected_versions":">=2.0.0"},{"fix":"Use explicit proxy configuration: import { setGlobalProxy } from 'wreq-js'; setGlobalProxy('http://proxy:8080');","message":"Proxy settings via environment variables (HTTP_PROXY, HTTPS_PROXY) may not be respected; use setGlobalProxy() or per-request options.","severity":"deprecated","affected_versions":">=2.0.0 <2.3.0"},{"fix":"Pin version and review changelog when upgrading.","message":"The browser profile names (e.g., 'chrome_142') may change with new releases; check compatibility matrix at https://wreq.sqdsh.win/concepts/compatibility-matrix.","severity":"gotcha","affected_versions":">=2.0.0"},{"fix":"Complement with header/behavior customization; consider using session's setHeaders() method.","message":"Some anti-bot services may detect wreq-js as a bot based on non-TLS signals (e.g., HTTP headers, timing).","severity":"gotcha","affected_versions":">=1.0.0"}],"env_vars":null,"search_vec":"'/typescript':12 'activ':124 'altern':61 'anti':28,136 'anti-bot':27,135 'api':80 'artifact':119 'avail':103 'binari':101 'bind':52 'bot':29,137 'browser':33,48,143 'browser-fingerprint':142 'built':82 'built-in':81 'bypass':16,134,138 'check':19 'chrome':37 'client':14 'cloudflar':23,131,133 'cloudflare-bypass':132 'communiti':126 'cooki':86 'custom':71 'cycletl':63 'datadom':24 'definit':99 'design':96 'develop':122 'edg':40 'fetch':78 'fetch-styl':77 'fingerprint':18,141,144 'firefox':38 'first':95 'found':121 'full':47 'generat':98 'go':64 'got':68 'got-scrap':67 'helper':91 'high':58 'http':13 'imperson':34 'instal':109 'ja3':145 'ja3/ja4':20 'ja4':146 'javascript':130 'js':3,6,70,74 'librari':56 'like':62 'linux':106 'maco':105 'manag':87 'match':117 'may':110 'nativ':50 'node.js':11 'node.js/typescript':10 'npm':129 'offer':75 'okhttp':43 'opera':41 'prebuilt':100,118 'profil':35 'provid':32 'proxi':88 'releas':127 'requir':111 'run':45 'rust':51,113 'safari':39 'scrape':69 'servic':30 'session':84 'style':79 'subprocess':65 'support':89 'throughput':59 'tls':17,140 'tls-fingerprint':139 'toolchain':114 'typescript':94,147 'typescript-first':93 'unlik':60 'use':21,49 'v2.3.1':7 'via':128 'websocket':90 'window':108 'without':44 'wreq':2,5,55,73 'wreq-j':1,4,72","created_at":"2026-06-07T17:03:28.836864+00:00","updated_at":"2026-06-07T17:03:28.836864+00:00","problems":[{"fix":"Run 'npm install wreq-js' and ensure your project uses ESM (type: 'module' in package.json or .mjs extension).","cause":"Missing installation or incorrect import path.","error":"Error: Cannot find module 'wreq-js'"},{"fix":"Change 'import fetch from \"wreq-js\"' to 'import { fetch } from \"wreq-js\"'.","cause":"Wrong import style: using default import instead of named import.","error":"TypeError: wreq_js_1.fetch is not a function"},{"fix":"Replace 'const wreq = require(\"wreq-js\")' with 'import * as wreq from \"wreq-js\"' or use dynamic import().","cause":"Using require() in an ESM context.","error":"Error: Dynamic require of \"wreq-js\" is not supported"},{"fix":"Install Rust from https://rustup.rs and ensure cargo is in PATH, then npm install wreq-js again.","cause":"Your OS/architecture lacks a prebuilt artifact.","error":"Error: No prebuilt native binary found for current platform. Build from source requires Rust toolchain."},{"fix":"Ensure you do not reuse a closed session; create a new one if needed.","cause":"Using a session after calling session.close().","error":"Error: The `session` object has been disposed. Cannot use after calling `close()` method."}],"ecosystem":"npm","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":"https://wreq.sqdsh.win","github":"https://github.com/sqdshguy/wreq-js","docs":null,"changelog":null,"pypi":null,"npm":"wreq-js","openapi_spec":null,"status_page":null,"smithery":null,"categories":["security"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-07","next_check":"2026-09-05","install_tag":null}}