Domain Info
Overview
curl -X GET https://domaininfo.shreshtait.com/api/search/google.com
The above command returns JSON structured like this:
{
"domain_name":"google.com",
"creation_date":"1997-09-15",
"registrar":"MarkMonitor, Inc."
}
{
"message": "welcome to domain info"
}
{
"domain_name": "example.com",
"creation_date": "2024-01-01",
"registrar": "Example Registrar, Inc."
}
{
"error": "Invalid domain name or IP address"
}
{
"error": "Domain information not found"
}
This API allows you to fetch and cache domain information using RDAP and WHOIS protocols. The API caches results in a PostgreSQL database to improve performance for subsequent requests.
Base URL
https://domaininfo.shreshtait.com
1. Hello Endpoint
Request
- Method: GET
- URL:
/
Response
- Status Code: 200
- Body:
2. Domain Search Endpoint
Request
- Method: GET
- URL:
/api/search/<domain_name>
- Replace
<domain_name>
with the domain or IP address you want to search for.
- Replace
Response
-
Status Code: 200
- Body: (If domain information is found)
-
Status Code: 400
- Body: (If the domain name or IP address is invalid)
-
Status Code: 404
- Body: (If domain information is not found)
How It Works
- The API first checks if the requested domain information is cached in the database.
- If cached information is found, it returns the cached data.
- If not, the API fetches the information using RDAP and WHOIS protocols.
- The fetched data is cached in the database for future requests.
Example Request
GET https://domaininfo.shreshtait.com/api/search/example.com
Example Response
{
"domain_name": "example.com",
"creation_date": "2023-01-01",
"registrar": "Example Registrar, Inc."
}