wa-js is a free, open source data extraction & web scraping project written in TypeScript and released under Apache-2.0. It has 830 GitHub stars, 252 forks and 19 open issues, and was last pushed 15 hours ago. On this registry it ranks #127 of 149 tracked projects in Data Extraction & Web Scraping, with 5 head-to-head comparisons available.

What is wa-js?

wa-js is a browser-side automation library, published as @wppconnect/wa-js, that exposes the internal functions of WhatsApp Web through a global WPP JavaScript API so that extension and browser-integration developers can script chats, messages, contacts, groups, media and events from inside the page.

What it is

WA-JS is a TypeScript project in the WPPConnect ecosystem, maintained by the WPPConnect Team and released under the Apache-2.0 licence. It builds a bundle, dist/wppconnect-wa.js, which is injected into a page running WhatsApp Web and there exposes chat, contact, connection and other modules under a single WPP global. The README is explicit that this is not a Node.js WhatsApp client: the code executes inside the browser, against the WhatsApp Web application itself, rather than against a server-side protocol implementation.

The concrete problem it solves is the absence of a stable, typed surface over WhatsApp Web's own internals. Anyone writing a browser extension or an injected script for WhatsApp Web would otherwise have to reach into undocumented page objects directly. WA-JS wraps those objects into named modules covering chat and media operations, groups, communities, channels and business catalog functions, plus connection events, profile and privacy settings, labels and chat lists, and it ships typed exports of the WhatsApp modules together with browser-injection tooling. It is the layer that powers WPPConnect integrations and extensions.

Key capabilities

  • Exposes a browser-side WPP API with modules for chats, messages, contacts, groups, media and events, built into the dist/wppconnect-wa.js bundle.
  • Covers group, community and channel operations alongside business catalog functions.
  • Provides connection events, profile and privacy settings, labels and chat lists.
  • Ships typed exported WhatsApp modules and browser-injection tooling written in TypeScript.
  • Supports configuration through window.WPPConfig, set before injection, with options documented in src/config.
  • Includes a local launcher that opens a browser with the bundle already injected, selectable against a cached or downloaded WhatsApp Web version via WA_VERSION.
  • Offers lifecycle and state helpers in the page, such as WPP.loader.onReady() and WPP.conn.isAuthenticated().

Who uses it and how

  • Extension developers who need to execute code inside a signed-in WhatsApp Web page and drive it from a browser context.
  • Teams building on WPPConnect that want the browser-side layer directly rather than through the Node.js wrapper.
  • Developers debugging compatibility, who pair it with the separate WA-Version project to track WhatsApp Web versions and retrieve stored page content.
  • Integrations that need link-preview metadata and PNG payloads, which the companion WA-JS API SERVER is designed to serve.
  • Contributors working on the wider ecosystem, since the same bundle underpins the Wppconnect Chrome extension for sending configured messages and attachments.

Getting started

Clone the repository, then run npm ci, npm run build:prd and npm run launch:local; the launcher opens a browser with the bundle injected, and after signing in you can evaluate WPP.loader.onReady(() => console.log(WPP.conn.isAuthenticated())) in the developer console. The package is also published to npm as @wppconnect/wa-js, and the API reference and events are documented at wppconnect.io/wa-js.

How it compares

The facts do not name any paid products that WA-JS replaces, so no licence or cost comparison can be drawn. Within its own ecosystem it sits at the bottom of the stack: WPPConnect controls WhatsApp Web from Node.js applications, the Wppconnect Extension puts a Chrome UI over WA-JS, and the WA-JS API SERVER supplies companion link-preview metadata, while WA-JS itself is the in-page library those projects build on.

When to use it — and when not to

Choose it when the automation genuinely has to run inside a browser page against WhatsApp Web, and when you can accept that package.json pins WhatsApp Web >=2.3000.1038792969-alpha with the caveat that individual capabilities may vary as WhatsApp updates. Do not pick it if you need a server-side or headless Node.js client, since the README states plainly that it is not one; WPPConnect is the ecosystem entry for that case. Self-hosters should also note the operational constraints: only one default WPP bundle should be loaded per page, and the documented path is a build from source rather than a hosted service.

