Skip to main content

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.

Features

  • Asynchronous downloads with configurable concurrency
  • Support for both CSV and JSON report formats
  • Optional gzip decompression of zone files
  • Environment variable support for credentials
  • Comprehensive error handling and logging

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 Interface

czds [-h] [-u USERNAME] [-p PASSWORD] [-z] [-c CONCURRENCY] [-d] [-k] [-r] [-s] [-f {csv,json}] [-o OUTPUT]

Arguments

Basic Options
Argument Description Default
-h, --help Show help message and exit
-u, --username ICANN Username $CZDS_USER
-p, --password ICANN Password $CZDS_PASS
-o, --output Output directory Current directory
Zone Options

| -z, --zones | Download zone files | | | -c, --concurrency | Number of concurrent downloads | 3 |

Report Options

| -r, --report | Download the zone stats report | | | -s, --scrub | Scrub username from the report | | | -f, --format | Report output format (csv/json) | csv |

Environment Variables

export CZDS_USER='your_username'
export CZDS_PASS='your_password'

Python Module

import os
from czds import CZDS

async with CZDS(username, password) as client:
    # Download zone stats report
    await client.get_report('report.csv', scrub=True, format='json')
    
    # Download zone files
    zone_links = await client.fetch_zone_links()
    await client.download_zones(zone_links, 'zones', concurrency=3, decompress=True)

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.

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.vegas • SuperNETs • GitHub • GitLab • Codeberg

Metadata

Release files for czds-api 1.3.8

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for czds-api 1.3.8
File Size Uploaded Provenance Actions
czds_api-1.3.8.tar.gz 11.1 kB Without provenance Details for czds_api-1.3.8.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for czds-api 1.3.8
File Interpreter ABI Platform Actions
czds_api-1.3.8-py3-none-any.whl Python 3 none any Details for czds_api-1.3.8-py3-none-any.whl

Total release size: 21.7 kB

Release files / czds_api-1.3.8.tar.gz

Download URL czds_api-1.3.8.tar.gz
Size 11.1 kB
Tags Source
SHA-256 checksum
How to use checksums
5c07490b4afb00215d7e0685a127ce014d95b268e1f64e3dcff25b7c4e3eb2d5
BLAKE2b-256 checksum
How to use checksums
19810679a543ac55faa1bfb70e2fedf52de7db94ebb295f72a2cca7bd28e0058
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.0.1 CPython/3.13.2

Release files / czds_api-1.3.8-py3-none-any.whl

Download URL czds_api-1.3.8-py3-none-any.whl
Size 10.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
fd44a82aca27b1aa3c0a4d4624725521c354233ee16b4ca0a6037c261449f2ce
BLAKE2b-256 checksum
How to use checksums
54c7d3daaaf740d4ae5d797d760c5db87e3081182080f3449dc06d1398d35016
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.0.1 CPython/3.13.2

Security for czds-api 1.3.8

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page