Domain API v2

🔨 Download domain lists and datasets directly to your server 🔨

Have general questions about our domain datasets? Read our FAQ.

Looking for our legacy API v1? Click here.

Code examples in Python, Node.js, Go, PHP and cURL, plus an OpenAPI specification, are on GitHub: github.com/coderockers/netapi.

Base endpoint: https://netapi.com/api2/
API response format: comma-separated CSV (check sample)



List of existing domain zones: Get the list of supported domain zones in .CSV format

GET Request Endpoint:

https://netapi.com/api2/?method=zones

This returns a list of currently supported domain zones in .CSV format with the following fields:

Input GET parameters: ---


Output data (comma-separated .csv):

zoneTLD - zone TLD (extension), used in the download method below
isUpdatedDaily - 1 if the zone is updated daily, 0 if not
isCountryCode - 1 if the zone is a country-code (ccTLD) zone, 0 if not

* You can also download a list of all supported zones in .CSV format by clicking HERE.

Domain lists and datasets: Download the full list or dataset of any domain zone, or only its new domains

GET Request Endpoint:

https://netapi.com/api2/?method=download

Input GET parameters:

zone_tld

[Required] TLD (extension) of the required zone.

To get a common dataset of all domains (all zones at once), use the all-zones parameter. For IDN-domains, use the original IDN (punycode). Example:

all-zones - all domains, all zones combined

com - .com zone

xn--3ds443g - IDN zone ( 在线 )

⚡ You can get the list of all supported TLDs by using the /api2/?method=zones endpoint (see above).

dataset_type

[Required] Dataset type.

list - contains only a list of domains, one domain per line.

dataset - contains additional data (domain, DNS servers, IP, emails, phone numbers, etc.) Read more →

filter_type

[Required] Filter.

active - full list of domains of the required zone

new - domains found for the last 24 hours in this zone (recently delegated)

The new filter is available only for daily-updated zones (isUpdatedDaily=1 in the zones method). For zones refreshed monthly, only the active filter is available. Read more →

token

[Required] API access token.

This is your unique API token that can be found in the Dashboard.

format

[Optional] The format of the response file.

By default, you will receive the dataset in the compressed .GZ format. If you require plain-text format, you can add the &format=plain parameter to your request.

⚡ Warning: Plain-text files tend to be very large (for example, the .COM zone file size can be up to several gigabytes). Use this parameter only if necessary.

Output data (comma-separated .csv):

Domain - domain name
Majestic rank - Majestic rank, integer (empty if not ranked)
DNS 1 - DNS server 1
DNS 2 - DNS server 2
Hostname - remote server hostname
Emails - emails collected from the website (one field, comma-separated)
Phones - phone numbers collected from the website (one field, comma-separated)
Server IP - remote server IP
Domain country - the two-letter country code of the website domain, determined by server IP (geolocation)

Response and Error Codes

Our List/Dataset Download API returns one of the following HTTP response codes:

Code Description
200 OK
401 401 Unauthorized: Missing user token.
405 405 Method Not Allowed: Missing zone type.
405 405 Method Not Allowed: Invalid zone tld.
405 405 Method Not Allowed: Missing dataset type.
405 405 Method Not Allowed: Invalid dataset type.
405 405 Method Not Allowed: Missing filter type.
405 405 Method Not Allowed: Invalid filter type.
403 403 Forbidden: No active/paid plan.
403 403 Forbidden: Your current plan does not allow downloading of detailed datasets.

Get the list of supported DNS providers

GET Request Endpoint:

https://netapi.com/api2/?method=dns

This returns a list of currently supported DNS providers with the following fields:

Input GET parameters: ---


Output data (comma-separated .csv):

alias - DNS provider alias (used in download-dns method)
title - DNS provider name
total - known domains for this provider

* You can also download the list of all supported DNS providers by clicking HERE.

DNS domain lists and datasets: Download lists of domains using a particular DNS provider

GET Request Endpoint:

https://netapi.com/api2/?method=download-dns

Input GET parameters:

dns_alias

[Required] Alias of the required DNS provider.

Use the dns method listed above to get the full list of aliases for all currently supported DNS providers (or download them here).

