Extract WhatsApp protobuf messages and enums with Proto Extractor
masterThe Proto Extractor is a tool that extracts every protobuf message and enum definition from WhatsApp Web and emits them into a single .proto file.
It works by using Playwright to launch a headed Chromium instance, loading web.whatsapp.com, and capturing all .js resources served. It then uses Acorn to parse these chunks, identifying modules that declare an internalSpec. The parser resolves cross-module references, enum bodies, oneof groups, and nested types to generate a proto2 source file.