How to Use
The API endpoint is /whois. The only required parameter is domain_name, which specifies the domain name you want to retrieve information for.
The response is returned as a JSON object with the following keys:
status: The availability status of the domain. If the domain is available for registration, the status will be “Available for registration”.
name: The name of the domain.
creation_date: The date when the domain was first registered.
updated_date: The date when the domain was last updated.
expiration_date: The date when the domain registration will expire.
registrar: The name of the domain registrar.
registrant: The name of the domain registrant.
email: The email address of the domain registrant.
address: The mailing address of the domain registrant.
city: The city where the domain registrant is located.
state: The state where the domain registrant is located.
zipcode: The ZIP code where the domain registrant is located.
country: The country where the domain registrant is located.
Example Request
GET /whois?domain_name=example.com
Example Response
{
“name”: “example.com”,
“creation_date”: “1995-08-14T00:00:00”,
“updated_date”: “2021-02-02T10:09:05”,
“expiration_date”: “2022-08-13T04:00:00”,
“registrar”: “MarkMonitor Inc.”,
“registrant”: “Domain Administrator”,
“email”: "admin@example.com",
“address”: “123 Main St.”,
“city”: “Anytown”,
“state”: “CA”,
“zipcode”: “90210”,
“country”: “US”
}
Error Handling
If an invalid domain name is provided, the API will return a 400 Bad Request response with an error message:
{
“error”: “Invalid domain name”
}
If the domain is not found, the API will return a 404 Not Found response with a message indicating that the domain is available for registration:
{
“status”: “Available for registration”
}
Rate Limiting
To prevent abuse, the API limits requests to 1000 requests per day per IP address.
License
This API is licensed under the MIT License.