Get a domain's registrar and key dates
curl --request POST \
--url https://api.stophy.dev/v1/domain/whois \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"domain": "stripe.com"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({domain: 'stripe.com'})
};
fetch('https://api.stophy.dev/v1/domain/whois', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.stophy.dev/v1/domain/whois"
payload = { "domain": "stripe.com" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"success": true,
"data": {
"status": [
"<string>"
],
"nameservers": [
"<string>"
],
"rdap": "<string>",
"domain": "<string>",
"registryId": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"expiresAt": "2023-11-07T05:31:56Z",
"registrar": {
"name": "<string>",
"ianaId": "<string>",
"url": "<string>",
"abuseEmail": "<string>",
"abusePhone": "<string>"
},
"registrant": {
"name": "<string>",
"organization": "<string>",
"email": "<string>",
"phone": "<string>",
"country": "<string>"
},
"hasDnssec": true
},
"creditsUsed": 123,
"requestId": "<string>"
}{
"success": false,
"error": {
"code": "cliSessionCompleted",
"message": "<string>",
"retryable": true,
"requestId": "<string>",
"retryAfterSeconds": 123
}
}{
"success": false,
"error": {
"code": "cliSessionCompleted",
"message": "<string>",
"retryable": true,
"requestId": "<string>",
"retryAfterSeconds": 123
}
}Domain
Domain WHOIS API
Call the Domain WHOIS API to get domain, registry id, status, created at, updated at and expires at, as JSON or markdown. 1 credit.
POST
/
v1
/
domain
/
whois
Get a domain's registrar and key dates
curl --request POST \
--url https://api.stophy.dev/v1/domain/whois \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"domain": "stripe.com"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({domain: 'stripe.com'})
};
fetch('https://api.stophy.dev/v1/domain/whois', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.stophy.dev/v1/domain/whois"
payload = { "domain": "stripe.com" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"success": true,
"data": {
"status": [
"<string>"
],
"nameservers": [
"<string>"
],
"rdap": "<string>",
"domain": "<string>",
"registryId": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"expiresAt": "2023-11-07T05:31:56Z",
"registrar": {
"name": "<string>",
"ianaId": "<string>",
"url": "<string>",
"abuseEmail": "<string>",
"abusePhone": "<string>"
},
"registrant": {
"name": "<string>",
"organization": "<string>",
"email": "<string>",
"phone": "<string>",
"country": "<string>"
},
"hasDnssec": true
},
"creditsUsed": 123,
"requestId": "<string>"
}{
"success": false,
"error": {
"code": "cliSessionCompleted",
"message": "<string>",
"retryable": true,
"requestId": "<string>",
"retryAfterSeconds": 123
}
}{
"success": false,
"error": {
"code": "cliSessionCompleted",
"message": "<string>",
"retryable": true,
"requestId": "<string>",
"retryAfterSeconds": 123
}
}- Endpoint:
domain.whois - Returns:
datahasdomain,registryId,status,createdAt,updatedAt,expiresAt,registrar,registrant,nameservers,hasDnssec,rdap. - Cost: 1 credit. Failed calls cost nothing.
- Paging: No.
Example
import { Stophy } from "stophy";
const stophy = new Stophy({ apiKey: process.env.STOPHY_API_KEY });
const result = await stophy.domain.whois({ domain: "stripe.com" });
console.log(result.data.domain);
from stophy import Stophy
stophy = Stophy() # reads STOPHY_API_KEY
result = stophy.domain.whois(domain="stripe.com")
print(result["data"]["domain"])
curl -X POST https://api.stophy.dev/v1/domain/whois \
-H "Authorization: Bearer $STOPHY_API_KEY" \
-H "content-type: application/json" \
-d '{"domain":"stripe.com"}'
stophy domain whois stripe.com
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json