Extract and verify WhatsApp contact numbers via WhatsApp Web using an automation-powered Python toolkit.
Project description
📞 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
🌟 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:
- Prepare a
.txtfile with phone numbers — one per line. - WhatXtract converts this into a
.vcffile of ~5000 contacts per batch. - Import the
.vcffile to your WhatsApp installed Phone. - Launch WhatsApp and wait for sync.
- Extracts relevant
storesfrom WhatsApp IndexedDB. - Parses contacts to extract name and number of valid users.
- 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:
- Launch WhatsApp Web and log you in.
- Extract contacts from WhatsApp database.
- 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
- Python
3.9+ - undetected-chromedriver
- selenium
📦 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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file whatxtract-1.0.8.tar.gz.
File metadata
- Download URL: whatxtract-1.0.8.tar.gz
- Upload date:
- Size: 533.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.7.20
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c13cb76f95bb7c141907f49c4ebdfd5af225db4308573b42ea8c11c86bab7b7b
|
|
| MD5 |
2ec21932491208263c7fd77f0bca5b7e
|
|
| BLAKE2b-256 |
3d924b56e00924fcd954ab42d0b43a785030e15a51246160f28b3b02733a7844
|
File details
Details for the file whatxtract-1.0.8-py3-none-any.whl.
File metadata
- Download URL: whatxtract-1.0.8-py3-none-any.whl
- Upload date:
- Size: 30.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.7.20
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1de36e4dad7119f270372f0272ad4b80777721aa2ce84214318b1ec31f9eb188
|
|
| MD5 |
fb834f835b84e3e18a97823447619662
|
|
| BLAKE2b-256 |
69b2580bc3dd8c759f2f260c6d2c2a827048d1afab09a5ff84c79a50c61daad7
|