Skip to main content
BitByteLab Logo

📞 WhatXtract

🕵️‍♂️ A powerful multithreaded CLI tool to extract and verify WhatsApp numbers using WhatsApp Web — no API needed.

WhatXtract is a robust, easy-to-use WhatsApp data extraction and automation toolkit built in Python. It lets you verify, extract, and validate contact numbers directly via WhatsApp Web with headless automation — powered by selenium and undetected-chromedriver.

Designed for developers, growth hackers, marketers, and data analysts, WhatXtract enables you to:

  • ✅ Verify which numbers are active WhatsApp users
  • 📤 Extract and clean up phone lists for lead gen or CRM sync
  • ⚙️ Build custom WhatsApp workflows with automation at the core

GitHub Release Badge License Badge Python Version Project Status PyPI Version PyPI Downloads Top Language Ruff Code Quality


🌟 Features

  • ✅ Detect Active/Inactive WhatsApp Numbers
  • 🧠 Intelligent Login Handling (QR scan and session reuse)
  • 🔀 Concurrent Multi-Account Checking
  • 🛡️ Proxy Support (optional, per account)
  • 🗃️ Persistent Profiles – saves WhatsApp login sessions
  • 🕶️ Headless Mode – optional
  • 🕓 Customizable Delays – mimic human-like behavior
  • 📂 Custom Config Support (whatschecker.config.json)
  • 📈 Built with Selenium + Undetected ChromeDriver
  • 💥 Auto dependency installs on first run
  • 📇 Extracts valid WhatsApp numbers from saved contacts on the device

📦 How It Works

WhatXtract uses a multistep pipeline to extract valid WhatsApp users from your own contact list in a semi or fully-automated fashion:

  1. Prepare a .txt file with phone numbers — one per line.
  2. WhatXtract converts this into a .vcf file of ~5000 contacts per batch.
  3. Import the .vcf file to your WhatsApp installed Phone.
  4. Launch WhatsApp and wait for sync.
  5. Extracts relevant stores from WhatsApp IndexedDB.
  6. Parses contacts to extract name and number of valid users.
  7. Exports to a timestamped CSV file.

ℹ️ All the above steps can be performed automatically in sequence.
For now perform Step 3 and 4 manually.


🚀 Usage

1. 📦 Installation

git clone https://github.com/bitbytelab/WhatXtract.git
cd WhatXtract
chmod +x whatxtract.py

2. 🧪 First-time Setup (Scan QR)

./whatxtract.py --add-account

Scan the QR code to save your WhatsApp session. You can add multiple accounts this way.


3. 📤 Checking Numbers

Prepare an input file (e.g., numbers.txt) with one number per line:

+12025550123
+447911123456
+8801711123456

Run the checker:

./whatxtract.py --input numbers.txt --valid active.txt --invalid inactive.txt

You can also run in headless mode:

./whatxtract.py --input numbers.txt --valid active.txt --invalid inactive.txt --headless

4. 📇 Contacts Extraction

To extract valid WhatsApp numbers from your saved contacts:

python -m whatxtract --input contacts

This will:

  1. Launch WhatsApp Web and log you in.
  2. Extract contacts from WhatsApp database.
  3. Save valid WhatsApp numbers along with name, about, and avatar info to a CSV.

The generated CSV will be saved as:

valid_whatsapp_contacts_YYYY_mm_dd_HH_MM.csv

📁 Example output preview:

name about user_avatar
019xxxxxxxxx Always learning https://media.whatsapp.net/...
018xxxxxxxxx Big brother watching you 😊 default

📝 Note: Contact names must be saved as numbers (i.e., "017xxxxxxx") to work properly with this feature.

5. 🧩 Optional Arguments

Flag Description
--input Input file with numbers
--valid Output file for active numbers
--invalid Output file for inactive numbers
--delay Base delay in seconds between number checks
--proxies List of proxies (e.g., http://ip:port)
--headless Run Chrome in headless mode
--add-account Launch new profile and scan QR to add account

6. ⚙️ Config File Support

You can also define your settings in a whatschecker.config.json file:

{
  "input": "numbers.txt",
  "valid": "active.txt",
  "invalid": "inactive.txt",
  "delay": 8,
  "proxies": ["http://127.0.0.1:8000", null]
}

Then just run:

./whatxtract.py

🔐 Session Management

Saved WhatsApp sessions are stored in:

./WAProfiles/account1
./WAProfiles/account2
...

Remove a folder to reset that session.


🧰 Dependencies

📦 Auto-installs on first run if not found!


📂 Folder Structure


❓ FAQ

Q: Will my WhatsApp account get banned?
A: This script mimics human behavior using real browser sessions and delays. Use proxies and multiple accounts to reduce risk. No API violations.

Q: Is this open source?
A: Yes! MIT licensed. Use it responsibly and contribute back.


Here’s a clean and friendly Contribution section you can add to your README.md:


🤝 Contribution

Contributions are welcome and appreciated!

  • Feel free to submit pull requests (PRs) to improve features, fix bugs, or enhance documentation.
  • Please ensure your code follows standard conventions and is well-tested where applicable.
  • If you're planning a major change, consider opening an issue first to discuss it.

Let’s make this project better together! 💡


⚠️ Disclaimer

This tool is provided for educational and research purposes only.

  • Use at your own risk.
  • The author is not responsible for any misuse, damages, or consequences arising from the use of this tool.
  • Automated or excessive interaction with WhatsApp services may violate their Terms of Service and can lead to account bans or other penalties.
  • By using this tool, you agree that you understand the risks and take full responsibility for any outcomes.

Always respect the platforms you interact with. This project is not affiliated with, endorsed by, or associated with WhatsApp or Meta in any way.


👨‍💻 Author

Hasan Rasel
Made with ❤️ by BitByteLab
📧 Contact: bbytelab@gmail.com


📄 License

MIT License – see LICENSE file for details.


⭐️ Star this project

If you find this useful, please consider starring the repo!
👉 github.com/bitbytelab/WhatXtract

Metadata

Release files for whatxtract 1.0.8

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for whatxtract 1.0.8
File Size Uploaded Provenance Actions
whatxtract-1.0.8.tar.gz 533.9 kB Without provenance Details for whatxtract-1.0.8.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for whatxtract 1.0.8
File Interpreter ABI Platform Actions
whatxtract-1.0.8-py3-none-any.whl Python 3 none any Details for whatxtract-1.0.8-py3-none-any.whl

Total release size: 564.1 kB

Release files / whatxtract-1.0.8.tar.gz

Download URL whatxtract-1.0.8.tar.gz
Size 533.9 kB
Tags Source
SHA-256 checksum
How to use checksums
c13cb76f95bb7c141907f49c4ebdfd5af225db4308573b42ea8c11c86bab7b7b
BLAKE2b-256 checksum
How to use checksums
3d924b56e00924fcd954ab42d0b43a785030e15a51246160f28b3b02733a7844
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.7.20

Release files / whatxtract-1.0.8-py3-none-any.whl

Download URL whatxtract-1.0.8-py3-none-any.whl
Size 30.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1de36e4dad7119f270372f0272ad4b80777721aa2ce84214318b1ec31f9eb188
BLAKE2b-256 checksum
How to use checksums
69b2580bc3dd8c759f2f260c6d2c2a827048d1afab09a5ff84c79a50c61daad7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.7.20

Security for whatxtract 1.0.8

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page