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:

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

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.1.tar.gz (11.7 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.1-py3-none-any.whl (9.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: godaddycheck-0.1.1.tar.gz
  • Upload date:
  • Size: 11.7 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.1.tar.gz
Algorithm Hash digest
SHA256 41fbed8a5513ec1598b231fd7111ba386bee63911302473d8c8613fc960cf935
MD5 fb34c7684c2971ad05499f5fe8bc3b9c
BLAKE2b-256 835d4a3a794f3d32528f286c9cc2de683a390af71bc023025f1026355211fb76

See more details on using hashes here.

File details

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

File metadata

  • Download URL: godaddycheck-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 9.1 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 bdb878cbd99b2bb0c4a5c3981a431547ac099bb6a7e247e2be9ad4cf5b66d5a7
MD5 e588292e8e19075f42537775a9e93ff5
BLAKE2b-256 ac81199772adb0379edaef9180d38594730f6c8acaa1f156e4adbf16ff52fc42

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