dataset_type

[Required] Dataset type.

list - contains only a list of domains, one domain per line

dataset - contains additional data (domain, DNS servers, IP, emails, phone numbers, etc.) Read more →

token

[Required] API access token.

This is your unique API token that can be found in the Dashboard.

format

[Optional] The format of the response file.

By default, you will receive the dataset in the compressed .GZ format. If you require plain-text format, you can add the &format=plain parameter to your request.

⚡ Warning: Plain-text files tend to be very large (for example, the Cloudflare domain dataset can be up to several gigabytes). Use this parameter only if necessary.

Output data (comma-separated .csv):

Domain - domain name
Majestic rank - Majestic rank, integer (empty if not ranked)
DNS 1 - DNS server 1
DNS 2 - DNS server 2
Hostname - remote server hostname
Emails - emails collected from the website (one field, comma-separated)
Phones - phone numbers collected from the website (one field, comma-separated)
Server IP - remote server IP
Domain country - the two-letter country code of the website domain, determined by the server IP (geolocation)

Response and Error Codes

Our List/Dataset Download API returns one of the following HTTP response codes:

Code Description
200 OK
401 401 Unauthorized: Missing user token.
405 405 Method Not Allowed: Missing DNS alias.
405 405 Method Not Allowed: Invalid DNS alias.
405 405 Method Not Allowed: Missing dataset type.
405 405 Method Not Allowed: Invalid dataset type.
403 403 Forbidden: No active/paid plan.
403 403 Forbidden: Your current plan does not allow downloading of detailed datasets.

Known Domain Registrars: Get the list of supported registrars

GET Request Endpoint:

https://netapi.com/api2/?method=registrars

This returns a list of currently known domain registrars with the following fields:

Input GET parameters: ---


Output data (comma-separated .csv):

id - Registrar ID (used in the download-whois method)
name - official name (legal entity, e.g. 'Tucows Domains Inc.')
brand_name - known brand name (e.g. 'GoDaddy', 'Namecheap')
total - known domains for this registrar

* You can also download a list of all known registrars by clicking HERE.

WHOIS lists and datasets: Download lists and datasets of domains registered with a particular registrar

GET Request Endpoint:

https://netapi.com/api2/?method=download-whois

Input GET parameters:

registrar_id

[Required] ID of the required registrar.

Use the registrars method listed above to get the IDs of all known registrars (or download them here).

dataset_type

[Required] Dataset type.

list - contains only a list of domains, one domain per line

dataset - contains additional data (domain, registration date, expiration date, server IP, country code, emails, phone numbers, etc.) Read more →

token

[Required] API access token.

This is your unique API token that can be found in the Dashboard.

format

[Optional] The format of the response file.

By default, you will receive the dataset in the compressed .GZ format. If you require plain-text format, you can add the &format=plain parameter to your request.

⚡ Warning: Plain-text files tend to be very large (for example, the GoDaddy domain dataset can be up to several gigabytes). Use this parameter only if necessary.

Output data (comma-separated .csv):

Registrar - registrar name
Domain - domain name
Registration date - domain registration date
Expiration date - domain expiration date
Majestic rank - Majestic rank, integer (empty if not ranked)
Emails - emails collected from the website (one field, comma-separated)
Phones - phone numbers collected from the website (one field, comma-separated)
Server IP - remote server IP
Domain country - two-letter country code of the website domain, determined by the server IP (geolocation)

Response and Error Codes

Our List/Dataset Download API returns one of the following HTTP response codes:

Code Description
200 OK
401 401 Unauthorized: Missing user token.
405 405 Method Not Allowed: Missing Registrar ID.
405 405 Method Not Allowed: Invalid Registrar ID.
405 405 Method Not Allowed: Missing dataset type.
405 405 Method Not Allowed: Invalid dataset type.
403 403 Forbidden: No active/paid plan.
403 403 Forbidden: Your current plan does not allow downloading of detailed datasets.

Domain Lookup API: Get information about a specific domain

GET Request Endpoint:

https://netapi.com/api2/?method=lookup-domain

Returns data for the specified domain in .CSV format:

Input GET parameters:

domain

[Required] Domain name (for example, domain.com)

token

[Required] API access token.

This is your unique API token that can be found in the Dashboard. An active paid plan (any plan) is required.

Output data (comma-separated .csv):

URL - requested domain
DNS1 - DNS server 1
DNS2 - DNS server 2
HOSTNAME - server hostname
IP - server IP
COUNTRY_CODE - two-letter country code (according to the server IP)
REGISTERED_AT - domain registration date (YYYY-MM-DD)
EXPIRING_AT - domain expiration date (YYYY-MM-DD)
REGISTRAR_ID - registrar ID (integer, see the registrars method)

Response and Error Codes

Our Domain Lookup API returns one of the following HTTP response codes:

Code Description
200 OK
401 401 Unauthorized: Missing user token.
403 403 Forbidden: No active/paid plan.
405 405 Method Not Allowed: Invalid domain zone.
405 405 Method Not Allowed: Domain name is too long.

IP Lookup API: Get information about a specific IP

GET Request Format:

https://netapi.com/api2/?method=lookup-ip

Returns domains hosted on the specified IP in .CSV format (one domain per line, up to 3 results):

Input GET parameters:

ip

[Required] IP (for example, 172.67.69.160)

token

[Required] API access token.

Your unique API token that can be found in the Dashboard. An active paid plan (any plan) is required.

Output data (comma-separated .csv):

DOMAIN - domain hosted on the given IP
HOSTNAME - server hostname of that domain
DNS1 - DNS server 1 of that domain
DNS2 - DNS server 2 of that domain

Response and Error Codes

Our IP Lookup API returns one of the following HTTP response codes:

Code Description
200 OK
401 401 Unauthorized: Missing user token.
403 403 Forbidden: No active/paid plan.
405 405 Method Not Allowed: IP address is too long.

🆓 Compromised IPs and domains: Download all compromised IPs or domain names

GET Request Format:

https://netapi.com/api2/?method=compromised

This returns a list of compromised IPs or domain names:

Input GET parameters:

dataset_type

[Required] Dataset type.

ip - current compromised IP addresses (seen in the last 24 hours)

url - current compromised domain names (seen in the last 24 hours)

ip-all - historical list of IPs ever compromised.
⚠️ The presence of an IP in this list does not mean that the IP is compromised at the moment (most likely it is not).

url-all - historical list of domain names ever compromised.
⚠️ The presence of a domain in this list does not mean that the domain is compromised at the moment (most likely it is not).

Output data:

IP or Domain - one per line

🆓 Compromised domain list: Download compromised domains for a selected TLD

GET Request Format (single zone, live domains only):

https://netapi.com/api2/?method=compromised-zone

Returns a list of currently compromised domains for one domain zone (TLD) only.
Only entries seen in the last 24 hours are included. IP addresses are not included in this export.

Input GET parameters:

zone_tld

[Required] TLD (extension) of the required zone.

Example:

com — .com zone

net — .net zone

⚡ You can get the list of all supported TLDs by using the /api2/?method=zones endpoint (see above).

Output data:

Domain — one per line (CSV download, filename e.g. compromised_com.csv)

🆓 Top 1M list: Download the NetAPI Top 1 Million most popular domains

Free daily CSV ranking of the one million most popular domains on the Internet (Alexa Top 1 Million-style replacement). No API token or registration required. Details and methodology: /top-1-mln-websites/.

GET Request Format:

https://netapi.com/netapi_top1mln.csv

Input GET parameters:

None required.

Output data (comma-separated .csv):

NetAPI_Rank - integer rank from 1 to 1,000,000 (1 = most popular)
Domain - domain name without subdomain (e.g. google.com)

Rows are ordered by ascending rank (most popular first). The first line is the header: NetAPI_Rank,Domain. The file is regenerated daily.

Example:

NetAPI_Rank,Domain
1,google.com
2,facebook.com
3,youtube.com

Server UTC time: 03:20:48pm

Service Status    Comparisons    Domain API    Top 1M list    Research    Terms of Service    Privacy Policy    Contact Us   

Made with favorite in Cyprus