dxldomaintoolsclient.client module

class dxldomaintoolsclient.client.DomainToolsApiClient(dxl_client)

Bases: dxlbootstrap.client.Client

The "DomainTools API DXL Python Client Library" client wrapper class.

Constructor parameters:

Parameters:dxl_client -- The DXL client to use for communication with the fabric
account_information(out_format='dict')

Retrieve information for the DomainTools API user account. See DXL service method and DomainTools API documentation for more information.

Parameters:out_format (str) -- [optional] : The format in which the response output should be rendered. Available formats include dict, json, and xml. For dict, the return type is a Python dictionary. For the other formats, the return type is a unicode.
Returns:Response data.
Return type:dict or unicode
brand_monitor(query, exclude=None, domain_status=None, days_back=None, out_format='dict')

Retrieves information for domains which match a customer's brand or monitored word/string. See DXL service method and DomainTools API documentation for more information.

Parameters:
  • query (str or list(str) or tuple(str) or set(str)) -- One or more domain search terms.
  • exclude (str or list(str) or tuple(str) or set(str)) -- [optional] : Domain names with these words will be excluded from the result set.
  • domain_status (str) -- [optional] : Scope of the domain names to search. By default, the API will search both new domain names and domain names which are now on-hold (pending delete). To narrow your search to only one of these status codes, set this parameter to either new or on-hold.
  • days_back (int) -- [optional] : Use this parameter in exceptional circumstances where you need to search domains registered prior to the current date.
  • out_format (str) -- [optional] : The format in which the response output should be rendered. Available formats include dict, json, and xml. For dict, the return type is a Python dictionary. For the other formats, the return type is a unicode.
Returns:

Response data.

Return type:

dict or unicode

domain_profile(query, out_format='dict')

Retrieves a profile for the specified domain name. See DXL service method and DomainTools API documentation for more information.

Parameters:
  • query (str) -- Domain name for which to retrieve profile information.
  • out_format (str) -- [optional] : The format in which the response output should be rendered. Available formats include dict, json, and xml. For dict, the return type is a Python dictionary. For the other formats, the return type is a unicode.
Returns:

Response data.

Return type:

dict or unicode

Retrieves information for domains which match a search string. See DXL service method and DomainTools API documentation for more information.

Parameters:
  • query (str or list(str) or tuple(str) or set(str)) -- One or more domain search terms.
  • exclude_query (str or list(str) or tuple(str) or set(str)) -- [optional] : Domain names with these words will be excluded from the result set.
  • max_length (int) -- [optional] : Limit the maximum domain character count.
  • min_length (int) -- [optional] : Limit the minimum domain character count.
  • has_hyphen (bool) -- [optional] : Return results with hyphens in the domain name.
  • has_number (bool) -- [optional] : Return results with numbers in the domain name.
  • active_only (bool) -- [optional] : Return only domains which are currently registered.
  • deleted_only (bool) -- [optional] : Return only domains previously registered but not currently registered.
  • anchor_left (bool) -- [optional] : Return only domains that start with the query term.
  • anchor_right (bool) -- [optional] : Return only domains that end with the query term.
  • page (int) -- [optional] : Sets the page of results to retrieve from the server.
  • out_format (str) -- [optional] : The format in which the response output should be rendered. Available formats include dict, json, and xml. For dict, the return type is a Python dictionary. For the other formats, the return type is a unicode.
Returns:

Response data.

Return type:

dict or unicode

domain_suggestions(query, out_format='dict')

Retrieves list of domain names which are similar to words in the supplied query parameter. See DXL service method and DomainTools API documentation for more information.

Parameters:
  • query (str) -- Domain name for which to retrieve suggestions.
  • out_format (str) -- [optional] : The format in which the response output should be rendered. Available formats include dict, json, and xml. For dict, the return type is a Python dictionary. For the other formats, the return type is a unicode.
Returns:

Response data.

Return type:

dict or unicode

host_domains(ip_address, limit=None, out_format='dict')

Retrieves a list of containers which share the same IP address. See DXL service method and DomainTools API documentation for more information.

