# API: Bulk Domain Check
# bulkDomainCheck
Check domain availability
# Required parameters
Parameter | Description |
---|---|
sld | Domain SLD |
# Optional parameters
Parameter | Description |
---|---|
category_id | Orderpage ID to limit tlds from |
tlds | Array (list) of tlds to limit search results to |
page | When no tlds argument set, paginate results using limit and page attribute |
limit | Limit number of extensions to search, use when tlds is set. Defaults to 10 |
currency_id | Currency ID to recalculate returned prices to |
# Request
GET /admin/api.php?api_id=API_ID&api_key=API_KEY&call=bulkDomainCheck&sld=SLD
# PHP Samples
$url = 'http://url_to_hb.com/admin/api.php';
$post = [
'call' => 'bulkDomainCheck',
'api_id' => $API_ID,
'api_key' => $API_KEY,
'sld' => $SLD,
];
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_TIMEOUT, 30);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($post));
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
$data = curl_exec($ch);
curl_close($ch);
$return = json_decode($data, true);
print_r($return);
include 'class.hbwrapper.php';
HBWrapper::setAPI('http://url_to_hb.com/admin/api.php','API ID','API Key');
$params = [
'sld' => $SLD,
];
$return = HBWrapper::singleton()->bulkDomainCheck($params);
print_r($return);
/* Use this method to access HostBill api from HostBill modules */
$api = new ApiWrapper();
$params = [
'sld' => $SLD,
];
$return = $api->bulkDomainCheck($params);
print_r($return);
# Response
{
"success": true,
"domains": {
".be": {
"available": true,
"premium": false,
"premiumprices": [],
"name": "test123412341g1tr123r.be",
"sld": "test123412341g1tr123r",
"tld": ".be",
"error": ""
},
".eu": {
"available": true,
"premium": false,
"premiumprices": [],
"name": "test123412341g1tr123r.eu",
"sld": "test123412341g1tr123r",
"tld": ".eu",
"error": ""
},
".eu.com": {
"available": true,
"premium": false,
"premiumprices": [],
"name": "test123412341g1tr123r.eu.com",
"sld": "test123412341g1tr123r",
"tld": ".eu.com",
"error": ""
}
},
"prices": [
[
{
"id": "2550",
"tld": ".be",
"product_id": "2550",
"period": "1",
"register": "8.36",
"transfer": "8.36",
"renew": "8.36",
"redemption": "-0.84",
"before": "-0.84",
"module": "18",
"not_renew": "0",
"epp": "0",
"options": "0",
"ns": "|||",
"nsips": "|||",
"paytype": "DomainRegular",
"category_id": "152",
"periods": {
"1": {
"period": "1",
"register": "8.36",
"transfer": "8.36",
"renew": "8.36",
"redemption": "-0.84",
"before": "-0.84"
}
}
}
],
[
{
"id": "2551",
"tld": ".eu",
"product_id": "2551",
"period": "1",
"register": "8.36",
"transfer": "8.36",
"renew": "8.36",
"redemption": "-0.84",
"before": "-0.84",
"module": "18",
"not_renew": "0",
"epp": "0",
"options": "0",
"ns": "|||",
"nsips": "|||",
"paytype": "DomainRegular",
"category_id": "152",
"periods": {
"1": {
"period": "1",
"register": "8.36",
"transfer": "8.36",
"renew": "8.36",
"redemption": "-0.84",
"before": "-0.84"
}
}
}
],
[
{
"id": "2552",
"tld": ".eu.com",
"product_id": "2552",
"period": "1",
"register": "8.36",
"transfer": "8.36",
"renew": "8.36",
"redemption": "-0.84",
"before": "-0.84",
"module": "18",
"not_renew": "0",
"epp": "0",
"options": "0",
"ns": "|||",
"nsips": "|||",
"paytype": "DomainRegular",
"category_id": "152",
"periods": {
"1": {
"period": "1",
"register": "8.36",
"transfer": "8.36",
"renew": "8.36",
"redemption": "-0.84",
"before": "-0.84"
}
}
}
]
],
"call": "bulkDomainCheck",
"server_time": 1713422206
}