Developer Libraries

cURL
API

Python
API SDK

Javascript
API

C#
API

Go
API SDK

Java
API

Swift
API

C++
API

Node JS
API

PHP
API

Ruby
API

Third-party Integrations

make logo Make

MISP

MS Security Copilot

Python SDK for Domain Availability Lookup with WhoisFreaks API

The WhoisFreaks Python SDK allows developers to check the availability of domain names, making it easier to identify domains that are open for registration. This functionality supports domain acquisition, brand protection, and strategic management of digital assets by uncovering new domain opportunities.


Domain Availability Lookup

This package is for performing any type of Domain Availability Lookup.

To utilize the WhoisFreaks Python SDK for checking the availability of domain names, follow these steps:

First, ensure that Python and the WhoisFreaks Python SDK are installed on your system. To install the necessary modules, please visit the Installation Steps page.

In all lookups, replace "your_api_key" with your actual API key.

  • Domain Availability Check

    domain_availability_lookup performs a domain availability check using the WhoisFreaks API. It checks whether a specific domain name is available for registration.

    python Copy
                                domain_availability_lookup(api_key='your_api_key', domain='google.com', sug=True)
                            

    Parameter:

    1. domain: The domain name to be checked for availability (e.g., "example.com").
    2. sug: For getting suggestions, it can be passed with or without a count. There are two possible values for sug: true or false. If you don't specify the sug parameter, the default value will be false.
    3. count: If sug is true, then count can be passed for the desired number of suggestions. Default value of count is 5.
    4. source: By default, a live WHOIS lookup is used to check domain availability for higher reliability. For faster responses, you can set the source to dns.
    5. format: Two formats are available JSON, XML. If you don't specify the 'format' parameter, the default format will be JSON.
    6. api_key: Get your API key from our billing dashboard.

    Returns:

    1. Success: A simple domain availability flag or a pointer to a domain_available_response struct containing domain availability of requested domain name and some other suggested domains.
    2. Error: A JSON string containing the error structure if an API error occurs, or 'nil' if the request fails.
    For a comprehensive details of response fields, please visit the Domain Availability Lookup Documentation.

    Example Usage:

    python Copy
                                from whoisfreaks import WhoisfreaksApi
    from whoisfreaks.core.api_error import ApiError
    
    client = WhoisfreaksApi()
    
    try:
        response = client.domain_availability_lookup(api_key='your_api_key', domain='google.com', sug=True)
        response = {k: v for k, v in response.dict().items() if v is not None}     # Filtering the Null values
    
        print(response)
    except ApiError as e:
        print(e.body)
                            

    Replace "whois.com" with the domain you wish to check.

To perform other lookups using the Python SDK, click on one of the related options below.


Check out the official WhoisFreaks Python SDK documentation for domain availability lookups and management.

Python SDK Integration

WhoisFreaks Python SDK

Use this powerful Python-based SDK to easily integrate, interact with, and manage data from the WhoisFreaks API seamlessly.

whoisfreaks.docs.buildwithfern.com