Skip to main content

Python client library for Domains & Subdomains Discovery API.

Project description

domain-discovery-py license domain-discovery-py release domain-discovery-py build

Overview

The client library for Domains & Subdomains Discovery API in Python language.

The minimum Python version is 3.6.

Installation

pip install domain-discovery

Examples

Full API documentation available here

Create a new client

from domaindiscovery import *

client = Client('Your API key')

Domains

terms = {
    'include': ['example.*']
}

# Get the list of domains (up to 10,000)
result = client.get(domains=terms)

# Total count
print(result.domains_count)

Subdomains

domain_terms = {
    'include': ['blog.*'],
    'exclude': ['*.com']
}
subdomain_terms = {
    'include': ['*news*']
}

# Search for subdomains
result = client.get(subdomains=subdomain_terms)

# Search in subdomains of the required domain names
result = client.get(
    domains=domain_terms,
    subdomains=subdomain_terms)

Extras

import datetime

terms = {
    'include': ['blog.*'],
    'exclude': ['*.com']
}
since_date = datetime.date(2021, 8, 12)

# Get raw response in XML and filter by date
raw_result = client.get_raw(
    domains=terms,
    output_format=Client.XML_FORMAT,
    since_date=since_date)

Response model overview

Response:
    - domains_count: int
    - domains_list: [str]

Changelog

1.0.0 (2021-11-19)

  • First release

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

domain-discovery-1.0.0.tar.gz (9.1 kB view hashes)

Uploaded source

Built Distribution

domain_discovery-1.0.0-py3-none-any.whl (9.9 kB view hashes)

Uploaded py3

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page