Parameters:
  • ip_address (str) -- IP address for which the list of containers is desired.
  • limit (int) -- [optional] : Limit the number of matched domain names that are returned in your result set.
  • out_format (str) -- [optional] : The format in which the response output should be rendered. Available formats include dict, json, and xml. For dict, the return type is a Python dictionary. For the other formats, the return type is a unicode.
Returns:

Response data.

Return type:

dict or unicode

hosting_history(query, out_format='dict')

Retrieves a list of changes which have occurred in a domain name's registrar, IP address, and name servers. See DXL service method and DomainTools API documentation for more information.

Parameters:
  • query (str) -- Domain name to retrieve hosting history for.
  • out_format (str) -- [optional] : The format in which the response output should be rendered. Available formats include dict, json, and xml. For dict, the return type is a Python dictionary. For the other formats, the return type is a unicode.
Returns:

Response data.

Return type:

dict or unicode

ip_monitor(query, days_back=None, page=None, out_format='dict')

Retrieves activity for monitored domains which match the ip address supplied in the query parameter. See DXL service method and DomainTools API documentation for more information.

Parameters:
  • query (str) -- IP address to query. For example: 65.55.53.233.
  • days_back (int) -- [optional] : Use this parameter in exceptional circumstances where you need to search domains registered prior to the current date.
  • page (int) -- [optional] : Sets the page of results to retrieve from the server.
  • out_format (str) -- [optional] : The format in which the response output should be rendered. Available formats include dict, json, and xml. For dict, the return type is a Python dictionary. For the other formats, the return type is a unicode.
Returns:

Response data.

Return type:

dict or unicode

ip_registrant_monitor(query, days_back=None, search_type=None, server=None, country=None, org=None, page=None, include_total_count=None, out_format='dict')

Retrieves information for IP ranges which match one of the terms in the supplied query parameter. See DXL service method and DomainTools API documentation for more information.

Parameters:
  • query (str or list(str) or tuple(str) or set(str)) -- One or more free text query terms.
  • days_back (int) -- [optional] : Use this parameter in exceptional circumstances where you need to search domains registered prior to the current date.
  • search_type (str) -- [optional] : Type of changes to return. Valid options are all, additions, removals, and modifications. Defaults to all.
  • server (str) -- [optional] : Limits results to ranges from a particular Whois server.
  • country (str) -- [optional] : Limits results to IP addresses allocated to an entity with a particular country. Valid options are ISO 3166-1 two character country codes.
  • org (str) -- [optional] : Limits results to a particular organization.
  • page (int) -- [optional] : Sets the page of results to retrieve from the server.
  • include_total_count (bool) -- [optional] : Return the total number of results for a query. This should typically be used only for the first page of a large result set.
  • out_format (str) -- [optional] : The format in which the response output should be rendered. Available formats include dict, json, and xml. For dict, the return type is a Python dictionary. For the other formats, the return type is a unicode.
Returns:

Response data.

Return type:

dict or unicode

iris(domain=None, ip_address=None, email=None, nameserver=None, registrar=None, registrant=None, registrant_org=None, out_format='dict')

Retrieves Iris pivot engine domain data for any provided search terms, ANDed together. See DXL service method and DomainTools API documentation for more information.

Parameters:
  • domain (str or list(str) or tuple(str) or set(str)) -- [optional] : One or more domains.
  • ip_address (str) -- [optional] : A single full IP address - for example: 65.55.53.233 - that will be matched to the A record for a domain name.
  • email (str) -- [optional] : A single email address. The results will match email addresses in the Admin, Billing, Registrant, and Technical Contacts, along with SSL, Whois Records, and DNS/SOA records.
  • nameserver (str) -- [optional] : The exact name of the server you wish to query.
  • registrar (str) -- [optional] : Word search on the domain registrar.
  • registrant (str) -- [optional] : Word search on the Whois registrant field.
  • registrant_org (str) -- [optional] : Word search on the Whois registrant organization field.
  • out_format (str) -- [optional] : The format in which the response output should be rendered. Available formats include dict, json, and xml. For dict, the return type is a Python dictionary. For the other formats, the return type is a unicode.
Returns:

Response data.

Return type:

dict or unicode

name_server_monitor(query, days_back=None, page=None, out_format='dict')

