Using WhoisFreaks APIs with Python: A Practical Developer's Guide
The WhoisFreaks Python SDK offers developers a robust toolkit for integrating domain intelligence features into their apps. It provides access to both current and historical domain registration records, enabling tracking of ownership shifts and in-depth analysis of domain data. The SDK supports advanced querying using registrant details or related information and includes tools for checking domain availability and handling multiple domains efficiently.
It also streamlines operations like formatting WHOIS data, managing API communications, and applying filters for more precise results. With built-in authentication and flexible query options, the SDK delivers a smooth experience for developers creating tools for domain analysis, cybersecurity, or digital asset oversight.
Installation Steps
To proceed, Python and pip must be installed on your machine. If it's not already installed, click here to install Python.
To install the SDK, you can visit the official SDK project on PyPi. Alternatively, you may follow these recommended steps:
Install via pip
pip install whoisfreaksError (externally-managed-environment)
error: externally-managed-environment
This environment is externally managed
↳ To install Python packages system-wide, try apt install python3-xyz, where xyz is the package you are trying to install.Use a Virtual Environment (recommended)
python3 -m venv venv
source venv/bin/activate
pip install whoisfreaksLocal Build via Source Code
1. Clone the repository
git clone https://github.com/WhoisFreaks/wf-python-sdk.git2. Navigate to the cloned directory
cd wf-python-sdk3. Create a Virtual Environment (Recommended)
python3 -m venv virtual_env
# Replace 'virtual_env' with a name of your choice.
source venv/bin/activate4. Build the project
The -e means editable mode, so any changes you make to the local source files will immediately reflect when you import the package.
pip install -e .5. Running Python files inside the virtual environment
Remember, if you're using a virtual environment, you need to run your .py files using the Python interpreter from that environment. For Example:
/home/user_name/path_to_directory/virtual_environment_name/bin/python3 your_python_file.pyPlease update all path variables to reflect your specific setup for example, replace user_name with your machine’s username, path_to_directory with your actual directory path, virtual_environment_name with the name of your virtual environment, and so on.
Installing or Upgrading to a Specific Version
Upgrade to the latest version
pip install whoisfreaks --upgradeTo install a specific version, first check all available versions if you’re unsure. Alternatively, you can visit the official SDK project history on PyPi.
List all available versions
pip index versions whoisfreaksInstall a specific version
pip install whoisfreaks==version_number # e.g., 0.0.45Uninstall the package
pip uninstall whoisfreaksOther SDK Lookups
WHOIS lookups
Offers live, reverse, historical, IP, ASN, and bulk domain WHOIS lookups.
DNS Lookups
Provides live, reverse, historical, and bulk DNS lookup services.
Domain Availability
Checks domain availability across TLDs and suggests alternatives.
SSL Lookups
Performs SSL lookup and shows certificate chain from start to present.
