API for the Domains Dataset available at search.dnslytics.com. This API call returns registered and previously registered domain names based on a search query. This is a Premium API call, you have to buy API credits.
API request
https://api.dnslytics.net/v2/dataset/domains?q=<query>&apikey=<apikey>
Parameters:
query
Urlencoded search query. The query language is the same as that used in the web interface. You can use up to four fields. For example the query “name:*dns* AND name:*lytics* AND (tld:nl OR tld:co)” contains four fields, which is the maximum.
apikey
Your API key
Optional parameters:
page
A single API call returns a maximum of 1,000 domains. With the page parameter you can step through the results and get results up to 100,000 domains. Page value can be between 1 and 100.
API response
A JSON object with the following fields:
status
Status of API call: succeed or error.
question
Array of the question data with the following fields: query and page.
typeinfo
Data type returned, always ‘dataset/domains’.
ndomains
Total number of domains found.
domains
Domain names found with the following fields (domain and active). Maximum of 1,000 domains are returned. Use the page parameter to get up to 100,000 domain names.
URL
$ curl https://api.dnslytics.net/v2/dataset/domains?q=name:*dns*%20and%20name:*lytics*&apikey=<apikey>
Output
{
"status": "succeed",
"data": {
"question": {
"query": "name:*dns* AND name:*lytics*",
"page": 1
},
"typeinfo": "dataset/domains",
"ndomains": 60,
"domains": [
{
"domain": "dnslytics.co",
"active": false
},
{
"domain": "dnslytics.com",
"active": true
},
{"..."}
]
}