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.2.tar.gz (11.9 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.2-py3-none-any.whl (9.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: godaddycheck-0.1.2.tar.gz
  • Upload date:
  • Size: 11.9 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.2.tar.gz
Algorithm Hash digest
SHA256 9483fb3fc70013d593fed2845568f88ab5d22746691898ddab2ca7264b4f7d46
MD5 abb563c5e6796b25c7d30f3a94aad451
BLAKE2b-256 294e1cab5b243681a714cd0f1b0d21367c90a04b77e5c68aa09bb0764ab27785

See more details on using hashes here.

File details

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

File metadata

  • Download URL: godaddycheck-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 9.3 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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 b50d42a36d4267febcb67d6b6a51e4294ed85e0a0eb9e7168208d1fb1ac6d80a
MD5 f3687a5b0b53af71bd87eab19ec71909
BLAKE2b-256 3270a70bfc3be2ea243012e4654779605a56f82acb98fcd3983899844ee01729

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