The API method host_info. Information about the site by domain.
The host_info() API method returns information about the site for the transferred domain. You can set a list of domains to get information for each domain in one API call.
The call requires a parameter GET:
- method_name — must be 'host_info'
- host — site domain
Additional parameters POST:
- data — comma-separated list of domains (,).
Example
https://api.cleantalk.org/?method_name=host_info&host=cleantalk.org
The API returns a JSON string, for example:
{
"data": {
"cleantalk.org": {
"whois": "Domain Name: cleantalk.org\nRegistry Domain ID: 76eba9fb99924fdab83b9c1fd4d5a7ac-LROR\n ...",
"host": "cleantalk.org has address 49.13.78.26\ncleantalk.org has IPv6 address 2a01:4f8:c012:daf9::1\n ..."
}
}
}
Explanation of the answer:
- data — an array with verified records,
- record — an array with details of each record,
- whois — information about the site obtained by the whois utility
- host — information about the site obtained by the host utility
- record — an array with details of each record,
Possible errors:
- Data not found. This error is possible if the "host" GET parameter is not passed, the "data" POST parameter is not passed, or the incorrect domain is specified in the passed parameters.
{"error_message":"Data not found","error_no":8,"data":{"operation_status":"FAILED","operation_message":"Data not found"}}
- Received 11 records to check, maximum 10 records check per call. This error is possible if the possible number of domains in a single request is exceeded. The limit is 10 domains per request.
{"error_message":"Received 11 records to check, maximum 10 records check per call.","error_no":8,"data":{"operation_status":"FAILED","operation_message":"Received 1001 records to check, maximum 1000 records check per call."}}
- Calls limit exceeded. This error is possible if the number of method calls is exceeded. Limit: 10 requests per minute. The recommended timeout is no more than 180 seconds.
{"error_message":"Calls limit exceeded, method name host_info().","error_no":10}