HeartDNS is a DNS service that provides an API for searching domain information.
http://heartdns.com/API/index.php
The method used is POST
.
To access the HeartDNS API, you need to provide two parameters:
ip_address
(required): the IP address to search for informationapikey
(required): the API key to access the HeartDNS service
curl -X POST -d "ip_address=192.168.1.1&apikey=1234567890" http://heartdns.com/API/index.php
The result of the HeartDNS API call will be returned in JSON format with a structure like this:
{
"error": 0,
"domain": [
["example.com"]
]
}
Explanation:
error: error code of the API call. If it has a value of 0, it means no error occurred.
domain: a list of domains associated with the searched IP address. This list is a multidimensional array, where each element of the second array contains the domain name associated with that IP address. The example above shows that there is only one domain associated with the IP address 192.168.1.1, which is example.com.