Have questions about our data formats or service? Check out our FAQ page.
Base URL: https://api.zonestats.io/api2/
Response Format: CSV files (comma-separated). View sample output
Endpoint:
https://api.zonestats.io/api2/?method=zones
This endpoint returns a CSV-formatted list of all currently supported domain zones with the following information:
Request Parameters: None required
Response Fields (CSV format):
zoneTLD - Top-level domain extension (use this value in the download method)
|
| isUpdatedDaily - Boolean flag: 1 indicates daily updates, 0 indicates less frequent updates |
| isCountryCode - Boolean flag: 1 indicates a country-code TLD, 0 indicates a generic TLD |
* You can test this endpoint by clicking here to download the complete zone list.
Endpoint:
https://api.zonestats.io/api2/?method=download
Request Parameters:
| zone_tld |
[Required] The top-level domain extension you want to download. To download a combined dataset containing all zones at once, use the special value all-zones. For internationalized domain names (IDN), provide the punycode representation. Examples: all-zones - Combined dataset of all domain zones com - .com zone only xn--3ds443g - IDN zone example ( 在线 )
💡 Use the |
| dataset_type |
[Required] Choose the data format you need. list - Simple text file with one domain name per line (no additional metadata) dataset - Comprehensive dataset including domain names plus nameservers, IP addresses, email addresses, phone numbers, and other metadata. Learn more → |
| filter_type |
[Required] Select which domains to include. active - Complete list of all currently active domains in the specified zone new - Only domains that were newly registered or delegated within the last 24 hours
⚠️ Note: The |
| token |
[Required] Your API authentication token. Find your unique API token in the Dashboard section of your account. |
| format |
[Optional] Output file format. By default, files are delivered in compressed .GZ format. To receive uncompressed plain-text files, add the &format=plain parameter to your request. ⚠️ Warning: Uncompressed files can be extremely large (for example, the .COM zone may be several gigabytes). Only use this option when absolutely necessary. |
Response Fields (CSV format):
| Domain - The domain name |
| Majestic rank - Majestic Top 1 Million ranking (integer, if available) |
| DNS 1 - Primary DNS nameserver |
| DNS 2 - Secondary DNS nameserver |
| Hostname - Web server hostname |
| Emails - Email addresses found on the website (comma-separated in a single field) |
| Phones - Phone numbers found on the website (comma-separated in a single field) |
| Server IP - Web server IP address |
| Domain country - Two-letter ISO country code determined by server IP geolocation |
HTTP Response Codes
The API returns the following HTTP status codes:
| Code | Description |
|---|---|
| 200 | Success - Request completed successfully |
| 401 | 401 Unauthorized: API token is missing. See documentation for details. |
| 405 | 405 Method Not Allowed: Zone TLD parameter is missing. See documentation. |
| 405 | 405 Method Not Allowed: Invalid or unsupported zone TLD. See documentation. |
| 405 | 405 Method Not Allowed: Dataset type parameter is missing. See documentation. |
| 405 | 405 Method Not Allowed: Invalid dataset type. Valid values are "list" or "dataset". See documentation. |
| 405 | 405 Method Not Allowed: Filter type parameter is missing. See documentation. |
| 405 | 405 Method Not Allowed: Invalid filter type. Valid values are "active" or "new". See documentation. |
| 403 | 403 Forbidden: No active subscription plan found. Visit Dashboard to subscribe. |
| 403 | 403 Forbidden: Your current subscription plan does not include access to detailed datasets. Upgrade your plan in the Dashboard. |
Endpoint:
https://api.zonestats.io/api2/?method=dns
Returns a CSV-formatted list of all DNS providers we track, including the following information:
Request Parameters: None required
Response Fields (CSV format):
alias - DNS provider identifier (use this value in the download-dns method)
|
| title - Official DNS provider name |
| total - Total number of domains using this DNS provider |
* Test this endpoint by clicking here to download the complete DNS provider list.
Endpoint:
https://api.zonestats.io/api2/?method=download-dns
Request Parameters:
| dns_alias |
[Required] The DNS provider identifier.
Use the |
| dataset_type |
[Required] Choose the data format. list - Simple text file with one domain per line (no additional data) dataset - Comprehensive dataset with additional metadata (nameservers, IP addresses, emails, phone numbers, etc.) Learn more → |
| token |
[Required] Your API authentication token. Your unique API token is available in the Dashboard section of your account. |
| format |
[Optional] Output file format. Files are delivered in compressed .GZ format by default. To receive uncompressed plain-text files, add the &format=plain parameter. ⚠️ Warning: Uncompressed files can be very large (for example, Cloudflare domain datasets may be several gigabytes). Use this option only when necessary. |
Response Fields (CSV format):
| Domain - The domain name |
| Majestic rank - Majestic Top 1 Million ranking (integer, if available) |
| DNS 1 - Primary DNS nameserver |
| DNS 2 - Secondary DNS nameserver |
| Hostname - Web server hostname |
| Emails - Email addresses found on the website (comma-separated in a single field) |
| Phones - Phone numbers found on the website (comma-separated in a single field) |
| Server IP - Web server IP address |
| Domain country - Two-letter ISO country code determined by server IP geolocation |
HTTP Response Codes
The API returns the following HTTP status codes:
| Code | Description |
|---|---|
| 200 | Success - Request completed successfully |
| 401 | 401 Unauthorized: API token is missing. See documentation for details. |
| 405 | 405 Method Not Allowed: DNS alias parameter is missing. See documentation. |
| 405 | 405 Method Not Allowed: Invalid or unsupported DNS alias. See documentation. |
| 405 | 405 Method Not Allowed: Dataset type parameter is missing. See documentation. |
| 405 | 405 Method Not Allowed: Invalid dataset type. Valid values are "list" or "dataset". See documentation. |
| 403 | 403 Forbidden: No active subscription plan found. Visit Dashboard to subscribe. |
| 403 | 403 Forbidden: Your current subscription plan does not include access to DNS provider datasets. Upgrade your plan in the Dashboard. |
Endpoint:
https://api.zonestats.io/api2/?method=registrars
Returns a CSV-formatted list of all known domain registrars with the following information:
Request Parameters: None required
Response Fields (CSV format):
id - Registrar identifier (use this value in the download-whois method)
|
| name - Official legal entity name (e.g., 'Tucows Domains Inc.') |
| brand - Common brand name (e.g., 'GoDaddy', 'Namecheap') |
| total - Total number of domains registered through this registrar |
* Test this endpoint by clicking here to download the complete registrar list.
Endpoint:
https://api.zonestats.io/api2/?method=download-whois
Request Parameters:
| registrar_id |
[Required] The registrar identifier.
Use the |
| dataset_type |
[Required] Choose the data format. list - Simple text file with one domain per line (no additional data) dataset - Comprehensive dataset with additional metadata (registration date, expiration date, server IP, country code, emails, phone numbers, etc.) Learn more → |
| token |
[Required] Your API authentication token. Your unique API token is available in the Dashboard section of your account. |
| format |
[Optional] Output file format. Files are delivered in compressed .GZ format by default. To receive uncompressed plain-text files, add the &format=plain parameter. ⚠️ Warning: Uncompressed files can be very large (for example, GoDaddy domain datasets may be several gigabytes). Use this option only when necessary. |
Response Fields (CSV format):
| Registrar - Registrar company name |
| Domain - The domain name |
| Registration date - Date when the domain was registered |
| Expiration date - Date when the domain registration expires |
| Majestic rank - Majestic Top 1 Million ranking (integer, if available) |
| Emails - Email addresses found on the website (comma-separated in a single field) |
| Phones - Phone numbers found on the website (comma-separated in a single field) |
| Server IP - Web server IP address |
| Domain country - Two-letter ISO country code determined by server IP geolocation |
HTTP Response Codes
The API returns the following HTTP status codes:
| Code | Description |
|---|---|
| 200 | Success - Request completed successfully |
| 401 | 401 Unauthorized: API token is missing. See documentation for details. |
| 405 | 405 Method Not Allowed: Registrar ID parameter is missing. See documentation. |
| 405 | 405 Method Not Allowed: Invalid or unsupported registrar ID. See documentation. |
| 405 | 405 Method Not Allowed: Dataset type parameter is missing. See documentation. |
| 405 | 405 Method Not Allowed: Invalid dataset type. Valid values are "list" or "dataset". See documentation. |
| 403 | 403 Forbidden: No active subscription plan found. Visit Dashboard to subscribe. |
| 403 | 403 Forbidden: Your current subscription plan does not include access to WHOIS datasets. Upgrade your plan in the Dashboard. |
Endpoint:
https://api.zonestats.io/api2/?method=lookup-domain
Returns comprehensive information about a single domain in CSV format:
Request Parameters:
| domain |
[Required] The domain name to query (e.g., example.com) |
| token |
[Required] Your API authentication token. Your unique API token is available in the Dashboard section of your account. |
Response Fields (CSV format):
| URL - The requested domain name |
| DNS1 - Primary DNS nameserver |
| DNS2 - Secondary DNS nameserver |
| HOSTNAME - Web server hostname |
| IP - Web server IP address |
| COUNTRY_CODE - Two-letter ISO country code (determined by server IP geolocation) |
| REGISTERED_AT - Domain registration date (format: YYYY-MM-DD) |
| EXPIRING_AT - Domain expiration date (format: YYYY-MM-DD) |
REGISTRAR_ID - Domain registrar identifier (integer, see the registrars method for mapping)
|
HTTP Response Codes
The Domain Lookup API returns the following HTTP status codes:
| Code | Description |
|---|---|
| 200 | Success - Request completed successfully |
| 401 | 401 Unauthorized: API token is missing. See documentation for details. |
| 405 | 405 Method Not Allowed: Invalid domain zone or TLD. See documentation. |
| 405 | 405 Method Not Allowed: Domain name exceeds maximum length. See documentation. |
Endpoint:
https://api.zonestats.io/api2/?method=lookup-ip
Returns a CSV-formatted list of domains and hostnames associated with the specified IP address (one result per line):
Request Parameters:
| ip |
[Required] The IP address to query (e.g., 172.67.69.160) |
| token |
[Required] Your API authentication token. Your unique API token is available in the Dashboard section of your account. |
Response Fields (CSV format):
| DOMAIN - Domain name associated with the specified IP address |
| HOSTNAME - Hostname associated with the specified IP address |
| DNS1 - Primary DNS nameserver for the domain |
| DNS2 - Secondary DNS nameserver for the domain |
HTTP Response Codes
The IP Lookup API returns the following HTTP status codes:
| Code | Description |
|---|---|
| 200 | Success - Request completed successfully |
| 401 | 401 Unauthorized: API token is missing. See documentation for details. |
| 405 | 405 Method Not Allowed: IP address exceeds maximum length. See documentation. |
Endpoint:
https://api.zonestats.io/api2/?method=compromised
Returns lists of compromised IP addresses or domain names based on your selection:
Request Parameters:
| dataset_type |
[Required] Select the type of security data you need. ip - Currently compromised IP addresses (active within the last 24 hours) url - Currently compromised domain names (active within the last 24 hours)
ip-all
- Historical list of all IP addresses that have ever been flagged as compromised.
url-all
- Historical list of all domain names that have ever been flagged as compromised. |
Response Format:
| IP or Domain - One entry per line (plain text format) |