Discord

WHOIS API Documentation

Complete documentation for using IHOS.eu WHOIS API service

Overview
v1.0
IHOS.eu WHOIS API provides information about domains and IP addresses

The WHOIS API allows you to programmatically retrieve information about domains and IP addresses. The API provides data on domain registration, availability, registrars, DNS servers, and other information. For IP addresses, it provides geolocation data, provider information, and other technical details.

Endpoints
Available API endpoints
GET
/api/whois

Main endpoint for retrieving WHOIS information about a domain or IP address.

Parameters
Parameter
Type
Required
Description
domain
string
Yes*
Domain name to search for (e.g., example.com)
ip
string
Yes*
IP address to search for (e.g., 8.8.8.8)

* Either the domain or ip parameter is required

Response for Domain Queries
Structure of the response when querying a domain
Successful Response (200 OK)
{
  "type": "domain",
  "domain": "example.com",
  "available": false,
  "protocol": "WHOIS",
  "source": "whois.verisign-grs.com",
  "registrar": "Example Registrar, LLC",
  "created": "1995-08-14T04:00:00Z",
  "updated": "2023-08-14T07:01:44Z",
  "expires": "2024-08-13T04:00:00Z",
  "status": [
    "clientDeleteProhibited",
    "clientTransferProhibited",
    "clientUpdateProhibited"
  ],
  "nameservers": [
    "a.iana-servers.net",
    "b.iana-servers.net"
  ],
  "registrant": {
    "privacy": true,
    "organization": "REDACTED FOR PRIVACY",
    "country": "US"
  },
  "ipAddresses": [
    "93.184.216.34"
  ],
  "serverInfo": {
    "ip": "93.184.216.34",
    "hostname": "example.com",
    "city": "Norwell",
    "region": "Massachusetts",
    "country": "US",
    "loc": "42.1508,-70.8228",
    "org": "AS15133 MCI Communications Services, Inc. d/b/a Verizon Business",
    "postal": "02061",
    "timezone": "America/New_York"
  }
}
Response for Available Domain
{
  "type": "domain",
  "domain": "available-domain-example123.com",
  "available": true
}
Response for Blocked Domain (403 Forbidden)
{
  "error": "WHOIS query blocked",
  "details": "This domain has WHOIS lookup disabled by the domain owner",
  "domain": "ihos.eu",
  "blocked": true
}
Usage Examples
Examples of using the API in various programming languages
// Domain query
async function checkDomain(domain) {
  try {
    const response = await fetch(`https://ihos.eu/api/whois?domain=${encodeURIComponent(domain)}`);
    const data = await response.json();
    
    if (response.ok) {
      console.log('Domain information:', data);
      return data;
    } else {
      console.error('Error:', data.error);
      return null;
    }
  } catch (error) {
    console.error('Query error:', error);
    return null;
  }
}

// IP address query
async function checkIP(ip) {
  try {
    const response = await fetch(`https://ihos.eu/api/whois?ip=${encodeURIComponent(ip)}`);
    const data = await response.json();
    
    if (response.ok) {
      console.log('IP information:', data);
      return data;
    } else {
      console.error('Error:', data.error);
      return null;
    }
  } catch (error) {
    console.error('Query error:', error);
    return null;
  }
}

// Usage
checkDomain('example.com');
checkIP('8.8.8.8');
Error Codes
List of possible error codes and their meaning
Error Responses
HTTP Code
Error Code
Description
400 Bad Request
MISSING_PARAMETER
Missing required parameter (domain or ip)
400 Bad Request
INVALID_FORMAT
Invalid domain or IP address format
403 Forbidden
WHOIS_BLOCKED
WHOIS query is blocked for this domain
429 Too Many Requests
RATE_LIMIT
Request limit exceeded
500 Internal Server Error
SERVER_ERROR
Internal server error
504 Gateway Timeout
TIMEOUT
Timeout for WHOIS query
Support and Contact

Do you have questions or need help integrating the API?

Technical Support

For technical questions and help with API integration, contact us at:

[email protected]

Commercial Inquiries

For information about commercial use and higher limits:

[email protected]
Terms of Use

By using the IHOS.eu WHOIS API, you agree to the following terms:

  • The API is provided "as is" without any warranty.
  • Do not use the API for bulk data downloads or automated scanning.
  • Respect the API limits (60 requests per minute).
  • Do not use the data obtained for spam or other harmful purposes.
  • IHOS.eu reserves the right to limit or block access to the API for violations of these terms.
  • For commercial use, contact us at [email protected].