/srs/domain_tlds_available
GET https://api.sitehost.nz/1.2/srs/domain_tlds_available.json
Checks if a domain is available and allows checking other TLDs for availability.
Query Parameters
Parameter | Type | Required | Description |
client_id | integer | Yes | The ID for the client.Example: 1 |
domain | string | Yes | The domain name to be checked.Example: example.com |
additional_tlds[0] | string | The additional TLDs. This parameter accepts one or more values in the format of additional_tlds[0]=x, additional_tlds[1]=y.Example: nz | |
suggest | integer | The suggest option. 1 for yes and 0 for noExample: 1 |
Code Samples
JavaScript PHP Rails Pythonvar xmlHttp = new XMLHttpRequest();
xmlHttp.open("GET", "https://api.sitehost.nz/1.2/srs/domain_tlds_available.json?apikey=your_key_here&client_id=1&domain=example.com&additional_tlds[0]=nz&suggest=1", false);
xmlHttp.send();
var response = xmlHttp.responseText;
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://api.sitehost.nz/1.2/srs/domain_tlds_available.json?apikey=your_key_here&client_id=1&domain=example.com&additional_tlds[0]=nz&suggest=1");
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.2/srs/domain_tlds_available.json?apikey=your_key_here&client_id=1&domain=example.com&additional_tlds[0]=nz&suggest=1")
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.2/srs/domain_tlds_available.json?apikey=your_key_here&client_id=1&domain=example.com&additional_tlds[0]=nz&suggest=1'
response = requests.get(uri)
Response
200:application/json
{
"return": {
"domain": "example.com",
"available": false,
"reason": "Active",
"other": [
{
"domain": "lyndon.nz",
"available": true
}
]
},
"msg": "Successful",
"status": true
}
"return": {
"domain": "example.com",
"available": false,
"reason": "Active",
"other": [
{
"domain": "lyndon.nz",
"available": true
}
]
},
"msg": "Successful",
"status": true
}