/srs/whois


GET https://api.sitehost.nz/1.0/srs/whois.json

Performs a whois lookup on a domain.

Query Parameters

ParameterTypeRequiredDescription
domainstringYesThe domain name.Example: example.org.nz
ip_addrstringThe IP address.Example: 192.168.1.8

Code Samples

JavaScript PHP Rails Python
var xmlHttp = new XMLHttpRequest();
xmlHttp.open("GET", "https://api.sitehost.nz/1.0/srs/whois.json?apikey=your_key_here&domain=example.org.nz&ip_addr=192.168.1.8", false);

xmlHttp.send();

var response = xmlHttp.responseText;
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://api.sitehost.nz/1.0/srs/whois.json?apikey=your_key_here&domain=example.org.nz&ip_addr=192.168.1.8");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$response = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
require 'net/http'
require 'uri'

uri = URI.parse("https://api.sitehost.nz/1.0/srs/whois.json?apikey=your_key_here&domain=example.org.nz&ip_addr=192.168.1.8")
http = Net::HTTP.new(uri.host, uri.port)
request = Net::HTTP::Get.new(uri.request_uri)

response = http.request(request)
import requests

uri = 'https://api.sitehost.nz/1.0/srs/whois.json?apikey=your_key_here&domain=example.org.nz&ip_addr=192.168.1.8'

response = requests.get(uri)

Response

200:

application/json
{
  "return": {
    "Status": "Active",
    "DomainName": "example.org.nz",
    "Delegate": "1",
    "RegisteredDate": "2016-04-18 11:56:01",
    "ModifiedDate": "2016-04-20 12:37:48",
    "BilledUntil": "2017-10-18 11:56:01",
    "NameServers": [
      {
        "FQDN": "ns1.sitehost.co.nz"
      },
      {
        "FQDN": "ns2.sitehost.co.nz"
      }
    ],
    "RegistrarPublicContact": {
      "Email": "domains@sitename.co.nz",
      "Name": "SiteName",
      "PostalAddress": {
        "Address1": "P O Box 11859",
        "City": "Auckland",
        "PostalCode": "1542",
        "CountryCode": "NZ",
        "Address2": "Ellerslie"
      },
      "Phone": {
        "LocalNumber": "25501787",
        "CountryCode": "64",
        "AreaCode": "28"
      },
      "Fax": {
        "LocalNumber": "25501788",
        "CountryCode": "64",
        "AreaCode": "28"
      }
    },
    "RegistrantContact": {
      "Email": "example@example.org.nz",
      "Name": "Tommy",
      "PostalAddress": {
        "Address1": "1 Example Rd",
        "Province": "Ellerslie",
        "City": "Auckland",
        "PostalCode": "0612",
        "CountryCode": "NZ",
        "Address2": "Ellerslie"
      },
      "Phone": {
        "LocalNumber": "123456",
        "CountryCode": "64",
        "AreaCode": "9"
      }
    },
    "AdminContact": {
      "Email": "example@example.org.nz",
      "Name": "Tommy",
      "PostalAddress": {
        "Address1": "1 Example Rd",
        "Province": "Ellerslie",
        "City": "Auckland",
        "PostalCode": "0612",
        "CountryCode": "NZ",
        "Address2": "Ellerslie"
      },
      "Phone": {
        "LocalNumber": "123456",
        "CountryCode": "64",
        "AreaCode": "9"
      }
    },
    "TechnicalContact": {
      "Email": "example@example.org.nz",
      "Name": "Tommy",
      "PostalAddress": {
        "Address1": "1 Example Rd",
        "Province": "Ellerslie",
        "City": "Auckland",
        "PostalCode": "0612",
        "CountryCode": "NZ",
        "Address2": "Ellerslie"
      },
      "Phone": {
        "LocalNumber": "123456",
        "CountryCode": "64",
        "AreaCode": "9"
      }
    }
  },
  "SourceIP": "192.168.1.8",
  "msg": "Successful.",
  "status": true,
  "time": 771.84
}