project readme (upstream, from github) — read inline

English | Português (Brasil)

WPPConnect

WPPConnect/WA-JS

Expose WhatsApp Web functions through the browser-side WPP API.

A project in the WPPConnect ecosystem, maintained by WPPConnect Team.

Getting started | Documentation | Contributing | Support WPPConnect

License: Apache-2.0 npm version CI Open Collective

Overview

For extension and browser-integration developers who need to execute code inside WhatsApp Web. The generated dist/wppconnect-wa.js bundle exposes chat, contact, connection and other modules; it is not a Node.js WhatsApp client.

Features

  • Chat and media operations, groups, communities, channels and business catalog functions.
  • Connection events, profile/privacy settings, labels and chat lists.
  • Typed exported WhatsApp modules and browser-injection tooling.

Getting started

Use Node.js/npm for the build and a browser with WhatsApp Web for execution. package.json declares WhatsApp Web >=2.3000.1038792969-alpha; individual capabilities may vary with WhatsApp updates.

git clone https://github.com/wppconnect-team/wa-js.git
cd wa-js
npm ci
npm run build:prd
npm run launch:local

The launcher opens a browser with the bundle injected. After signing in, evaluate this in that page's developer console to inspect the current authentication state:

WPP.loader.onReady(() => {
  console.log(WPP.conn.isAuthenticated());
});

Configuration

Set window.WPPConfig before injection for supported options in src/config. WA_VERSION selects a cached/downloaded version for the local launcher. Only load one default WPP bundle per page; the reference notes explain custom global names.

Documentation

WPPConnect ecosystem

Project Purpose When to use it
WPPConnect Control WhatsApp Web from Node.js applications. Embed automation in a Node.js application.
Wppconnect Extension Send configured messages and attachments through a Chrome extension for WhatsApp Web. Use a Chrome UI over WA-JS.
WPPConnect/WA-JS API SERVER Serve URL-preview metadata and PNG payloads for WA-JS integrations. Provide a companion link-preview service.
WPPConnect/WA-Version Track WhatsApp Web versions and retrieve stored page content. Investigate WhatsApp Web version compatibility.

Support the project

WPPConnect is maintained by an open-source community. Your support helps fund maintenance, infrastructure, documentation, and the people working on the ecosystem.

If WPPConnect helps your project or business, consider making a one-time contribution or becoming a recurring supporter.

Support WPPConnect on Open Collective

Contributions are voluntary. See the official page for current financial information. You can also help with code, tests, documentation, translations and well-described issue reports.

Additional official beneficiaries in .github/FUNDING.yml: joaosouz4dev, manfe.

Contributing

Contributions of code, tests, examples, documentation and translations are welcome. For larger changes, discuss the approach in an issue first. Include the project/runtime versions, a minimal reproduction and sanitized logs when reporting a problem. Update both README.md and README.pt-BR.md in the same change when installation, configuration, features, examples, licensing or funding changes.

After installing the development dependencies, use the repository checks relevant to your change:

npm run build:prd
npm run lint
npm test

Account-dependent examples and tests require separate validation with an authorized test account. Never attach credentials or session files to an issue.

Community and support

Use repository issues for reproducible bugs and feature proposals. For usage questions, join the community through the official channels:

This project is independent and is not affiliated with or endorsed by WhatsApp or Meta. Follow applicable terms and obtain authorization for account and messaging operations.

License

Apache License 2.0 (Apache-2.0).

Copyright 2021 WPPConnect Team.

The original legal document and existing copyright notices are preserved. Third-party components retain their own terms.

Frequently asked questions

Is wa-js free to use?

wa-js is open source under the Apache-2.0 licence. There is no licence fee and no seat count — you can self-host it or, where the project offers one, pay a vendor for a managed version instead.

What does wa-js do?

Browser-side WhatsApp Web automation library. Exposes the WPP JavaScript API for chats, messages, contacts, groups, media and events; powers WPPConnect integrat

What is wa-js written in?

wa-js is primarily written in TypeScript. Its source is publicly available at https://github.com/wppconnect-team/wa-js, and it has 830 GitHub stars.