Skip to main content

Extract and verify WhatsApp contact numbers via WhatsApp Web using an automation-powered Python toolkit.

Project description

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

whatxtract-0.1.5.tar.gz (121.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

whatxtract-0.1.5-py3-none-any.whl (30.1 kB view details)

Uploaded Python 3

File details

Details for the file whatxtract-0.1.5.tar.gz.

File metadata

  • Download URL: whatxtract-0.1.5.tar.gz
  • Upload date:
  • Size: 121.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.7.8

File hashes

Hashes for whatxtract-0.1.5.tar.gz
Algorithm Hash digest
SHA256 438ee381c7707103af80b93b9267c2ab01fa831d1136906d07cff387b6bd2d64
MD5 4c69c3703b1cf43ef0a7eba0908c568d
BLAKE2b-256 467433ad2c1e8bbe069cfdbc58000f32d2dbae59057b39e9fc713c30be71e5b6

See more details on using hashes here.

File details

Details for the file whatxtract-0.1.5-py3-none-any.whl.

File metadata

  • Download URL: whatxtract-0.1.5-py3-none-any.whl
  • Upload date:
  • Size: 30.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.7.8

File hashes

Hashes for whatxtract-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 f693bc2d2f01673d03845e072fc0b0e5162103a15153ce9686d7ae15b7e7f734
MD5 87eec858419a0fb693ca218e13629bc2
BLAKE2b-256 2588cd400bf8a4dd2c733ec6ee8d292d78326e7db95d413ea97179cc13d642e8

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page