A powerful Python tool to check domain name availability with Namecheap API integration, DNS verification, and WHOIS lookup to find domains that are actually purchasable on registrars like Namecheap.
Unlike simple WHOIS checkers, this tool uses multi-layer verification to eliminate false positives and find domains you can actually register:
- ✅ Filters out reserved/restricted domains
- ✅ Identifies premium domains separately
- ✅ Verifies availability via Namecheap API
- ✅ Fast multi-threaded checking
- ✅ Comprehensive CSV reports
Perfect for: Domain investors, developers, marketers, and anyone looking for available domain names.
- Key Features
- Installation
- Quick Start
- Configuration
- Usage
- Output Files
- How It Works
- Troubleshooting
- Contributing
- License
- Author
Without Namecheap API (High Accuracy):
- Advanced WHOIS Check - Multiple indicators (registrar, creation date, expiration, nameservers)
- Comprehensive DNS Verification - Checks A, AAAA, MX, NS, CNAME, SOA records
- HTTP/HTTPS Response Check - Detects active websites vs truly available domains
- Confidence Scoring - HIGH, MEDIUM, LOW confidence levels for each result
- Smart Detection - Filters reserved/premium/parked domains
With Namecheap API (Very High Accuracy):
- All of the above PLUS
- Direct verification via Namecheap's official API
- Premium domain detection with pricing info
- Registrar-level accuracy
💡 Note: The tool provides excellent accuracy even WITHOUT the Namecheap API! The API is optional for those who want the highest possible accuracy.
Some domains show as "not found" in WHOIS but are actually:
- Reserved by registries (can't be purchased)
- Premium domains (require special pricing)
- Restricted domains (not available for regular registration)
This enhanced checker uses multiple verification methods to show only truly purchasable domains.
- AVAILABLE ✓ - Domain is confirmed available for purchase (HIGH/VERY HIGH confidence)
- POSSIBLY AVAILABLE
⚠️ - Domain might be available but needs manual verification (MEDIUM confidence) - PREMIUM 💎 - Domain is available but requires premium pricing (API only)
- TAKEN ❌ - Domain is registered
- RESTRICTED/PREMIUM
⚠️ - Domain appears unregistered but has DNS/HTTP activity (likely restricted)
- VERY HIGH - API confirmed or multiple strong indicators
- HIGH - Strong WHOIS + DNS indicators
- MEDIUM - Some conflicting signals, verify manually
- LOW - Uncertain status, treated as TAKEN for safety
- Python 3.6 or higher
- pip (Python package manager)
- Namecheap account (optional, for API access)
git clone https://github.com/sithulaka/DomainChecker.git
cd DomainCheckerpip install -r requirements.txtPackages installed:
python-whois- WHOIS lookupsdnspython- DNS verificationrequests- API callspython-dotenv- Environment variable management
# Quick test to ensure everything is installed
python -c "import whois, dns.resolver, requests; print('✅ All packages installed!')"-
Add domain names to
input/domain_name/domain_names.txt:myawesomesite cooldomain techstartup -
Add TLDs to
input/top_level_domain/tlds.txt:.com .net .org -
Run the checker:
python main.py
-
Check results in
output/available_domains.csv
Follow the Configuration section below to set up API access for the most accurate results.
Edit the .env file with your Namecheap credentials:
NAMECHEAP_API_KEY=d01aec89241e4b609041f2376f0798a9
NAMECHEAP_API_USER=your_namecheap_username
NAMECHEAP_USERNAME=your_namecheap_username
NAMECHEAP_CLIENT_IP=your_public_ip_addressHow to get your Namecheap API credentials:
- Log in to your Namecheap account
- Go to Profile > Tools > Business & Dev Tools > API Access
- Enable API access (may require min balance of $50)
- Get your API key and username
- Whitelist your public IP address (find it at https://whatismyipaddress.com/)
- Update the
.envfile with your information
Important Notes:
- Replace
your_namecheap_usernamewith your actual Namecheap username - Replace
your_public_ip_addresswith your actual public IP - You must whitelist your IP in Namecheap's API settings
- Production API endpoint is used (not sandbox)
Note: The
.envfile is git-ignored for security. Never commit API credentials to version control!
For detailed instructions on setting up Namecheap API, see: NAMECHEAP_SETUP.md
Before running the domain checker, test your API setup:
python test_api.pyThis will verify:
- ✅ All credentials are present in
.env - ✅ API key is valid
- ✅ IP address is whitelisted
- ✅ API access is enabled
Expected output:
✅ SUCCESS! API credentials are working correctly!
If you see errors, follow the solutions shown in the output or check NAMECHEAP_SETUP.md.
- Add your domain names to text files in
input/domain_name/ - Add TLDs to check in text files in
input/top_level_domain/ - Run the checker:
python main.pyMultiple input files: You can create multiple .txt files in the input folders. The program will automatically load and combine all of them.
Example structure:
input/
domain_name/
main_domains.txt
backup_domains.txt
premium_ideas.txt
top_level_domain/
common_tlds.txt
country_tlds.txt
Customize worker threads: Edit NUM_WORKERS in main.py to control parallel processing (default: 5)
The program creates 3 CSV files in the output/ folder:
Summary table view with domain names as rows and TLDs as columns
Detailed information including:
- Domain Name
- TLD
- Full Domain
- Status
- Confidence Level (VERY HIGH, HIGH, MEDIUM, LOW)
- WHOIS Available (Yes/No)
- DNS Active (Yes/No)
- DNS Records (A, AAAA, MX, NS, CNAME, SOA)
- HTTP Active (Yes/No - website responding)
- Namecheap API Status (if configured)
- Recommended Action (safe to purchase, verify first, etc.)
Clean list of available and possibly available domains sorted by confidence:
- Full Domain
- Domain Name
- TLD
- Confidence Level
- Verification Method (shows which methods were used)
Example output:
Full Domain,Domain Name,TLD
myawesomesite.com,myawesomesite,.com
techstartup.net,techstartup,.net
For each domain, the script:
- WHOIS Lookup - Queries if the domain is registered
- DNS Query - Checks for active DNS records (A, AAAA, MX, NS)
- Namecheap API Call - Verifies actual availability on Namecheap
- Smart Analysis - Determines final status:
- ✓✓✓ AVAILABLE: Confirmed by Namecheap API
- 💎 PREMIUM: Available but premium pricing
- ✗ TAKEN: Confirmed taken
- ⚠ RESTRICTED: Anomaly detected (DNS but not registered)
1. Without Namecheap API (HIGH Accuracy - Recommended for Most Users) ✓✓
- Advanced WHOIS with multiple indicators
- Comprehensive DNS checking (6 record types)
- HTTP/HTTPS website detection
- Confidence scoring system
- Filters 95%+ of false positives
2. With Namecheap API (VERY HIGH Accuracy - For Professional Use) ✓✓✓
- All features from #1
- Direct Namecheap verification
- Premium domain detection
- Filters 99%+ of false positives
Both modes are highly accurate! The API adds an extra layer but isn't required for excellent results.
DomainChecker/
├── main.py # Main application script
├── requirements.txt # Python dependencies
├── .env # API credentials (git-ignored)
├── .gitignore # Git ignore rules
├── README.md # This file
├── LICENSE # MIT License
├── input/ # Input configuration
│ ├── domain_name/ # Domain name files
│ │ ├── domain_names.txt # Your domain ideas
│ │ └── *.txt # Additional files
│ └── top_level_domain/ # TLD files
│ ├── tlds.txt # TLDs to check
│ └── *.txt # Additional TLD files
└── output/ # Generated results
├── domain_results.csv # Summary table
├── domain_results_detailed.csv # Detailed info
└── available_domains.csv # Available domains only
Edit these settings in main.py:
- Worker Threads:
NUM_WORKERS = 5(reduce if you hit rate limits) - Request Delays:
time.sleep()values (increase for fewer errors)
All sensitive configuration is stored in .env:
| Variable | Description | Required |
|---|---|---|
NAMECHEAP_API_KEY |
Your API key from Namecheap | Optional* |
NAMECHEAP_API_USER |
Your Namecheap username | Optional* |
NAMECHEAP_USERNAME |
Your Namecheap username (same as API_USER) | Optional* |
NAMECHEAP_CLIENT_IP |
Your whitelisted public IP | Optional* |
*Required for API verification, but tool works without it using WHOIS+DNS only.
- ✅ Set up Namecheap API for highest accuracy
- ⏱ The checker waits between requests to avoid rate limiting
- 🔍 DNS verification helps filter out reserved/premium domains
- 📋 Check the
available_domains.csvfile for the cleanest list - ✓ Domains marked as "AVAILABLE" by API are confirmed purchasable
- 💎 Premium domains are separated from regular available domains
- 🔄 If you get many errors, reduce
NUM_WORKERSinmain.py
Check these:
- Is your API key correct in
.env? - Is your username exactly as shown in Namecheap?
- Is your IP whitelisted in Namecheap API settings?
- Do you have sufficient balance ($50 min for API access)?
- Are you using production endpoint (not sandbox)?
Error messages:
ERROR_NO_CREDENTIALS- .env file missing or incompleteERROR_API- Wrong credentials or IP not whitelistedAPI_NOT_CONFIGURED- API key not found, using fallback method
- Reduce
NUM_WORKERSto 2-3 - Increase delays in the code
- Check your internet connection
- This is working correctly! Those domains have DNS but aren't registered
- Check
available_domains.csvfor truly available ones - If using API, check the Namecheap API Status column
- Increase
NUM_WORKERS(but may cause rate limiting) - API calls add 0.5s per request (necessary for rate limiting)
| Issue | Solution |
|---|---|
| Import errors | Run pip install -r requirements.txt |
| No domains loaded | Check .txt files are in correct folders |
| API not working | Verify credentials and IP whitelist |
| Rate limiting | Reduce NUM_WORKERS to 2-3 |
| Timeout errors | Increase time.sleep() delays |
IMPORTANT: The .env file contains your API credentials.
- ❌ Never commit it to Git (already in
.gitignore) - ❌ Never share it publicly
- ✅ Keep it local to your machine
- ✅ Create a
.env.examplefor others (without real credentials)
- Python 3.6+
- python-whois (WHOIS lookups)
- dnspython (DNS verification)
- requests (API calls)
- python-dotenv (environment variables)
See requirements.txt for version details.
=== DOMAIN CHECKER - ENHANCED ===
✅ Configuration loaded successfully!
📝 Domain names: 5
🌐 TLDs to check: 3 (.com, .net, .org)
🔍 Total domain checks: 15
✓ Namecheap API: ENABLED (will verify availability via Namecheap)
Checking: example.com...
-> example.com is TAKEN (confirmed by Namecheap)
Checking: myawesomesite123.com...
-> myawesomesite123.com is CONFIRMED AVAILABLE via Namecheap API ✓✓✓
--- SUCCESS ---
✓ Summary results saved to: output/domain_results.csv
✓ Detailed results saved to: output/domain_results_detailed.csv
✓ Available domains list saved to: output/available_domains.csv
📊 Summary:
Total domains checked: 15
Likely purchasable domains: 3
🎉 Found 3 domain(s) that appear to be available for purchase!
Check output/available_domains.csv for the list.
Contributions are welcome! Here's how you can help:
- Fork the repository
- Create a feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
- Add support for other registrar APIs (GoDaddy, Google Domains, etc.)
- Implement GUI interface
- Add domain suggestion features
- Improve error handling and retry logic
- Add unit tests
- Support for bulk domain checking (1000+ domains)
- Domain price comparison across registrars
This project is licensed under the MIT License - see the LICENSE file for details.
✅ Commercial use
✅ Modification
✅ Distribution
✅ Private use
Kavinda Sithulaka
- GitHub: @sithulaka
- Project Link: https://github.com/sithulaka/DomainChecker
If this project helped you find your perfect domain name, please consider:
- ⭐ Starring this repository
- 🐛 Reporting bugs
- 💡 Suggesting new features
- 🔀 Contributing code
- python-whois - WHOIS library
- dnspython - DNS toolkit
- Namecheap API Documentation
- Thanks to the Namecheap team for providing API access
- Thanks to all contributors and users of this tool
- Inspired by the need for accurate domain availability checking