senapati
Documentation index

Domain Age

The registration dates of a domain from its registry, and the age they imply. Age is one of the cheapest reputation signals there is: phishing and spam domains are days old, established businesses are years old. This endpoint answers that one question without the rest of the WHOIS record.

POST/api/domain-ageCosts 1 creditAPI key

Report a domain's registration dates and age (1 credit)

Where the dates come from

The registry's RDAP server first, falling back to WHOIS over port 43 for registries that have none. The answer describes the registration the name belongs to: a host name such as shop.example.com returns example.com's dates with registered_domain set.

  • Age counts calendar days, months and years on UTC dates since creation_date; months and years tick over on the anniversary.
  • days_until_expiry is negative once the expiry date has passed; the domain is then in its grace or redemption period and may still be renewed.
  • registered: false with lookup_status: not_found means the registry says the domain is available.

Issue codes

codetypeMeans
LOOKUP_FAILEDerrorThe registry did not answer
DOMAIN_VERY_RECENTwarningRegistered within the last 30 days
REGISTRATION_EXPIREDwarningThe expiry date has passed
CREATION_DATE_UNAVAILABLEwarningThe registry does not publish the creation date
DOMAIN_RECENTinfoRegistered within the last 90 days
REGISTRATION_EXPIRES_SOONinfoFewer than 30 days left on the registration
NOT_REGISTEREDinfoThe domain is not registered

Request

JSON body
FieldTypeDescription
domain*stringDomain name to check (e.g. example.com)

Authenticate with API key. Send it as the X-API-Key header.

curl -X POST "https://api.senapati.io/api/domain-age" \
  -H "X-API-Key: $SENAPATI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"domain":"github.com"}'

Response

Every success is wrapped in { "data": … } with a request_id; the fields below describe data. See Errors for the failure shape.

response: 200 OKDomainAgeData
{
"request_id": "req_2d27a848",
"timestamp": "2026-10-28T07:37:48.243802+00:00",
"data": {
"domain": "github.com",
"registered_domain": "github.com",
"registered": true,
"creation_date": "2007-10-09T18:20:50+00:00",
"expiration_date": "2028-10-09T18:20:50+00:00",
"updated_date": "2026-09-07T09:22:52+00:00",
"domain_age_days": 6959,
"domain_age_months": 228,
"domain_age_years": 19,
"days_until_expiry": 712,
"domain_very_recent": false,
"domain_recent": false,
"registrar": "MarkMonitor Inc.",
"source": "rdap",
"lookup_status": "ok",
"lookup_failed": false,
"issues_found": [],
"elapsed_ms": 638
}
}

domain_very_recent (30 days) and domain_recent (90 days) use the same thresholds as the URL report.

data · DomainAgeData
FieldTypeDescription
domain*string
registered_domain*string | nullThe registration the dates belong to, when a host name was asked
registered*boolean | nullFalse when the registry says the domain is not registered
creation_date*string | null
expiration_date*string | null
updated_date*string | null
domain_age_days*integer | null
domain_age_months*integer | null
domain_age_years*integer | null
days_until_expiry*integer | nullNegative once past
domain_very_recent*booleanRegistered within the last 30 days
domain_recent*booleanRegistered within the last 90 days
registrar*string | null
source*"rdap" | "whois" | nullProtocol that answered the lookup
lookup_status*"ok" | "not_found" | "error" | null
lookup_failed*booleanTrue when the registry did not answer
issues_found*Finding[]
↳ code*stringStable machine-readable code, e.g. CERT_EXPIRED
↳ type*"error" | "warning" | "info"error: clients or browsers reject it; warning: it works but is weaker than it should be; info: a note, not a defect
↳ message*stringWhat was found and why it matters
elapsed_msintegerdefault 0

Errors

  • 401missing or invalid API key / token
  • 402not enough credits on the account
  • 422the request body or a parameter failed validation
  • 429plan rate limit exceeded

Nested objects

data.issues_found[] · Finding
FieldTypeDescription
code*stringStable machine-readable code, e.g. CERT_EXPIRED
type*"error" | "warning" | "info"error: clients or browsers reject it; warning: it works but is weaker than it should be; info: a note, not a defect
message*stringWhat was found and why it matters

Notes

  • Some country-code registries publish no dates at all, or only the expiry date; the age fields are then null and CREATION_DATE_UNAVAILABLE says why.
  • A transfer or a drop-and-re-register resets the creation date. A long history under the same registrant is not something a registry records.
  • A report with lookup_failed: true got no answer from the registry; retry it before acting on it.