Skip to main content

Simple GoDaddy domain availability checker

Project description

godaddycheck

PyPI version Python License Coverage Downloads Downloads/week

Built by aman | @onlyoneaman

Simple Python package and CLI tool for checking domain availability using the GoDaddy API.

⭐ If you find this project useful, please consider giving it a star and forking it!

Features

  • Check domain availability
  • Suggest domain names based on keywords
  • List available TLDs (top-level domains)
  • Built-in retry logic with exponential backoff
  • Both library and CLI interface
  • Automatic price normalization
  • Support for GoDaddy OTE (Operational Test Environment) via GODADDY_API_URL

Installation

pip install godaddycheck

Or install from source:

git clone https://github.com/onlyoneaman/godaddycheck.git
cd godaddycheck
pip install -e .

Setup

You need GoDaddy API credentials. Get them from GoDaddy Developer Portal.

Set environment variables:

export GODADDY_API_KEY="your_api_key"
export GODADDY_API_SECRET="your_api_secret"

For GoDaddy OTE (test environment), also set:

export GODADDY_API_URL="https://api.ote-godaddy.com"

Or create a .env file in your project directory (automatically loaded):

GODADDY_API_KEY=your_api_key
GODADDY_API_SECRET=your_api_secret
GODADDY_API_URL=https://api.godaddy.com  # Optional, defaults to production

The package automatically loads .env files, so you don't need to manually export variables.

Usage

Command Line Interface

Check domain availability

# Quick check
godaddycheck check amankumar.ai

# Full check with more details
godaddycheck check amankumar.ai --type FULL

# JSON output
godaddycheck check amankumar.ai --json

Get domain suggestions

# Get 10 suggestions (default)
godaddycheck suggest tech

# Get 5 suggestions
godaddycheck suggest startup --limit 5

# JSON output
godaddycheck suggest app --json

List available TLDs

# Show first 20 TLDs (default)
godaddycheck tlds

# Show all TLDs
godaddycheck tlds --limit 0

# Show first 50 TLDs
godaddycheck tlds --limit 50

# JSON output
godaddycheck tlds --json

Python Library

Basic usage

import godaddycheck

# Check a domain
result = godaddycheck.check('amankumar.ai')
print(f"Available: {result['available']}")
print(f"Price: ${result.get('price', 'N/A')}")

# Get suggestions
suggestions = godaddycheck.suggest('tech', limit=5)
for s in suggestions:
    print(f"{s['domain']}: ${s.get('price', 'N/A')}")

# Get TLDs
tlds = godaddycheck.tlds()
print(f"Found {len(tlds)} TLDs")

Using the client class

from godaddycheck import GoDaddyClient

# Initialize client (uses environment variables by default)
client = GoDaddyClient()

# Check domain
result = client.check('amankumar.ai', check_type='FAST')
print(result)

# Get suggestions
suggestions = client.suggest('startup', limit=10)
print(suggestions)

# Get TLDs
tlds = client.tlds()
print(tlds)

# Clean up
client.close()

Using context manager

from godaddycheck import GoDaddyClient

with GoDaddyClient() as client:
    result = client.check('amankumar.ai')
    print(result)
# Client automatically closed

Custom configuration

from godaddycheck import GoDaddyClient

client = GoDaddyClient(
    api_key='your_key',
    api_secret='your_secret',
    api_url='https://api.ote-godaddy.com',  # Optional
    max_retries=5,
    timeout=60.0
)

result = client.check('amankumar.ai')

API Response Examples

Check domain

{
  "domain": "amankumar.ai",
  "available": false,
  "currency": "USD"
}

Suggest domains

[
  {
    "domain": "techstartup.com",
    "available": true,
    "price": 12.99,
    "currency": "USD"
  },
  {
    "domain": "mytech.io",
    "available": true,
    "price": 39.99,
    "currency": "USD"
  }
]

List TLDs

[
  {
    "name": "com",
    "type": "GENERIC"
  },
  {
    "name": "io",
    "type": "COUNTRY_CODE"
  }
]

Development

# Clone the repo
git clone https://github.com/onlyoneaman/godaddycheck.git
cd godaddycheck

# Create virtual environment (recommended)
python -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate

# Install in development mode
pip install -e .

# Install dev dependencies
pip install -e ".[dev]"

# Run tests
pytest

# Run tests with coverage
pytest --cov=godaddycheck --cov-report=html

Requirements

  • Python >= 3.7
  • httpx >= 0.24.0

Best Practices

Virtual Environment

Always use a virtual environment when working with Python packages:

python -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate
pip install godaddycheck

Environment Variables

Store sensitive credentials in environment variables or .env files (never commit them):

# .env file (add to .gitignore)
GODADDY_API_KEY=your_key
GODADDY_API_SECRET=your_secret

Resource Management

Use context managers for automatic cleanup:

with GoDaddyClient() as client:
    result = client.check('amankumar.ai')

License

MIT License - see LICENSE file for details.

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

Support


⭐ Star this repo if you find it useful!

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

godaddycheck-0.1.3.tar.gz (12.1 kB view details)

Uploaded Source

Built Distribution

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

godaddycheck-0.1.3-py3-none-any.whl (9.5 kB view details)

Uploaded Python 3

File details

Details for the file godaddycheck-0.1.3.tar.gz.

File metadata

  • Download URL: godaddycheck-0.1.3.tar.gz
  • Upload date:
  • Size: 12.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.14

File hashes

Hashes for godaddycheck-0.1.3.tar.gz
Algorithm Hash digest
SHA256 362b208a3365aed16fefa88841c82ece978abe54afb99aabc1d605830fbfe225
MD5 2343f1ec09f8767f4f19abd5faf2cad6
BLAKE2b-256 80d9f28ce3b71723820b618cc97737229ebd7d228e308ca624d4194ed6b98866

See more details on using hashes here.

File details

Details for the file godaddycheck-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: godaddycheck-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 9.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.14

File hashes

Hashes for godaddycheck-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 9c671bfa962f204f2a40cab60f9eb4b07b7dfac1695cfa27e2e7fc3211a0ddab
MD5 1574e5ee6ebcb6110677502d03e9b6bd
BLAKE2b-256 7f2ab0da78a19dc7ec300d309bf647b1071ee319624c8d0d8e14c5f7bfb05daf

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