Retrieves activity for monitored Name Servers which match the hostname supplied in the query parameter. See DXL service method and DomainTools API documentation for more information.

Parameters:
  • query (str) -- Hostname of the Name Server to query. For example: dynect.net.
  • days_back (int) -- [optional] : Use this parameter in exceptional circumstances where you need to search domains registered prior to the current date.
  • page (int) -- [optional] : Sets the page of results to retrieve from the server.
  • out_format (str) -- [optional] : The format in which the response output should be rendered. Available formats include dict, json, and xml. For dict, the return type is a Python dictionary. For the other formats, the return type is a unicode.
Returns:

Response data.

Return type:

dict or unicode

parsed_whois(query, out_format='dict')

Retrieves parsed information extracted from the raw Whois record for the domain supplied in the query parameter. See DXL service method and DomainTools API documentation for more information.

Parameters:
  • query (str) -- Hostname of the Name Server to query. For example: dynect.net.
  • out_format (str) -- [optional] : The format in which the response output should be rendered. Available formats include dict, json, and xml. For dict, the return type is a Python dictionary. For the other formats, the return type is a unicode.
Returns:

Response data.

Return type:

dict or unicode

phisheye(query, days_back=None, out_format='dict')

Retrieves daily monitor results from the DomainTools PhishEye product for the term supplied in the query parameter. See DXL service method and DomainTools API documentation for more information.

Parameters:
  • query (str) -- Term for which the day's domains are desired.
  • days_back (int) -- [optional] : Use this parameter in exceptional circumstances where you need to search domains registered prior to the current date.
  • out_format (str) -- [optional] : The format in which the response output should be rendered. Available formats include dict, json, and xml. For dict, the return type is a Python dictionary. For the other formats, the return type is a unicode.
Returns:

Response data.

Return type:

dict or unicode

phisheye_term_list(include_inactive=None, out_format='dict')

Retrieves a list of terms setup for the DomainTools PhishEye product for this account. See DXL service method and DomainTools API documentation for more information.

Parameters:
  • include_inactive (bool) -- [optional] : Use this parameter to display terms that may have been inactivated in users' lists.
  • out_format (str) -- [optional] : The format in which the response output should be rendered. Available formats include dict, json, and xml. For dict, the return type is a Python dictionary. For the other formats, the return type is a unicode.
Returns:

Response data.

Return type:

dict or unicode

registrant_monitor(query, exclude=None, days_back=None, limit=None, out_format='dict')

Retrieves information from the ownership (Whois) records of domain names for search terms specified in the query parameter. See DXL service method and DomainTools API documentation for more information.

Parameters:
  • query (str or list(str) or tuple(str) or set(str)) -- One or more search terms.
  • exclude (str or list(str) or tuple(str) or set(str)) -- [optional] : Whois records with these words will be excluded from the result set.
  • days_back (int) -- [optional] : Use this parameter in exceptional circumstances where you need to search domains registered prior to the current date.
  • limit (int) -- [optional] : Limit the number of matched domain names that are returned in your result set.
  • out_format (str) -- [optional] : The format in which the response output should be rendered. Available formats include dict, json, and xml. For dict, the return type is a Python dictionary. For the other formats, the return type is a unicode.
Returns:

Response data.

Return type:

dict or unicode

reputation(query, include_reasons=None, out_format='dict')

Retrieves reputation information for the domain specified in the query parameter. See DXL service method and DomainTools API documentation for more information.

Parameters:
  • query (str) -- Input domain for which the risk score is desired.
  • include_reasons (bool) -- [optional] : Return a list of reasons for the risk score determination.
  • out_format (str) -- [optional] : The format in which the response output should be rendered. Available formats include dict, json, and xml. For dict, the return type is a Python dictionary. For the other formats, the return type is a unicode.
Returns:

Response data.

Return type:

dict or unicode

reverse_ip(domain, limit=None, out_format='dict')

Retrieves a list of containers which share the same domain name. See DXL service method and DomainTools API documentation for more information.

