ICANN Centralized Zone Data Service (CZDS) Tool https://czds.icann.org
Go to file
2025-02-21 02:20:32 -05:00
czds pypi ready 2025-02-21 02:20:32 -05:00
extras pypi ready 2025-02-21 02:20:32 -05:00
LICENSE Made into a class now for modular usage 2025-02-20 23:16:31 -05:00
README.md pypi ready 2025-02-21 02:20:32 -05:00
setup.py pypi ready 2025-02-21 02:20:32 -05:00

ICANN Centralized Zone Data Service API

The ICANN Centralized Zone Data Service (CZDS) allows approved users to request and download DNS zone files in bulk, provided they represent a legitimate company or academic institution and their intended use is legal and ethical. Once ICANN approves the request, this tool streamlines the retrieval of extensive domain name system data, facilitating research and security analysis in the realm of internet infrastructure.

Zone Information

Zone files are updated once every 24 hours, specifically from 00:00 UTC to 06:00 UTC. Access to these zones is granted in increments, and the total time for approval across all zones may extend to a month or longer. It is typical for more than 90% of requested zones to receive approval. Access to certain zone files may require additional application forms with the TLD organization. Please be aware that access to certain zones is time-bound, expiring at the beginning of the following year, or up to a decade after the initial approval has been confirmed.

At the time of writing this repository, the CZDS offers access to 1,151 zones in total.

1,079 have been approved, 55 are still pending (after 3 months), 10 have been revoked because the TLDs are longer active, and 6 have been denied. Zones that have expired automatically had the expiration extended for me without doing anything, aside from 13 zones that remained expired. I have included a recent stats file directly from my ICANN account.

Installation

pip install czds-api

Usage

Command line
czds [--username <username> --password <password>] [--concurrency <int>]

You can also set the CZDS_USER & CZDS_PASS environment variables to automatically authenticate:

export CZDS_USER='your_username'
export CZDS_PASS='your_password'
As a Python module
import os

from czds import CZDS

CZDS_client = CZDS(username, password)

CZDS_client.download_report('report.csv')

zone_links = CZDS_client.fetch_zone_links()

os.makedirs('zones', exist_ok=True)

for zone_link in zone_links:
    CZDS_client.download_zone(zone_link, 'zones')

Respects & extras

While ICANN does have an official czds-api-client-python repository, I rewrote it from scratch to be more streamline & included a POSIX version for portability. There is some official documentation that was referenced in the creation of the POSIX version. Either way, big props to ICANN for allowing me to use the CZDS for research purposes!


Mirrors for this repository: acid.vegasSuperNETsGitHubGitLabCodeberg