Parameters:
  • domain (str) -- Domain name for which the list of containers is desired.
  • limit (int) -- [optional] : Limit the number of matched domain names that are returned in your result set.
  • out_format (str) -- [optional] : The format in which the response output should be rendered. Available formats include dict, json, and xml. For dict, the return type is a Python dictionary. For the other formats, the return type is a unicode.
Returns:

Response data.

Return type:

dict or unicode

reverse_ip_whois(query=None, ip_address=None, country=None, server=None, include_total_count=None, page=None, out_format='dict')

Retrieves a list of IP ranges that are owned by an Organization. Either a query or an ip_address parameter must be specified, but not both. See DXL service method and DomainTools API documentation for more information.

Parameters:
  • query (str or list(str) or tuple(str) or set(str)) -- [optional] : One or more search terms. The query terms have the following rules: +term: Term must be included in the results. -term: Term must not be included in the results. term*: Term as a prefix must be included in the results. No modifiers: The search performed is a phrase search. For example: if you provide a query of google inc then only results that include both items in the order provided will be included.
  • ip_address (str) -- [optional] : Returns the most recent cached ip whois record for the allocated range the ip address is in.
  • country (str) -- [optional] : Limits results to IP addresses allocated to an entity with a particular country. Valid options are ISO 3166-1 two character country codes.
  • server (str) -- [optional] : Limits results to ranges from a particular Whois server.
  • include_total_count (bool) -- [optional] : Return the total number of results for a query. This should typically be used only for the first page of a large result set.
  • page (int) -- [optional] : Sets the page of results to retrieve from the server.
  • out_format (str) -- [optional] : The format in which the response output should be rendered. Available formats include dict, json, and xml. For dict, the return type is a Python dictionary. For the other formats, the return type is a unicode.
Returns:

Response data.

Return type:

dict or unicode

reverse_name_server(query, limit=None, out_format='dict')

Retrieves a list of the domain names that share the same primary or secondary name server. See DXL service method and DomainTools API documentation for more information.

Parameters:
  • query (str) -- Domain name or a name server to query.
  • limit (int) -- [optional] : Limit the number of matched domain names that are returned in your result set.
  • out_format (str) -- [optional] : The format in which the response output should be rendered. Available formats include dict, json, and xml. For dict, the return type is a Python dictionary. For the other formats, the return type is a unicode.
Returns:

Response data.

Return type:

dict or unicode

reverse_whois(query, exclude=None, scope=None, mode=None, out_format='dict')

Retrieves a list of the domain names that share the same Registrant Information. See DXL service method and DomainTools API documentation for more information.

Parameters:
  • query (str or list(str) or tuple(str) or set(str)) -- One or more terms to search for in the Whois record.
  • exclude (str or list(str) or tuple(str) or set(str)) -- [optional] : Domain names with Whois records that match these terms will be excluded from the result set.
  • scope (str) -- [optional] : Use current to include only current Whois records or historic to include both current and historic Whois records in the results. The default is current.
  • mode (str) -- [optional] : Use quote to only list the size and retail price of the query if you have per-domain pricing access or purchase to include the complete list of domain names that match the query.
  • out_format (str) -- [optional] : The format in which the response output should be rendered. Available formats include dict, json, and xml. For dict, the return type is a Python dictionary. For the other formats, the return type is a unicode.
Returns:

Response data.

Return type:

dict or unicode

whois(query, out_format='dict')

Retrieves the most recent Whois record for the domain name or IP address provided in the query parameter. See DXL service method and DomainTools API documentation for more information.

Parameters:
  • query (str) -- Domain name or IP address to query.
  • out_format (str) -- [optional] : The format in which the response output should be rendered. Available formats include dict, json, and xml. For dict, the return type is a Python dictionary. For the other formats, the return type is a unicode.
Returns:

Response data.

Return type:

dict or unicode

whois_history(query, out_format='dict')

Retrieves a list of historic Whois records for the domain name provided in the query parameter. See DXL service method and DomainTools API documentation for more information.

Parameters:
  • query (str) -- Domain name to query.
  • out_format (str) -- [optional] : The format in which the response output should be rendered. Available formats include dict, json, and xml. For dict, the return type is a Python dictionary. For the other formats, the return type is a unicode.
Returns:

Response data.

Return type:

dict or unicode